Pre-action boundary checking — validates agent tool calls against declared capabilities and task contracts
日本語の概要は準備中です。原文の説明を表示しています。
Execute OpenAI Codex CLI prompts and return results
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Execute OpenAI Codex CLI prompts in non-interactive mode and return structured results. Enables Claude + Codex hybrid workflows.
<prompt> Required. The prompt to send to Codex CLI
--json Return structured JSON Lines output
--output <path> Save final message to file
--model <name> Model override (default: Codex CLI default model)
--timeout <ms> Execution timeout (default: 120000, max: 600000)
--full-auto Enable auto-approval mode (codex -a full-auto)
--working-dir Working directory for Codex execution
--effort <level> Set reasoning effort level (minimal, low, medium, high, xhigh)
Maps to Codex CLI's model_reasoning_effort config
Default: uses Codex CLI's configured default
Recommended: xhigh for research/analysis tasks
1. Pre-checks
- Verify `codex` binary is installed (which codex || npx codex --version)
- Verify authentication (OPENAI_API_KEY or logged in)
2. Build command
- Base: codex exec --ephemeral "<prompt>"
- Apply options: --json, --model, --full-auto, -C <dir>
- Set --working-dir if specified
3. Execute
- Run via Bash tool with timeout (default 2min, max 10min)
- Or use helper script: node .claude/skills/codex-exec/scripts/codex-wrapper.cjs
4. Parse output
- Text mode: return raw stdout
- JSON mode: parse JSON Lines, extract final assistant message
5. Report results
- Format output with execution metadata
--ephemeral: No session persistence (conversations not saved)--full-auto only when explicitly requested[Codex Exec] Completed
Model: (default)
Duration: 23.4s
Working Dir: /path/to/project
--- Output ---
{codex response text}
[Codex Exec] Completed (JSON)
Model: (default)
Duration: 23.4s
Events: 12
--- Final Message ---
{extracted final assistant message}
[Codex Exec] Failed
Error: {error_message}
Exit Code: {code}
Suggested Fix: {suggestion}
For complex executions, use the wrapper script:
node .claude/skills/codex-exec/scripts/codex-wrapper.cjs --prompt "your prompt" [options]
The wrapper provides:
# Simple text prompt
codex-exec "explain what this project does"
# JSON output with model override
codex-exec "list all TODO items" --json
# Save output to file
codex-exec "generate a README" --output ./README.md
# Full auto mode with custom timeout
codex-exec "fix the failing tests" --full-auto --timeout 300000
# Specify working directory
codex-exec "analyze the codebase" --working-dir /path/to/project
Works with the orchestrator pattern:
codex-exec requires the Codex CLI binary to be installed and authenticated. The skill is only usable when:
codex binary is found in PATH (which codex succeeds)codex logged in)If either check fails, this skill cannot be used. Fall back to Claude agents for the task.
Note: This skill is invoked via
/codex-execcommand, delegated by the orchestrator, or suggested by routing skills when codex is available. The intent-detection system can trigger it for research (xhigh) and code generation (hybrid) workflows.
When used within Agent Teams (requires explicit invocation):
Orchestrator delegates generation task
→ /codex-exec invoked explicitly
→ Output returned to orchestrator
→ Reviewer validates quality
→ Iterate if needed
When the orchestrator or intent-detection detects a research/information gathering request (routing_rule in agent-triggers.yaml):
codex binary and OPENAI_API_KEY/codex-exec "Research and analyze: {topic}. Provide structured findings with sources." --effort xhigh --full-auto --json
| Level | Use Case | Speed | Depth |
|---|---|---|---|
| minimal | Quick lookups | Fastest | Surface |
| low | Simple queries | Fast | Basic |
| medium | General tasks | Balanced | Standard |
| high | Complex analysis | Slower | Deep |
| xhigh | Research & investigation | Slowest | Maximum |
When routing skills detect a code generation task and codex is available:
/tmp/.claude-env-status-*/codex-exec "Generate {description} following {framework} best practices" --effort high --full-auto
Codex가 생성/수정한 프론트엔드 결과를 시각적으로 검증하는 루프 패턴. 신규 스킬 불요 — 기존 도구 조합.
codex-exec "build/fix frontend"
→ bun dev / npm run dev (로컬 서버 기동)
→ claude-in-chrome:navigate(localhost:port)
→ claude-in-chrome:gif_creator(action capture)
→ claude-in-chrome:read_console_messages (오류 감지)
→ claude-in-chrome:read_network_requests (실패 호출 감지)
→ 오류 있으면: codex-exec "fix: {error context}" → 루프 재진입
→ 오류 없으면: 종료 + 결과 보고
| 상황 | 권장 |
|---|---|
| 단순 코드 생성 | codex-exec 단독 |
| 프론트엔드 시각 검증 필요 | 이 루프 |
| API/백엔드 검증 | deep-verify skill |
| 복잡한 디자인 시스템 | design-shotgun 병행 |
| 단계 | 도구 |
|---|---|
| Build/Fix | codex-exec |
| Server | Bash(bun dev) (background) |
| Visual | mcp__claude-in-chrome__navigate + gif_creator |
| Diagnose | read_console_messages + read_network_requests |
자세한 구현 패턴: guides/browser-automation/01-browser-automation-patterns.md 참조.
Tool: Use the Write tool for any artifact files this loop produces — never Bash mkdir on
.claude/outputs/.
CC sensitive-path check inspects tool target paths and triggers permission prompts on .claude/ regardless of bypassPermissions and allow rules (refs: #960, #961, #978, #981, #1016).
To write codex execution results under .claude/outputs/codex/:
/tmp/codex-{HHmmss}.{ext} first (Write tool target = /tmp, no sensitive-path trigger)/tmp/*.sh Bash script to move/copy the file under .claude/outputs/codex/sessions/... (Bash target = /tmp, script-internal cp to .claude/ is not audited).claude/outputs/ (e.g., cat, head, wc) is allowed for verificationReference: feedback_sensitive_path_tmp_bypass.md, R006 sensitive-path handling.
Pattern source: Codex Browser Use (https://x.com/jameszmsun/status/2047522852854026378), scout #1009.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Pre-action boundary checking — validates agent tool calls against declared capabilities and task contracts
日本語の概要は準備中です。原文の説明を表示しています。
Auto-detect project context and optimize harness — deactivate unused agents/skills, suggest missing experts, generate project profile
日本語の概要は準備中です。原文の説明を表示しています。
Adversarial code review using attacker mindset — trust boundary, attack surface, business logic, and defense evaluation
日本語の概要は準備中です。原文の説明を表示しています。
Apache Airflow best practices for DAG authoring, testing, and production deployment
日本語の概要は準備中です。原文の説明を表示しています。
Alembic migration patterns for naming conventions, safety checks, expand-contract, env.py configuration, and CI integration
日本語の概要は準備中です。原文の説明を表示しています。
Pre-routing ambiguity analysis — scores request clarity and asks clarifying questions when needed (inspired by ouroboros)
日本語の概要は準備中です。原文の説明を表示しています。