OpenAI Codex CLI integration
/plugin marketplace add jongwony/cc-plugin/plugin install codex@cc-pluginThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/gpt-5-1-codex-max_prompting_guide.ipynbreferences/gpt-5-1_prompting_guide.ipynbreferences/gpt-5-2_prompting_guide.ipynbAll prompts passed to codex MUST be in English.
cat /tmp/codex_prompt.txt | codex exec ...AskUserQuestion) which model and reasoning effort in a single prompt with two questions.| Model | Characteristics |
|---|---|
gpt-5.2-codex | Latest frontier agentic coding model (current default) |
gpt-5.1-codex-max | Codex-optimized flagship for deep and fast reasoning |
gpt-5.2 | Latest frontier model with improvements across knowledge, reasoning and coding |
--sandbox read-only unless edits or network access are necessary.--skip-git-repo-check):
-m, --model <MODEL> / --config model_reasoning_effort="<medium|high|xhigh>"--sandbox <read-only|workspace-write|danger-full-access> / --full-auto / -C <DIR>cat /tmp/codex_prompt.txt | codex exec --skip-git-repo-check resume --last 2>/dev/null. If user requests different model/reasoning, insert flags between exec and resume.2>/dev/null to suppress thinking tokens (stderr). Show stderr only for debugging.| Use case | Command pattern |
|---|---|
| Read-only analysis | codex exec --skip-git-repo-check -m MODEL --config ... --sandbox read-only 2>/dev/null |
| Apply edits | ... --sandbox workspace-write --full-auto 2>/dev/null |
| Network access | ... --sandbox danger-full-access --full-auto 2>/dev/null |
| Resume session | cat FILE | codex exec --skip-git-repo-check resume --last 2>/dev/null |
| Different dir | Add -C <DIR> to any command |
After codex completes, use AskUserQuestion to confirm next steps. Restate model/reasoning/sandbox when proposing actions.
codex --version or a codex exec command exits non-zero; request direction before retrying.--full-auto, --sandbox danger-full-access, --skip-git-repo-check) ask the user for permission using AskUserQuestion unless it was already given.AskUserQuestion.Three OpenAI prompting guides are available as Jupyter notebooks. Read the appropriate notebook when detailed guidance is needed.
| User Question Type | Read This File |
|---|---|
| GPT-5.2 prompting, verbosity control, scope discipline, migration | references/gpt-5-2_prompting_guide.ipynb |
| GPT-5.1 agentic steerability, metaprompting, solution_persistence | references/gpt-5-1_prompting_guide.ipynb |
| Codex-Max starter prompt, tools (apply_patch, shell), compaction | references/gpt-5-1-codex-max_prompting_guide.ipynb |
File: references/gpt-5-2_prompting_guide.ipynb
Key sections (grep patterns for navigation):
Key behavioral differences - Changes from GPT-5.1: deliberate scaffolding, lower verbosity, stronger instruction adherenceControlling verbosity - Length constraints via <output_verbosity_spec> blockPreventing Scope drift - Prevent feature creep via <design_and_scope_constraints> blockLong-context - Handle 10k+ tokens via <long_context_handling> blockuncertainty_and_ambiguity - Hallucination prevention, clarification question patternsCompaction - Extended context management via /responses/compact endpointPrompt Migration Guide - reasoning_effort mapping table (read reference for details)File: references/gpt-5-1_prompting_guide.ipynb
Key sections (grep patterns for navigation):
Agentic steerability - Personality, tone, verbosity controlsolution_persistence - End-to-end completion promptingUsing the "none" reasoning mode - Low-latency non-reasoning usageHow to metaprompt effectively - Iterative prompt debuggingFile: references/gpt-5-1-codex-max_prompting_guide.ipynb
Key sections (grep patterns for navigation):
Recommended Starter Prompt - Full production system promptCompaction - Multi-hour context managementApply_patch - File editing tool implementationShell_command - Terminal tool implementationParallel Tool Calling - Batch tool execution patternsAskUserQuestion for ambiguous requests before crafting promptsCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.