
codex
by ohaddahan
SKILL.md
name: codex description: Send prompts to OpenAI Codex CLI and process the output. Use /codex to invoke Codex, then Claude analyzes, reviews, or integrates the results. user-invocable: true allowed-tools: Bash(codex:), Bash(cat:), Read, Glob, Grep, AskUserQuestion, Edit, Write
Codex Integration Skill
Purpose
This skill enables a collaborative workflow between Claude and OpenAI's Codex CLI. Send prompts to Codex, capture its output, and have Claude process the results.
How to Use
Invoke with: /codex <your prompt here>
If no prompt is provided, ask the user what they want Codex to do.
Execution Flow
Step 1: Determine the prompt
If the user provided a prompt after /codex, use it. Otherwise, ask them what task they want Codex to perform.
Step 2: Ask for processing mode
Ask the user how they want Claude to process Codex's output:
- Review - Analyze Codex's solution for correctness, security, performance, and best practices
- Compare - Have Claude solve the same problem, then compare approaches
- Integrate - Take Codex's output and integrate it into the codebase with Claude's refinements
- Raw - Just show Codex's output without additional processing
Step 3: Execute Codex
Run Codex in non-interactive mode with the user's prompt.
First, create a unique output file to avoid collisions with parallel invocations:
CODEX_OUTPUT=$(mktemp /tmp/codex-output-XXXXXX.json)
Then execute Codex:
codex exec --full-auto --json "<prompt>" 2>&1 | tee "$CODEX_OUTPUT"
Or as a single command:
CODEX_OUTPUT=$(mktemp /tmp/codex-output-XXXXXX.json) && codex exec --full-auto --json "<prompt>" 2>&1 | tee "$CODEX_OUTPUT" && echo "Output saved to: $CODEX_OUTPUT"
Options to consider:
--full-auto: Enables automatic execution with workspace-write sandbox--json: Outputs structured JSONL for easier parsing--sandbox read-only: For safer execution when reviewing only-m <model>: Specify a different model (e.g.,o3,o4-mini)
Step 4: Process the output based on mode
Review Mode
- Parse the Codex output
- Identify any code changes or suggestions made
- Analyze for:
- Correctness: Does it solve the stated problem?
- Security: Any vulnerabilities introduced?
- Performance: Efficiency concerns?
- Best practices: Follows project conventions?
- Edge cases: Are they handled?
- Provide a structured review with recommendations
Compare Mode
- First, read and understand Codex's solution
- Independently solve the same problem as Claude
- Compare both approaches:
- Similarities and differences
- Trade-offs of each approach
- Which is more maintainable/readable
- Which handles edge cases better
- Recommend which approach (or hybrid) to use
Integrate Mode
- Parse Codex's output for code changes
- Review the changes for quality and correctness
- Make refinements based on:
- Project coding standards
- Security best practices
- Performance optimizations
- Better naming/structure
- Apply the refined changes to the codebase
- Summarize what was changed
Raw Mode
- Display the Codex output directly
- Offer to do further processing if requested
Output Parsing
Codex --json output is JSONL format. Key event types:
message_output_item_added: Contains agent messages and tool callsmessage_output_item_done: Completed itemsresponse_completed: Final response
Extract code changes from code_interpreter tool calls or direct file modifications.
Error Handling
- If Codex fails to run, check that it's installed and authenticated
- If execution times out, suggest using
--sandbox read-onlyor a simpler prompt - If output is too large, summarize key points and offer to dive into specifics
Example Invocations
/codex fix the type error in auth.ts/codex add input validation to the user form/codex refactor the database queries for better performance
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です