Codex CLI — Prompts
Skills use Markdown files with YAML front-matter (name, description) followed by freeform instruction text. The YAML front-matter is machine-readable; the body is human/agent-readable.
Verbatim Excerpt 1: code-review skill (orchestrator pattern)
File: .codex/skills/code-review/SKILL.md
---
name: code-review
description: Run a final code review on a pull request
---
Use subagents to review code using all code-review-* skills in this repository other than this orchestrator. One subagent per skill. Pass full skill path to subagents. Use xhigh reasoning.
You must return every single issue from every subagent. You can return an unlimited number of findings.
Use raw Markdown to report findings.
Number findings for ease of reference.
Each finding must include a specific file path and line number.
If the GitHub user running the review is the owner of the pull request add a `code-reviewed` label.
Do not leave GitHub comments unless explicitly asked.
Prompting technique: Hierarchical task decomposition — the orchestrator delegates to specialized sub-skills, enforces output format (numbered findings with file+line), controls side-effects (label vs. no comments), and sets reasoning intensity (xhigh reasoning).
Verbatim Excerpt 2: codex-bug skill (decision-tree diagnostic)
File: .codex/skills/codex-bug/SKILL.md (partial)
---
name: codex-bug
description: Diagnose GitHub bug reports in openai/codex. Use when given a GitHub issue URL from openai/codex and asked to decide next steps such as verifying against the repo, requesting more info, or explaining why it is not a bug; follow any additional user-provided instructions.
---
# Codex Bug
## Overview
Diagnose a Codex GitHub bug report and decide the next action: verify against sources, request more info, or explain why it is not a bug.
## Workflow
1. Confirm the input
- Require a GitHub issue URL that points to `github.com/openai/codex/issues/…`.
- If the URL is missing or not in the right repo, ask the user for the correct link.
2. Network access
- Always access the issue over the network immediately, even if you think access is blocked or unavailable.
- Prefer the GitHub API over HTML pages because the HTML is noisy.
3. Read the issue
...
5. Decide the course of action
- **Verify with sources** when the report is specific and likely reproducible.
- **Request more information** when the report is vague, missing repro steps, or lacks logs/environment.
- **Explain not a bug** when the report contradicts current behavior or documented constraints.
Prompting technique: Explicit decision-tree with enumerated branches and evidence requirements. Forces the agent to classify and cite before acting. Includes guard rails (URL validation, network-first stance).
Environment Definition
File: .codex/environments/environment.toml
# THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY
version = 1
name = "codex"
[setup]
script = ""
[[actions]]
name = "Run"
icon = "run"
command = "cargo +1.93.0 run --manifest-path=codex-rs/Cargo.toml --bin codex -- -c mcp_oauth_credentials_store=file"
This is the environment definition telling the sandbox how to build and run the project itself, used in dev workflows.