Codex Research Skill
This skill provides integration with OpenAI Codex CLI for research and code review tasks.
Prerequisites
- Codex CLI installed:
npm install -g @openai/codex - Authentication (one of):
- Run
codexto complete OAuth authentication, OR - Set
OPENAI_API_KEYenvironment variable
- Run
Available Scripts
All scripts are located in ${CLAUDE_PLUGIN_ROOT}/scripts/.
1. Check Installation
${CLAUDE_PLUGIN_ROOT}/scripts/check-codex.sh
Verifies Codex CLI is installed and authentication is configured (OAuth or API key).
2. Research Mode (codex exec)
${CLAUDE_PLUGIN_ROOT}/scripts/codex-exec.sh "your research question"
Use for:
- Technical research questions
- Documentation lookup
- Concept explanations
- Best practices inquiry
Example:
${CLAUDE_PLUGIN_ROOT}/scripts/codex-exec.sh "What is dependency injection and when should I use it?"
3. Code Review Mode
${CLAUDE_PLUGIN_ROOT}/scripts/codex-review.sh <target>
Options:
--staged- Review all uncommitted changes (staged + unstaged)<file>- Review specific file (usescodex review <file>)<directory>- Review directory (usescodex review <dir>)
Important: --staged uses codex exec review uncommitted which reviews all uncommitted changes, not just staged files. To review only specific files, use the file/directory target.
Examples:
${CLAUDE_PLUGIN_ROOT}/scripts/codex-review.sh --staged
${CLAUDE_PLUGIN_ROOT}/scripts/codex-review.sh src/main.ts
${CLAUDE_PLUGIN_ROOT}/scripts/codex-review.sh ./lib
Workflow
- First, verify Codex CLI is available using
check-codex.sh - For research tasks, use
codex-exec.shwith the research prompt - For code review, use
codex-review.shwith the target
Error Handling
- Timeout: Commands timeout after 120 seconds
- Not installed: Provides installation instructions
- Not authenticated: Prompts to complete OAuth or set OPENAI_API_KEY
Notes
This skill uses context: fork to isolate large outputs from the main conversation context.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.