codex
Original:🇺🇸 English
Translated
Invokes Codex CLI as a second opinion. Use for reviewing plans, code, architectural decisions, or getting an independent perspective from OpenAI's reasoning models.
2installs
Sourcevinta/hal-9000
Added on
NPX Install
npx skill4agent add vinta/hal-9000 codexTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Codex Second Opinion
Use Codex to get an independent review from OpenAI's reasoning models.
Use when:
- You want a second opinion on a plan, diff, or architecture decision.
- You need a fresh pass for bugs, edge cases, or missing requirements.
- You want a quick sanity check before sharing with users or stakeholders.
Invocation
Use for non-interactive execution. The prompt can be passed as an argument or piped via stdin.
codex execbash
# Direct prompt
codex exec "Read the files in src/ and review them for bugs"bash
# Pipe via stdin
git diff main..HEAD | codex exec "Review this diff for issues"Key Options
- : Select model (always use the most capable available:
-m MODEL)gpt-5.2-codex - : Override config values inline (e.g.,
-c key=value)-c model="gpt-5.2-codex" - : Use a config profile from
-p PROFILEto avoid repeating flags~/.codex/config.toml - : Set working directory
-C DIR - : Automatic execution with workspace-write sandbox (fewer approval pauses)
--full-auto - : Sandbox policy (
-s SANDBOX_POLICY,read-only)workspace-write - : Skip repo detection (saves time outside git)
--skip-git-repo-check
Workflow
- Gather context: Identify the files, plans, or diffs Codex needs
- Define the objective: What does “good” look like? Include constraints and acceptance criteria
- Compose a focused prompt: Be specific about what to review and what feedback you want
- Invoke Codex: Use with appropriate options
codex exec - Report findings: Present Codex's feedback to the user with your own assessment of which points are valid
Model Policy
- Prefer ; if unavailable, use
gpt-5.2-codex.gpt-5.2 - If neither is available in this environment, select the strongest model supported by and note the fallback.
codex
Safety and Scope
- Default to for review-only tasks.
-s read-only - Use only when Codex needs to run tests or inspect generated artifacts.
workspace-write - Never pass secrets, tokens, or private customer data.
Prompt Guidelines
- State the review goal explicitly (e.g., "find logical errors", "evaluate scalability", "check for missing edge cases")
- Include constraints or requirements Codex should check against
- Ask for structured output (numbered issues, severity levels) for actionable feedback
- Ask for concrete references (file:line) when reviewing code or diffs
Interpreting Results
- Treat Codex feedback as a second opinion, not authority.
- Verify any claims that seem uncertain or conflict with known constraints.
- Prefer actionable items: bugs, regressions, missing tests, and unclear requirements.
Prompt Examples
Plan Review
bash
cat plan.md | codex exec -m gpt-5.2-codex -s read-only \
"Review this plan for risks, missing steps, and unclear assumptions.
Return:
1) Critical issues
2) Medium risks
3) Suggested improvements
4) Questions to clarify"Diff Review
bash
git diff main..HEAD | codex exec -m gpt-5.2-codex -s read-only \
"Review this diff for bugs, regressions, security issues, and missing tests.
Return numbered findings with severity and file:line references."Architecture Review
bash
cat design.md | codex exec -m gpt-5.2-codex -s read-only \
"Evaluate this architecture for scalability, fault tolerance, and operational risk.
Call out assumptions and suggest alternatives where applicable."Large Codebase Review
bash
codex exec -m gpt-5.2-codex -s read-only \
"Review the codebase with focus on correctness, edge cases, and missing tests.
Read these folders: src/, scripts/, and packages/.
Return numbered findings with severity and file:line references."