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.
majiayu000/spellbook/skills/codex-agent/SKILL.md
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.
Decision brief
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.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Declared | Source record | Install path and trigger |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/majiayu000/spellbook --skill "skills/codex-agent"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
Use this workflow when the user asks for Codex review, wants a second opinion, or needs cross-verification from a separate coding agent.
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.
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
Review the “Step 3: Re-verify with Codex (Optional)” section in the pinned source before continuing.
Review the “Workflow Examples” section in the pinned source before continuing.
Permission review
The documentation asks the agent to read local files, directories, or repositories.
Read the relevant fileThe documentation asks the agent to run terminal commands or scripts.
git diff HEAD~1 > "$DIFF_REPORT"The documentation asks the agent to read local files, directories, or repositories.
**Read file** - Use Read tool to see current codeThe documentation asks the agent to run terminal commands or scripts.
npm install -g @openai/codexThe documentation asks the agent to create, modify, or delete local files.
| `-o <path>` | Save output to file |Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 92/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 249 | Source | Repository attention, not individual Skill quality |
| Compatibility | 1 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
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.
Use this workflow when the user asks for Codex review, wants a second opinion, or needs cross-verification from a separate coding agent.
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.
When the user asked to apply fixes, handle each issue identified by Codex:
If the user only asked for a review or second opinion, report findings without editing files.
codex exec -C <project_path> -s read-only \
"Verify the fixes applied to <files>. Confirm issues are resolved."
# 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.
# 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"
# 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"
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>
After receiving Codex feedback, apply fixes systematically:
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
codex exec [options] "<task_description>"
| Option | Description |
|---|---|
"<task>" | Task description (positional, must be quoted) |
-C <dir> | Working directory (use absolute path) |
-s read-only | Read-only sandbox (use for reviews) |
-o <path> | Save output to file |
--json | Output as JSON Lines |
When communicating with Codex, PRIORITIZE ACCURACY AND PRECISION:
codex exec -C /project -s read-only \
"Verify the implementation in src/feature/. Check correctness and edge cases."
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"
codex exec -C /project -s read-only \
"Debug: tests in tests/auth.test.ts failing with timeout. Analyze root cause."
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."
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./tmp/codex-review.md; use mktemp or a project-specific private report path so concurrent projects cannot overwrite or read stale feedback.read-only unless the user explicitly asked Codex itself to edit.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.codex logout
codex login
codex --version
which codex
Alternatives
wanshuiyin/Auto-claude-code-research-in-sleep
Use it for operations tasks; the detail page covers purpose, installation, and practical steps.
cameronfreer/lean4-skills
Use when editing .lean files, debugging Lean 4 builds (type mismatch, sorry, failed to synthesize instance, axiom warnings, lake build errors), searching mathlib for lemmas, formalizing mathematics in Lean, finding a counterexample to, refuting, or disproving a Lean statement, or learning Lean 4 concepts. Also trigger when the user asks for help with Lean 4, mathlib, or lakefile. Do NOT trigger for Coq/Rocq, Agda, Isabelle, HOL4, Mizar, Idris, Megalodon, or other non-Lean theorem provers.
PramodDutta/qaskills
Gate RAG pipelines in CI with versioned golden eval sets, per-metric thresholds, baseline drift detection, and a build that fails when retrieval or answer quality regresses.
PramodDutta/qaskills
Generate comprehensive test cases from state machine models covering all states, transitions, guard conditions, and invalid transition attempts for workflow-heavy features