Source profileQuality 92/100Review permissions

majiayu000/spellbook/skills/codex-agent/SKILL.md

codex-agent

Use when you want a second-opinion review via Codex CLI, cross-verification after another agent implements changes, debugging help, or alternative implementation proposals. Requires Codex CLI to be installed and authenticated.

Source repository stars
249
Declared platforms
1
Static risk flags
3
Last source update
2026-08-02
Source checked
2026-08-04

Decision brief

What it does—and where it fits

This skill enables Claude Code to collaborate with OpenAI's Codex CLI agent for second-opinion review, cross-verification, debugging analysis, and alternative implementation proposals.

Best for

  • Use when you want a second-opinion review via Codex CLI, cross-verification after another agent implements changes, debugging help, or alternative implementation proposals.

Not for

  • Authentication Issues
  • Check Installation

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexDeclaredSource recordInstall path and trigger
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/majiayu000/spellbook --skill "skills/codex-agent"
Safe inspection promptEditorial

Inspect the Agent Skill "codex-agent" from https://github.com/majiayu000/spellbook/blob/01c5d88b0139a80ac38bfe7206ea99f28b0fc999/skills/codex-agent/SKILL.md at commit 01c5d88b0139a80ac38bfe7206ea99f28b0fc999. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Optional Codex Review Workflow

    Use this workflow when the user asks for Codex review, wants a second opinion, or needs cross-verification from a separate coding agent.

    Read the relevant fileApply the fix using Edit toolVerify the fix addresses Codex's concern
  2. 02

    Step 1: Call Codex and Read Feedback

    Keep the write and read in the same Bash call, or pass a concrete report path between calls; shell variables do not persist across tool calls.

    Keep the write and read in the same Bash call, or pass a concrete report path between calls; shell variables do not persist across tool calls.
  3. 03

    Step 2: Apply Fixes Based on Codex Feedback

    When the user asked to apply fixes, handle each issue identified by Codex: 1. Read the relevant file 2. Apply the fix using Edit tool 3. Verify the fix addresses Codex's concern

    Read the relevant fileApply the fix using Edit toolVerify the fix addresses Codex's concern
  4. 04

    Step 3: Re-verify with Codex (Optional)

    Review the “Step 3: Re-verify with Codex (Optional)” section in the pinned source before continuing.

    Review and apply the “Step 3: Re-verify with Codex (Optional)” source section.
  5. 05

    Workflow Examples

    Review the “Workflow Examples” section in the pinned source before continuing.

    Review and apply the “Workflow Examples” source section.

Permission review

Static risk signals and limitations

Reads files

low · line 34

The documentation asks the agent to read local files, directories, or repositories.

Read the relevant file

Runs scripts

medium · line 68

The documentation asks the agent to run terminal commands or scripts.

git diff HEAD~1 > "$DIFF_REPORT"

Reads files

low · line 130

The documentation asks the agent to read local files, directories, or repositories.

**Read file** - Use Read tool to see current code

Runs scripts

medium · line 140

The documentation asks the agent to run terminal commands or scripts.

npm install -g @openai/codex

Writes files

medium · line 164

The documentation asks the agent to create, modify, or delete local files.

| `-o <path>` | Save output to file |

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score92/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars249SourceRepository attention, not individual Skill quality
Compatibility1 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
majiayu000/spellbook
Skill path
skills/codex-agent/SKILL.md
Commit
01c5d88b0139a80ac38bfe7206ea99f28b0fc999
License
MIT
Collected
2026-08-04
Default branch
main
View the original SKILL.md

Codex Agent Collaboration Skill

This skill enables Claude Code to collaborate with OpenAI's Codex CLI agent for second-opinion review, cross-verification, debugging analysis, and alternative implementation proposals.

Default posture: Codex reviews in read-only; the primary agent applies changes only when the user asked for fixes or approved them after reading the review.

Optional Codex Review Workflow

Use this workflow when the user asks for Codex review, wants a second opinion, or needs cross-verification from a separate coding agent.

Step 1: Call Codex and Read Feedback

REPORT="$(mktemp -t codex-review.XXXXXX.md)"
codex exec -C <project_path> -s read-only -o "$REPORT" \
  "Review the code in <file_or_directory>. Check for:
   - Security vulnerabilities
   - Performance issues
   - Code quality and best practices
   - Potential bugs and edge cases
   - Naming and readability
   Provide specific, actionable feedback with file paths and line numbers."

cat "$REPORT"

Keep the write and read in the same Bash call, or pass a concrete report path between calls; shell variables do not persist across tool calls.

Step 2: Apply Fixes Based on Codex Feedback

When the user asked to apply fixes, handle each issue identified by Codex:

  1. Read the relevant file
  2. Apply the fix using Edit tool
  3. Verify the fix addresses Codex's concern

If the user only asked for a review or second opinion, report findings without editing files.

Step 3: Re-verify with Codex (Optional)

codex exec -C <project_path> -s read-only \
  "Verify the fixes applied to <files>. Confirm issues are resolved."

Workflow Examples

Example 1: Review and Fix a Single File

# Step 1: Get Codex review
REPORT="$(mktemp -t codex-review.XXXXXX.md)"
codex exec -C /project -s read-only -o "$REPORT" \
  "Review src/auth/login.ts for security vulnerabilities and code quality issues. Provide specific line numbers and fixes."

# Step 2: Read the feedback
cat "$REPORT"

Then the primary agent reads the feedback, applies fixes with Edit tool, and optionally re-verifies.

Example 2: Review Recent Changes

# Get diff of recent changes
DIFF_REPORT="$(mktemp -t recent-changes.XXXXXX.diff)"
git diff HEAD~1 > "$DIFF_REPORT"

# Step 1: Have Codex review the diff
REPORT="$(mktemp -t codex-review.XXXXXX.md)"
codex exec -C /project -s read-only -o "$REPORT" \
  "Review the changes saved at $DIFF_REPORT. Check for bugs, security issues, and improvements needed."

# Step 2: Read and apply fixes
cat "$REPORT"

Example 3: Full Project Review

# Step 1: Comprehensive review
REPORT="$(mktemp -t codex-review.XXXXXX.md)"
codex exec -C /project -s read-only -o "$REPORT" \
  "Perform a comprehensive code review of src/. Focus on:
   1. Security vulnerabilities (OWASP Top 10)
   2. Error handling patterns
   3. Performance bottlenecks
   4. Code duplication
   Prioritize issues by severity (critical/high/medium/low)."

# Step 2: Read prioritized feedback
cat "$REPORT"

Review Request Format

When asking Codex for review, include:

Review <target_files_or_directory>.

Context:
- Project type: <TypeScript/Python/etc>
- Framework: <Express/React/etc>
- Focus areas: <security/performance/quality>

Check for:
1. Security vulnerabilities
2. Performance issues
3. Error handling
4. Code quality
5. Edge cases

Output format:
For each issue:
- File: <path>
- Line: <number>
- Severity: critical/high/medium/low
- Issue: <description>
- Fix: <specific code change>

Applying Fixes

After receiving Codex feedback, apply fixes systematically:

  1. Parse the review - Extract each issue with file, line, severity
  2. Prioritize - Fix critical/high issues first
  3. Read file - Use Read tool to see current code
  4. Apply fix - Use Edit tool with precise old_string/new_string
  5. Track progress - Mark each issue as fixed

Prerequisites

Codex CLI must be installed and authenticated:

# Install via npm
npm install -g @openai/codex

# Or via Homebrew (macOS)
brew install --cask codex

# Authenticate
codex login

Command Reference

Basic Command Pattern

codex exec [options] "<task_description>"

Core Options

OptionDescription
"<task>"Task description (positional, must be quoted)
-C <dir>Working directory (use absolute path)
-s read-onlyRead-only sandbox (use for reviews)
-o <path>Save output to file
--jsonOutput as JSON Lines

AI-to-AI Communication

When communicating with Codex, PRIORITIZE ACCURACY AND PRECISION:

  • Use structured data and exact technical terms
  • Provide full file paths and precise details
  • Include relevant context from the current codebase
  • NO conversational formatting needed

Other Use Cases

Cross-Verification (after Claude implements)

codex exec -C /project -s read-only \
  "Verify the implementation in src/feature/. Check correctness and edge cases."

Get Alternative Implementation

REPORT="$(mktemp -t codex-alternative.XXXXXX.md)"
codex exec -C /project -s read-only -o "$REPORT" \
  "Propose an alternative implementation for the caching in src/cache/manager.ts"
cat "$REPORT"

Debugging Assistance

codex exec -C /project -s read-only \
  "Debug: tests in tests/auth.test.ts failing with timeout. Analyze root cause."

Session Management

For multi-turn reviews:

# Initial review
codex exec -C /project -s read-only "Review src/api/ for security issues"
# Note session ID from output

# Follow-up after fixes
codex exec resume <session_id> "I've applied the fixes. Please re-verify."

Helper Scripts

  • scripts/check-codex.sh checks whether the Codex CLI is installed and authenticated.
  • scripts/codex-wrapper.sh is optional. Use it only when you need a small CLI wrapper; it executes Codex through shell arrays and must not use eval.

Gotchas

  • Do not write reviews to fixed paths such as /tmp/codex-review.md; use mktemp or a project-specific private report path so concurrent projects cannot overwrite or read stale feedback.
  • Keep Codex review commands in read-only unless the user explicitly asked Codex itself to edit.
  • Treat danger-full-access, --dangerously-bypass-approvals-and-sandbox, --dangerously-bypass-hook-trust, and --skip-git-repo-check as high-impact flags. Ask before using them.
  • Do not blindly apply every Codex suggestion. Re-read the target file, confirm the root cause, and verify the final behavior.

Troubleshooting

Authentication Issues

codex logout
codex login

Check Installation

codex --version
which codex

See Also

Alternatives

Compare before choosing