Codex

From caidish/cAI-tools · View interactive version

Codex is an AI agent skill from the GitHub repository caidish/cAI-tools. Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, code review, or automated editing

How to use this skill

Skill file

Codex Skill Guide

Requires Codex CLI 0.153+ (codex --version). --full-auto no longer exists in this line; use --approve-for-me.

Models and Reasoning Effort

| Model | Tier | Use for |

| --- | --- | --- |

| gpt-6-astra | Flagship (default) | Hardest end-to-end work: architecture, multi-file refactors, security review, long agentic runs. ~1M context. |

| gpt-5.6-sol | GPT-5.6 flagship | Complex agentic coding when Astra is unavailable or over budget |

| gpt-5.6-terra | Mid tier | Everyday feature work, bug fixes, tests, routine review (GPT-5.5 class, cheaper) |

| gpt-5.6-luna | Fast, cheapest | Quick edits, lint, docs, formatting, throwaway or high-volume calls |

Effort ladder for model_reasoning_effort: low < medium < high < xhigh < max (provider also accepts none, minimal).

Running a Task

  1. If the user already named a model and effort, use them. Otherwise ask once via AskUserQuestion with two questions in a single prompt: model (gpt-6-astra (Recommended), gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna) and effort (xhigh (Recommended), high, medium, max). Pre-select per the table above based on task difficulty.
  2. Pick the sandbox. Default --sandbox read-only. For edits: --sandbox workspace-write --approve-for-me. Add -c sandbox_workspace_write.network_access=true when the task needs network inside workspace-write. --sandbox danger-full-access only with explicit permission.
  3. Assemble:

```bash

echo "<PROMPT>" | codex exec --skip-git-repo-check -m <MODEL> -c model_reasoning_effort="<EFFORT>" --sandbox <MODE> [-C <DIR>] [--add-dir <DIR>] [-i <IMAGE>] [-o <FILE>] [--ephemeral] - 2>/dev/null

```

  1. Run, capture stdout, summarize the outcome.
  2. Then tell 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."

Quick Reference

| Use case | Command shape |

| --- | --- |

| Read-only review or analysis | --sandbox read-only 2>/dev/null |

| Apply local edits | --sandbox workspace-write --approve-for-me 2>/dev/null |

| Edits plus network | --sandbox workspace-write --approve-for-me -c sandbox_workspace_write.network_access=true 2>/dev/null |

| Broad access | --sandbox danger-full-access --approve-for-me 2>/dev/null (ask first) |

| Review uncommitted changes | codex exec review --uncommitted --skip-git-repo-check -m <MODEL> -c model_reasoning_effort="<EFFORT>" 2>/dev/null (no custom prompt allowed with --uncommitted, --base, or --commit) |

| Review vs branch / a commit | codex exec review --base <BRANCH> ... or codex exec review --commit <SHA> ... |

| Review with custom instructions | (echo "Review the following uncommitted diff. <INSTRUCTIONS>"; git diff) \| codex exec --skip-git-repo-check --sandbox read-only -m <MODEL> -c model_reasoning_effort="<EFFORT>" - 2>/dev/null |

| Resume recent session | echo "prompt" \| codex exec --skip-git-repo-check resume --last - 2>/dev/null |

| Run from another directory | add -C <DIR> |

Resuming

Following Up

Error Handling

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.