codex
Skill0 starsChanged 10 months agoMITView on GitHub
Executes OpenAI Codex CLI for code analysis, refactoring, and automated editing. Activates when users mention codex commands, code review requests, or automated code transformations requiring advanced reasoning models.
156 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- openamer-max/max-scriptstheir own version, first seen Nov 29, 2026
- Ertinox7711/SGRR-AGI-V2their own version, first seen Nov 29, 2026
- aakash1552005/universal-agent-skillstheir own version, first seen Nov 29, 2026
- mphaxise/gstack-port-for-codextheir own version, first seen Nov 29, 2026
- Dannykkh/skill-olympustheir own version, first seen Nov 29, 2026
- tenaya-ui/claude-skillstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use ios-sync, audit-decisions and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Saqlain-811Skillios-sync
Regenerate the iOS debug bridge against the latest upstream gstack templates. (gstack)
Also in 7 projects that use this
dzhngSkillaudit-decisions
Audit the decisions an implementing agent made, not its diff — a pure audit that traces the session's history into a decisions ledger, changes no code, and never blocks an unsupervised run. Working code still embeds architecture the user never chose; surface it because future work inherits it. Use when the user wants to review the decisions the AI made on their behalf, before merging or committing AI-implemented work, when integrating a delegated subagent's pass, or when a fix "works" but might be a point fix.
Also in 4 projects that use this
dzhngSkillimplement-spec-with-codex
Run [implement-spec](../implement-spec/SKILL.md) with Codex doing the implementation passes while you orchestrate, integrate, and review. Use when the user asks to implement a spec with Codex, or to run implement-spec with Codex as the implementer.
Also in 4 projects that use this
math-incSkillminecraft-modpack-server
Set up a modded Minecraft server from a CurseForge/Modrinth server pack zip. Covers NeoForge/Forge install, Java version, JVM tuning, firewall, LAN config, backups, and launch scripts.
Also in 6 projects that use this
math-incSkillpokemon-player
Play Pokemon games autonomously via headless emulation. Starts a game server, reads structured game state from RAM, makes strategic decisions, and sends button inputs — all from the terminal.
Also in 6 projects that use this
ayudaySkillsetup-deploy
Configure deployment settings for /land-and-deploy. Detects your deploy platform (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions, custom), production URL, health check endpoints, and deploy status commands. Writes the configuration to CLAUDE.md so all future deploys are automatic. Use when: "setup deploy", "configure deployment", "set up land-and-deploy", "how do I deploy with gstack", "add deploy config".
Also in 22 projects that use this
- +1 more from math-inc
Other versions156 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- davidanthonyn/claude-skills★ 048% same
Wrote their own version · 155
- NousResearch/hermes-agent★ 267ksame name
- garrytan/gstack★ 143ksame name
- dzhng/jevgrep★ 3.2ksame name
- ispc/ispc★ 3ksame name
- bergside/awesome-design-skills★ 2.9ksame name
- dataplat/dbatools★ 2.9ksame name
- Lilac-Labs/gini-agent★ 1.9ksame name
- Open-Curiosity/gini-agent★ 1.9ksame name
- dzhng/skills★ 1.5ksame name
- math-inc/OpenGauss★ 1.3ksame name
145 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- argocd-opsSkill
- convergent-reviewSkill
- create-handoffSkill
- create-planSkill
- create-researchSkill
- init-ai-docsSkill
- init-central-docsSkill
- jiraSkill
- loki-debugSkill
- pr-statusSkill
- resume-handoffSkill
- tatari-turboliftSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. 0 are common, 12 are distinctive, and 16 are very specific to this project.
0
Common
Most of the 132 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Verify availability: codex --version on first use per session
- Very specific: line 44
Default to 2>&1 so errors are visible in output
- Very specific: line 45
Only use 2>/dev/null when user explicitly requests clean output or after confirming the command works
- Distinctive: line 48
Check exit code (0 = success)
- Very specific: line 66
Use @path syntax to include file contents in prompts:
- Very specific: line 75
Use absolute paths with --skip-git-repo-check: @/full/path/to/file.py
- Distinctive: line 222
Check exit code (non-zero = failure)
- Very specific: line 224
Ask user for direction via AskUserQuestion
- Very specific: line 230
Before using high-impact flags, request user approval via AskUserQuestion:
- Distinctive: line 238
When output contains warnings:
- Very specific: line 242
Use AskUserQuestion to determine next steps
- Very specific: line 283
Verify stderr is captured with 2>&1 (not suppressed with 2>/dev/null)
- Very specific: line 286
Test minimal command: codex exec -m gpt-5.2 "hello world"
- Very specific: line 287
Verify model access: codex exec --model gpt-5.2 "test"
- Very specific: line 295
Check configured model: grep model ~/.codex/config.toml
- Distinctive: line 296
Verify API access: Ensure valid credentials
- Very specific: line 298
Use OSS fallback: --oss (requires Ollama)
- Very specific: line 306
Use codex resume to open the session picker
- Distinctive: line 308
Check if session expired or was cleaned up
- Distinctive: line 322
read-only: Default for any analysis or review
- Distinctive: line 335
Create profiles for common workflows:
- Very specific: line 344
Use @path syntax for all file input: "analyze @src/main.py and @src/utils.py"
- Very specific: line 346
Prefer multiple @path references over separate commands
- Distinctive: line 395
If errors persist after troubleshooting:
- Distinctive: line 437
Ask user: model + reasoning effort
- Distinctive: line 440
If changes needed: resume with workspace-write
- Distinctive: line 456
Use high reasoning effort
- Distinctive: line 457
Run comprehensive analysis (read-only)
“Common” is measured: kept by at least 6 in 10 of the 132 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- Based on claude-skill-codex by Yipeng Sun (https://github.com/sypsyp97/claude-skill-codex) --><!-- Original work licensed under MIT License. Copyright (c) 2025 Yipeng Sun. -->Codex Execution Skill
Prerequisites
- Codex CLI installed and configured (
~/.codex/config.toml) - Verify availability:
codex --versionon first use per session
Workflow Checklist
For every Codex task, follow this sequence:
- ☐ Ask user for execution parameters via
AskUserQuestion(single prompt):- Model:
gpt-5.2,gpt-5.2-pro,gpt-5.3-codexor default - Reasoning effort:
none,low,medium,high,xhigh
- Model:
- ☐ Determine sandbox mode based on task:
read-only: Code review, analysis, documentationworkspace-write: Code modifications, file creationdanger-full-access: System operations, network access
☐ Build command with required flags:
codex exec [OPTIONS] "PROMPT"Essential flags:
-m <MODEL>(if overriding default)-c model_reasoning_effort="<LEVEL>"-s <SANDBOX_MODE>--skip-git-repo-check(if outside git repo)-C <DIRECTORY>(if changing workspace)--full-auto(for non-interactive execution, cannot be used with --yolo)
- ☐ Execute with stderr capture:
- Default to
2>&1so errors are visible in output - Only use
2>/dev/nullwhen user explicitly requests clean output or after confirming the command works
- Default to
- ☐ Validate execution:
- Check exit code (0 = success)
- Summarize output for user
- Report errors with actionable solutions
- ☐ Inform about resume capability:
- "Resume this session anytime:
codex resume"
- "Resume this session anytime:
Command Patterns
Read-Only Analysis
codex exec -m gpt-5.2 -c model_reasoning_effort="medium" -s read-only \
--skip-git-repo-check --full-auto "review @file.py for security issues" 2>&1File References
Use @path syntax to include file contents in prompts:
codex exec -m gpt-5.2 -c model_reasoning_effort="medium" -s read-only \
--skip-git-repo-check --full-auto \
"Review @/path/to/plan.md and @/path/to/config.md for issues" 2>&1- Relative paths work inside git repos:
@src/module.py - Use absolute paths with
--skip-git-repo-check:@/full/path/to/file.py - Multiple files: include several
@pathreferences in one prompt
Code Modification
codex exec -m gpt-5.3-codex -c model_reasoning_effort="xhigh" -s workspace-write \
--skip-git-repo-check --full-auto "refactor @module.py to async/await" 2>&1Resume Session
codex exec --skip-git-repo-check resume --last "fix the remaining issues" 2>&1Cross-Directory Execution
codex exec -C /path/to/project -m gpt-5.2 -c model_reasoning_effort="medium" \
-s read-only --skip-git-repo-check --full-auto "analyze architecture" 2>&1Profiles
codex exec --profile production -c model_reasoning_effort="high" \
--full-auto "optimize performance in @app.py" 2>&1CLI Reference
Core Flags
| Flag | Values | When to Use |
-m, --model | gpt-5.2, gpt-5.2-pro, gpt-5.3-codex, gpt-5-mini, gpt-5-nano | Override default model |
-c, --config | key=value | Runtime config override (repeatable) |
-s, --sandbox | read-only, workspace-write, danger-full-access | Set execution permissions |
-a, --ask-for-approval | untrusted, on-failure, on-request, never | Direct approval policy flag |
--yolo | flag | Bypasses all sandbox restrictions (alias for --dangerously-bypass-approvals-and-sandbox). Cannot be used with --full-auto |
-C, --cd | path | Change workspace directory |
--skip-git-repo-check | flag | Allow execution outside git repos |
--full-auto | flag | Non-interactive mode (workspace-write + approvals on failure). Cannot be used with --yolo |
--add-dir <DIR> | path | Additional writable directories |
--search | flag | Enable live web search tool |
--enable/--disable | <FEATURE> | Feature flag toggles |
-p, --profile | string | Load configuration profile from config.toml |
--json | flag | JSON event output (CI/CD pipelines) |
-o, --output-last-message | path | Write final message to file |
-i, --image | path[,path...] | Attach images (repeatable or comma-separated) |
--oss | flag | Use local open-source model (requires Ollama) |
Configuration Options
Model Reasoning Effort (-c model_reasoning_effort="<LEVEL>"):
none: Minimal reasoning for low-latency interactionslow: Standard operations, routine refactoringmedium: Complex analysis, architectural decisions (default)high: Critical code, security audits, complex algorithmsxhigh: Extremely complex problems requiring maximum reasoning depth
Model Verbosity (-c model_verbosity="<LEVEL>"):
low: Minimal outputmedium: Balanced detail (default)high: Verbose explanations
Approval Prompts (-c approvals="<WHEN>"):
on-request: Before any tool useon-failure: Only on errors (default for--full-auto)untrusted: Minimal promptsnever: No interruptions (use with caution)
Configuration Management
Config File Location
~/.codex/config.toml
Runtime Overrides
# Override single setting
codex exec -c model="gpt-5.2" "task"
# Override multiple settings
codex exec -c model="gpt-5.2" -c model_reasoning_effort="high" "task"Profile Definitions
Define in config.toml:
[profiles.research]
model = "gpt-5.2"
model_reasoning_effort = "high"
sandbox = "read-only"
[profiles.development]
model = "gpt-5.3-codex"
sandbox = "workspace-write"Use with:
codex exec --profile research "analyze codebase"Resume Behavior
Automatic inheritance:
- Model selection
- Reasoning effort
- Sandbox mode
- Configuration overrides
Resume syntax:
# Resume last session
codex exec resume --last
# Resume with new prompt
codex exec resume --last "continue with next steps"
# Resume specific session
codex exec resume <SESSION_ID> "follow-up task"Flag injection (between exec and resume):
# Change reasoning effort for resumed session
codex exec -c model_reasoning_effort="high" resume --lastError Handling
Validation Loop
- Execute command
- Check exit code (non-zero = failure)
- Report error with context
- Ask user for direction via
AskUserQuestion - Retry with adjustments or escalate
- Stop after 3 failed attempts — reassess approach before continuing
Permission Requests
Before using high-impact flags, request user approval via AskUserQuestion:
--full-auto: Automated execution-s danger-full-access: System-wide access--yolo/--dangerously-bypass-approvals-and-sandbox: Full system access
Partial Success Handling
When output contains warnings:
- Summarize successful operations
- Detail failures with context
- Use
AskUserQuestionto determine next steps - Propose specific adjustments
Troubleshooting
File Access Blocked
Symptom: "shell is blocked by the sandbox" or permission errors
Root cause: Sandbox read-only mode restricts file system
Solutions (priority order):
File references (recommended):
codex exec -m gpt-5.2 -c model_reasoning_effort="medium" -s read-only \ --skip-git-repo-check --full-auto "review @target.py" 2>&1Explicit permissions:
codex exec -m gpt-5.2 -s read-only \ -c 'sandbox_permissions=["disk-full-read-access"]' \ --skip-git-repo-check --full-auto "review @file.py" 2>&1Upgrade sandbox:
codex exec -m gpt-5.2 -s workspace-write \ --skip-git-repo-check --full-auto "review @file.py" 2>&1
Exit Code Failures
Symptom: Non-zero exit without clear message
Diagnostic steps:
- Verify stderr is captured with
2>&1(not suppressed with2>/dev/null) - Verify installation:
codex --version - Check configuration:
cat ~/.codex/config.toml - Test minimal command:
codex exec -m gpt-5.2 "hello world" - Verify model access:
codex exec --model gpt-5.2 "test"
Model Unavailable
Symptom: "model not found" or authentication errors
Solutions:
- Check configured model:
grep model ~/.codex/config.toml - Verify API access: Ensure valid credentials
- Try alternative model:
-m gpt-5.2-proor-m gpt-5-mini - Use OSS fallback:
--oss(requires Ollama)
Session Resume Fails
Symptom: Cannot resume previous session
Diagnostic steps:
- Use
codex resumeto open the session picker - Try
--lastflag instead of specific ID - Check if session expired or was cleaned up
Best Practices
Reasoning Effort Selection
- none: Minimal reasoning for low-latency interactions, quick syntax fixes
- low: Standard refactoring, basic analysis
- medium: Complex refactoring, architecture review
- high: Security audits, algorithm optimization, critical bugs
- xhigh: Extremely complex problems requiring maximum reasoning depth
Sandbox Mode Selection
- read-only: Default for any analysis or review
- workspace-write: File modifications only
- danger-full-access: Network operations, system commands (rare)
Stderr Handling
- Default to
2>&1to capture errors in output for visibility - Use
2>/dev/nullonly when:- User explicitly requests clean output without thinking tokens
- Command is confirmed working and output noise is undesirable
Profile Usage
Create profiles for common workflows:
review: High reasoning, read-onlyrefactor: Medium reasoning, workspace-writequick: Low reasoning, read-onlysecurity: High reasoning, workspace-write
File Input
- Use
@pathsyntax for all file input:"analyze @src/main.py and @src/utils.py" - Relative paths inside git repos, absolute paths with
--skip-git-repo-check - Prefer multiple
@pathreferences over separate commands
Safety Guidelines
Always verify before:
- Using
danger-full-accesssandbox - Disabling approval prompts on production systems
- Running with
--yoloon machines with elevated privileges
Ask user approval for:
- First-time
workspace-writeusage - System-wide access requests
- Destructive operations (deletions, migrations)
Advanced Usage
CI/CD Integration
codex exec --json -o result.txt -m gpt-5.2 \
-c model_reasoning_effort="medium" \
--skip-git-repo-check --full-auto \
"run security audit on changed files" 2>&1Batch Processing
for file in *.py; do
codex exec -m gpt-5.2 -c model_reasoning_effort="low" \
--skip-git-repo-check --full-auto "lint and format @$file" 2>&1
doneMulti-Step Workflows
# Step 1: Analysis
codex exec -m gpt-5.2 -c model_reasoning_effort="high" -s read-only \
--full-auto "analyze @codebase for architectural issues" 2>&1
# Step 2: Resume with changes
codex exec -s workspace-write resume --last "implement suggested refactoring" 2>&1When to Escalate
If errors persist after troubleshooting:
Check documentation:
WebFetch https://developers.openai.com/codex/cli/referenceWebFetch https://developers.openai.com/codex/local-config#cli- Report to user:
- Error message verbatim
- Attempted solutions
- Configuration details
- Exit codes and stderr output
- Request guidance:
- Alternative approaches
- Configuration adjustments
- Manual intervention points
Model Selection Guide
| Task Type | Recommended Model | Reasoning Effort |
| Quick syntax fixes | gpt-5.3-codex | none |
| Simple refactoring | gpt-5.3-codex | low |
| Code review | gpt-5.2 | high |
| Complex refactoring | gpt-5.3-codex | high |
| Architecture analysis | gpt-5.2 | xhigh |
| Security audit | gpt-5.2 | high |
| Algorithm optimization | gpt-5.3-codex | xhigh |
| Documentation generation | gpt-5.2 | low |
| Tough algorithmic problems | gpt-5.2-pro | xhigh |
| High-throughput tasks | gpt-5.2 | none |
Common Workflows
Code Review Workflow
- Ask user: model + reasoning effort
- Run read-only analysis
- Present findings
- If changes needed: resume with workspace-write
- Validate changes
- Inform about resume capability
Refactoring Workflow
- Ask user: model + reasoning effort
- Analyze current code (read-only)
- Propose changes
- Get user approval
- Apply changes (workspace-write)
- Run validation/tests
- Report results
Security Audit Workflow
- Use high reasoning effort
- Run comprehensive analysis (read-only)
- Document findings
- Propose fixes
- Apply fixes if approved (workspace-write)
- Re-audit to verify
- Generate report
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

