{"id":"9b3eef53-874e-4f3a-8596-8794f2df515a","shortId":"KhyhRP","kind":"skill","title":"codex","tagline":"Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing. Uses GPT-5.2 by default for state-of-the-art software engineering.","description":"# Codex Skill Guide\n\n## Running a Task\n1. Default to `gpt-5.2` model. Ask the user (via `AskUserQuestion`) which reasoning effort to use (`xhigh`,`high`, `medium`, or `low`). User can override model if needed (see Model Options below).\n2. Select the sandbox mode required for the task; default to `--sandbox read-only` unless edits or network access are necessary.\n3. Assemble the command with the appropriate options:\n   - `-m, --model <MODEL>`\n   - `--config model_reasoning_effort=\"<high|medium|low>\"`\n   - `--sandbox <read-only|workspace-write|danger-full-access>`\n   - `--full-auto`\n   - `-C, --cd <DIR>`\n   - `--skip-git-repo-check`\n3. Always use --skip-git-repo-check.\n4. When continuing a previous session, use `codex exec --skip-git-repo-check resume --last` via stdin. When resuming don't use any configuration flags unless explicitly requested by the user e.g. if he species the model or the reasoning effort when requesting to resume a session. Resume syntax: `echo \"your prompt here\" | codex exec --skip-git-repo-check resume --last 2>/dev/null`. All flags have to be inserted between exec and resume.\n5. **IMPORTANT**: By default, append `2>/dev/null` to all `codex exec` commands to suppress thinking tokens (stderr). Only show stderr if the user explicitly requests to see thinking tokens or if debugging is needed.\n6. Run the command, capture stdout/stderr (filtered as appropriate), and summarize the outcome for the user.\n7. **After Codex completes**, inform the user: \"You can resume this Codex session at any time by saying 'codex resume' or asking me to continue with additional analysis or changes.\"\n\n### Quick Reference\n| Use case | Sandbox mode | Key flags |\n| --- | --- | --- |\n| Read-only review or analysis | `read-only` | `--sandbox read-only 2>/dev/null` |\n| Apply local edits | `workspace-write` | `--sandbox workspace-write --full-auto 2>/dev/null` |\n| Permit network or broad access | `danger-full-access` | `--sandbox danger-full-access --full-auto 2>/dev/null` |\n| Resume recent session | Inherited from original | `echo \"prompt\" \\| codex exec --skip-git-repo-check resume --last 2>/dev/null` (no flags allowed) |\n| Run from another directory | Match task needs | `-C <DIR>` plus other flags `2>/dev/null` |\n\n## Model Options\n\n| Model | Best for | Context window | Key features |\n| --- | --- | --- | --- |\n| `gpt-5.2-max` | **Max model**: Ultra-complex reasoning, deep problem analysis | 400K input / 128K output | 76.3% SWE-bench, adaptive reasoning, $1.25/$10.00 |\n| `gpt-5.2` ⭐ | **Flagship model**: Software engineering, agentic coding workflows | 400K input / 128K output | 76.3% SWE-bench, adaptive reasoning, $1.25/$10.00 |\n| `gpt-5.2-mini` | Cost-efficient coding (4x more usage allowance) | 400K input / 128K output | Near SOTA performance, $0.25/$2.00 |\n| `gpt-5.1-thinking` | Ultra-complex reasoning, deep problem analysis | 400K input / 128K output | Adaptive thinking depth, runs 2x slower on hardest tasks |\n\n**GPT-5.2 Advantages**: 76.3% SWE-bench (vs 72.8% GPT-5), 30% faster on average tasks, better tool handling, reduced hallucinations, improved code quality. Knowledge cutoff: September 30, 2024.\n\n**Reasoning Effort Levels**:\n- `xhigh` - Ultra-complex tasks (deep problem analysis, complex reasoning, deep understanding of the problem)\n- `high` - Complex tasks (refactoring, architecture, security analysis, performance optimization)\n- `medium` - Standard tasks (refactoring, code organization, feature additions, bug fixes)\n- `low` - Simple tasks (quick fixes, simple changes, code formatting, documentation)\n\n**Cached Input Discount**: 90% off ($0.125/M tokens) for repeated context, cache lasts up to 24 hours.\n\n## Following Up\n- After every `codex` command, immediately use `AskUserQuestion` to confirm next steps, collect clarifications, or decide whether to resume with `codex exec resume --last`.\n- When resuming, pipe the new prompt via stdin: `echo \"new prompt\" | codex exec resume --last 2>/dev/null`. The resumed session automatically uses the same model, reasoning effort, and sandbox mode from the original session.\n- Restate the chosen model, reasoning effort, and sandbox mode when proposing follow-up actions.\n\n## Error Handling\n- Stop and report failures whenever `codex --version` or a `codex exec` command exits non-zero; request direction before retrying.\n- Before you use high-impact flags (`--full-auto`, `--sandbox danger-full-access`, `--skip-git-repo-check`) ask the user for permission using AskUserQuestion unless it was already given.\n- When output includes warnings or partial results, summarize them and ask how to adjust using `AskUserQuestion`.\n\n## CLI Version\n\nRequires Codex CLI v0.57.0 or later for GPT-5.2 model support. The CLI defaults to `gpt-5.2` on macOS/Linux and `gpt-5.2` on Windows. Check version: `codex --version`\n\nUse `/model` slash command within a Codex session to switch models, or configure default in `~/.codex/config.toml`.","tags":["codex","agent","toolkit","softaworks","agent-skills","automation","claude","claude-code","coding-agent","development"],"capabilities":["skill","source-softaworks","skill-codex","topic-agent-skills","topic-automation","topic-claude","topic-claude-code","topic-coding-agent","topic-development"],"categories":["agent-toolkit"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/softaworks/agent-toolkit/codex","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add softaworks/agent-toolkit","source_repo":"https://github.com/softaworks/agent-toolkit","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 1847 github stars · SKILL.md body (4,933 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:52:56.118Z","embedding":null,"createdAt":"2026-04-18T20:27:49.462Z","updatedAt":"2026-05-18T18:52:56.118Z","lastSeenAt":"2026-05-18T18:52:56.118Z","tsv":"'-5':498 '-5.1':466 '-5.2':28,49,401,425,446,489,735,743,748 '/.codex/config.toml':770 '/dev/null':208,225,321,336,355,374,390,622 '/m':570 '/model':756 '0.125':569 '0.25':463 '1':45 '1.25':422,443 '10.00':423,444 '128k':414,435,458,477 '2':76,207,224,320,335,354,373,389,621 '2.00':464 '2024':516 '24':579 '2x':483 '3':98,136 '30':499,515 '4':144 '400k':412,433,456,475 '4x':452 '5':219 '6':253 '7':269 '72.8':496 '76.3':416,437,491 '90':567 'access':95,125,341,345,350,691 'action':654 'adapt':420,441,479 'addit':295,551 'adjust':722 'advantag':490 'agent':430 'allow':377,455 'alreadi':707 'alway':137 'analysi':21,296,312,411,474,527,541 'anoth':380 'append':223 'appli':322 'appropri':104,261 'architectur':539 'art':36 'ask':6,51,290,697,719 'askuserquest':55,589,703,724 'assembl':99 'auto':128,334,353,686 'autom':24 'automat':626 'averag':502 'bench':419,440,494 'best':394 'better':504 'broad':340 'bug':552 'c':129,385 'cach':564,575 'captur':257 'case':302 'cd':130 'chang':298,560 'check':135,143,157,204,370,696,751 'chosen':642 'clarif':595 'cli':10,725,729,739 'code':20,431,451,510,548,561 'codex':1,9,11,13,18,39,151,198,228,271,280,287,364,585,602,617,662,666,728,753,761 'collect':594 'command':101,230,256,586,668,758 'complet':272 'complex':407,470,523,528,536 'config':108 'configur':168,767 'confirm':591 'context':396,574 'continu':146,293 'cost':449 'cost-effici':448 'cutoff':513 'danger':123,343,348,689 'danger-full-access':122,342,347,688 'debug':250 'decid':597 'deep':409,472,525,530 'default':30,46,85,222,740,768 'depth':481 'direct':674 'directori':381 'discount':566 'document':563 'e.g':176 'echo':194,362,614 'edit':25,92,324 'effici':450 'effort':58,111,185,518,632,645 'engin':38,429 'error':655 'everi':584 'exec':12,152,199,216,229,365,603,618,667 'exit':669 'explicit':171,242 'failur':660 'faster':500 'featur':399,550 'filter':259 'fix':553,558 'flag':169,210,306,376,388,683 'flagship':426 'follow':581,652 'follow-up':651 'format':562 'full':124,127,333,344,349,352,685,690 'full-auto':126,332,351,684 'git':133,141,155,202,368,694 'given':708 'gpt':27,48,400,424,445,465,488,497,734,742,747 'guid':41 'hallucin':508 'handl':506,656 'hardest':486 'high':62,112,535,681 'high-impact':680 'hour':580 'immedi':587 'impact':682 'import':220 'improv':509 'includ':711 'inform':273 'inherit':359 'input':413,434,457,476,565 'insert':214 'key':305,398 'knowledg':512 'last':159,206,372,576,605,620 'later':732 'level':519 'local':323 'low':65,114,554 'm':106 'macos/linux':745 'match':382 'max':402,403 'medium':63,113,544 'mini':447 'mode':80,304,635,648 'model':50,69,73,107,109,181,391,393,404,427,630,643,736,765 'near':460 'necessari':97 'need':71,252,384 'network':94,338 'new':610,615 'next':592 'non':671 'non-zero':670 'openai':17 'optim':543 'option':74,105,392 'organ':549 'origin':361,638 'outcom':265 'output':415,436,459,478,710 'overrid':68 'partial':714 'perform':462,542 'permiss':701 'permit':337 'pipe':608 'plus':386 'previous':148 'problem':410,473,526,534 'prompt':196,363,611,616 'propos':650 'qualiti':511 'quick':299,557 'read':89,117,308,314,318 'read-on':88,116,307,313,317 'reason':57,110,184,408,421,442,471,517,529,631,644 'recent':357 'reduc':507 'refactor':22,538,547 'refer':16,300 'repeat':573 'repo':134,142,156,203,369,695 'report':659 'request':172,187,243,673 'requir':81,727 'restat':640 'result':715 'resum':14,158,163,189,192,205,218,278,288,356,371,600,604,607,619,624 'retri':676 'review':310 'run':8,42,254,378,482 'sandbox':79,87,115,303,316,328,346,634,647,687 'say':286 'secur':540 'see':72,245 'select':77 'septemb':514 'session':149,191,281,358,625,639,762 'show':237 'simpl':555,559 'skill':40 'skill-codex' 'skip':132,140,154,201,367,693 'skip-git-repo-check':131,139,153,200,366,692 'slash':757 'slower':484 'softwar':37,428 'sota':461 'source-softaworks' 'speci':179 'standard':545 'state':33 'state-of-the-art':32 'stderr':235,238 'stdin':161,613 'stdout/stderr':258 'step':593 'stop':657 'summar':263,716 'support':737 'suppress':232 'swe':418,439,493 'swe-bench':417,438,492 'switch':764 'syntax':193 'task':44,84,383,487,503,524,537,546,556 'think':233,246,467,480 'time':284 'token':234,247,571 'tool':505 'topic-agent-skills' 'topic-automation' 'topic-claude' 'topic-claude-code' 'topic-coding-agent' 'topic-development' 'ultra':406,469,522 'ultra-complex':405,468,521 'understand':531 'unless':91,170,704 'usag':454 'use':2,26,60,138,150,166,301,588,627,679,702,723,755 'user':5,53,66,175,241,268,275,699 'v0.57.0':730 'version':663,726,752,754 'via':54,160,612 'vs':495 'warn':712 'whenev':661 'whether':598 'window':397,750 'within':759 'workflow':432 'workspac':120,326,330 'workspace-writ':119,325,329 'write':121,327,331 'xhigh':61,520 'zero':672","prices":[{"id":"d0c22afe-38b1-495b-ad8f-0a2b4c54a34e","listingId":"9b3eef53-874e-4f3a-8596-8794f2df515a","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"softaworks","category":"agent-toolkit","install_from":"skills.sh"},"createdAt":"2026-04-18T20:27:49.462Z"}],"sources":[{"listingId":"9b3eef53-874e-4f3a-8596-8794f2df515a","source":"github","sourceId":"softaworks/agent-toolkit/codex","sourceUrl":"https://github.com/softaworks/agent-toolkit/tree/main/skills/codex","isPrimary":false,"firstSeenAt":"2026-04-18T21:54:22.294Z","lastSeenAt":"2026-05-18T18:52:56.118Z"},{"listingId":"9b3eef53-874e-4f3a-8596-8794f2df515a","source":"skills_sh","sourceId":"softaworks/agent-toolkit/codex","sourceUrl":"https://skills.sh/softaworks/agent-toolkit/codex","isPrimary":true,"firstSeenAt":"2026-04-18T20:27:49.462Z","lastSeenAt":"2026-05-07T22:40:50.811Z"}],"details":{"listingId":"9b3eef53-874e-4f3a-8596-8794f2df515a","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"softaworks","slug":"codex","github":{"repo":"softaworks/agent-toolkit","stars":1847,"topics":["agent-skills","ai","automation","claude","claude-code","coding-agent","development"],"license":"mit","html_url":"https://github.com/softaworks/agent-toolkit","pushed_at":"2026-03-05T16:46:24Z","description":"A curated collection of skills for AI coding agents. Skills are packaged instructions and scripts that extend agent capabilities across development, documentation, planning, and professional workflows.","skill_md_sha":"82f09ba2e4dec66853e02137e84979543a62f3cf","skill_md_path":"skills/codex/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/softaworks/agent-toolkit/tree/main/skills/codex"},"layout":"multi","source":"github","category":"agent-toolkit","frontmatter":{"name":"codex","description":"Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing. Uses GPT-5.2 by default for state-of-the-art software engineering."},"skills_sh_url":"https://skills.sh/softaworks/agent-toolkit/codex"},"updatedAt":"2026-05-18T18:52:56.118Z"}}