Codex

From tae0y/python-project-template · View interactive version

Codex is an AI agent skill from the GitHub repository tae0y/python-project-template. Delegate to OpenAI Codex CLI when: (1) user explicitly requests it (codex에게 맡겨줘, codex로 해줘, 외주화해줘, codex 실행해줘, codex 리뷰 돌려줘), OR (2) the task requires autonomous repo-scale execution — writing multiple test files, file-level refactoring across many files, bulk edits (type hints, formatting, comments

How to use this skill

Skill file

Codex Delegation Skill

Delegate to Codex CLI for autonomous repo-scale execution tasks.

When to delegate to Codex

Delegate only when ALL of these hold:

  1. Execution task — requires writing/modifying files, not just reasoning
  2. Clear done condition — can be verified (tests pass, lint clean, etc.)
  3. Repo-scale or repetitive — spans multiple files or involves bulk changes

Examples that qualify:

When NOT to delegate

Pre-flight check

codex login status   # expect "Logged in"

If it fails, instruct the user to run codex login.

Default execution pattern

codex exec \
  --cd /path/to/repo \
  --sandbox workspace-write \
  --full-auto \
  --ephemeral \
  --json \
  -o /tmp/codex-result.txt \
  "task instruction"

Fixed option rules:

Commands by task type

Code tasks (tests, refactoring, bulk edits)

codex exec \
  --cd "$(pwd)" \
  --sandbox workspace-write \
  --full-auto \
  --ephemeral \
  -o /tmp/codex-result.txt \
  "task instruction here"

Code review

codex review --base main "Review for security, performance, and regression risk. Cite file path and line number."

Or non-interactive:

codex exec review \
  --base main \
  --ephemeral \
  -o /tmp/codex-review.txt \
  "Review for security, performance, and regression risk."

Long prompts (stdin)

cat prompt.txt | codex exec - \
  --cd "$(pwd)" \
  --sandbox workspace-write \
  --full-auto \
  --ephemeral \
  -o /tmp/codex-result.txt

Workflow

  1. Identify the task scope and target files from the user request.
  2. Write a concrete prompt (more specific = better results).
  3. Pick the matching pattern above and run it via Bash.
  4. After completion, Read the -o file and summarise results for the user.
  5. For any follow-up fixes, either handle them directly or re-run Codex.

Prompt writing tips

A good Codex prompt:

Troubleshooting

| Symptom | Fix |

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

| codex: command not found | Find the absolute path with which codex and use it |

| Git repo check fails | Set --cd to the repo root, or add --skip-git-repo-check |

| Output file missing | Verify the -o directory exists |

| Permissions concern | Use --sandbox read-only for a dry-run inspection step first |

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.