codex

Original🇺🇸 English
Translated

Use when "codex", "use gpt", "gpt-5", "openai codex", "let openai", "full-auto", "autonomous code generation"

12installs
Added on

NPX Install

npx skill4agent add eyadsibai/ltk codex

Tags

Translated version includes tags in frontmatter

OpenAI Codex Integration

Autonomous code execution using OpenAI Codex CLI.

Prerequisites

bash
# Check installation
codex --version

# Install if needed
npm i -g @openai/codex
# or
brew install codex

Sandbox Modes

ModeFlagCapabilities
Read-Only
-s read-only
Analyze code, no modifications (default)
Workspace-Write
-s workspace-write
or
--full-auto
Read/write files in workspace
Danger-Full-Access
-s danger-full-access
Network, system-level, all files
Key concept: Use
--full-auto
for most programming tasks—it enables file editing.

Common Commands

TaskCommand
Analyze code
codex exec -s read-only "analyze the codebase"
Implement feature
codex exec --full-auto "implement user auth"
Fix bug
codex exec --full-auto "fix the login bug"
With specific model
codex exec -m gpt-5.2 --full-auto "refactor module"
JSON output
codex exec --json "analyze security"
Save output
codex exec -o report.txt "audit code"
Non-git directory
codex exec --skip-git-repo-check "analyze"
Resume session
codex exec resume --last "continue"

Model Selection

ModelUse Case
gpt-5.2
Latest capabilities
gpt-5.2-codex
Code-specialized
gpt-5.2-codex-max
Maximum quality
Use
-m MODEL
to specify.

Execution Principles

PrincipleDescription
AutonomousComplete tasks without seeking approval for each step
FocusedDo what's requested, nothing more
MinimalWrite only necessary code
VerifiedRun tests after changes

When to Pause for User

SituationAction
Destructive operationsAsk first (delete DB, force push)
Security decisionsAsk first (expose credentials, open ports)
Ambiguous requirementsClarify before proceeding
Missing critical infoRequest user-specific data
For everything else, proceed autonomously.

Output Format

✓ Task completed successfully

Changes made:
- [Files modified/created]
- [Key code changes]

Results:
- [Metrics: lines changed, files affected]

Verification:
- [Tests run, checks performed]

Error Handling

ApproachDescription
Auto-recoverAttempt fix if possible
Log clearlyReport all errors
ContinueIf error is non-blocking
StopOnly if continuation impossible