codex-companion
/codex-companion
OpenAI Codex / GPT-6 Astra integration for Claude Code. Use when the user says "consult with openai", "talk to codex", "ask gpt-6", "get a second opinion from openai", "delegate to codex", "openai review", or "codex rescue". Provides code reviews, adversarial reviews, rescue operations (when Claude is stuck), and GPT-6 Astra task delegation with structured prompting. Runs the baked Codex CLI under the current profile; auth resolves from ~/.codex ([consultants.codex]) wired by the entrypoint. NOT for non-code tasks (research/content/design → dedicated skills), simple one-off edits Claude can fi
- Author
- dreamlab-ai ↗
- Repository
- agentbox ↗
- Licence
- AGPL-3.0
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 25
- Scripts
- 9
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.
- 9 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: references/diverged-patches/scripts/codex-companion.mjs, references/diverged-patches/scripts/lib/app-server-protocol.d.ts, references/diverged-patches/scripts/lib/app-server.mjs, references/diverged-patches/scripts/lib/codex.mjs, references/diverged-patches/scripts/lib/git.mjs, references/diverged-patches/scripts/lib/job-control.mjs, references/diverged-patches/scripts/lib/process.mjs, references/
What it does and when to use it
OpenAI Codex / GPT-6 Astra integration for Claude Code. Use when the user says "consult with openai", "talk to codex", "ask gpt-6", "get a second opinion from openai", "delegate to codex", "openai review", or "codex rescue". Provides code reviews, adversarial reviews, rescue operations (when Claude is stuck), and GPT-6 Astra task delegation with structured prompting. Runs the baked Codex CLI under the current profile; auth resolves from ~/.codex ([consultants.codex]) wired by the entrypoint. NOT for non-code tasks (research/content/design → dedicated skills), simple one-off edits Claude can fi
Triggers from the description
Original author description
OpenAI Codex / GPT-6 Astra integration for Claude Code. Use when the user says "consult with openai", "talk to codex", "ask gpt-6", "get a second opinion from openai", "delegate to codex", "openai review", or "codex rescue". Provides code reviews, adversarial reviews, rescue operations (when Claude is stuck), and GPT-6 Astra task delegation with structured prompting. Runs the baked Codex CLI under the current profile; auth resolves from ~/.codex ([consultants.codex]) wired by the entrypoint. NOT for non-code tasks (research/content/design → dedicated skills), simple one-off edits Claude can fi
How it works
- When to Use This Skill
- When Not to Use
- Container Integration
- Commands
- Rescue Agent
- Codex Prompting Patterns
- Review Output Schema
- Hooks
- Environment Variables
- Setup
SKILL.md preview
--- name: codex-companion description: > OpenAI Codex / GPT-6 Astra integration for Claude Code. Use when the user says "consult with openai", "talk to codex", "ask gpt-6", "get a second opinion from openai", "delegate to codex", "openai review", or "codex rescue". Provides code reviews, adversarial reviews, rescue operations (when Claude is stuck), and GPT-6 Astra task delegation with structured prompting. Runs the baked Codex CLI under the current profile; auth resolves from ~/.codex ([consultants.codex]) wired by the entrypoint. NOT for non-code tasks (research/content/design → dedicated skills), simple one-off edits Claude can finish alone, or DeepSeek reasoning (→ deepseek-reasoning). From openai/codex-plugin-cc. version: 1.0.0 author: OpenAI (adapted for Agentbox) tags: - codex - openai - gpt-6 - review - rescue - adversarial env_vars: - OPENAI_API_KEY --- # Codex Companion OpenAI's official Codex plugin for Claude Code, adapted for the Agentbox container. Delegates code review, adversarial review, and rescue tasks to GPT-6 Astra via the Codex CLI. ## When to Use This Skill - **Code review**: Get a Codex review of your git changes (working tree or branch) - **Adversarial review**: Challenge your implementation approach and design choices - **Rescue**: When Claude is stuck, hand the task to Codex for a second opinion - **GPT-6 Astra delegation**: Offload substantial coding, debugging, or research tasks - **Cross-model validation**: Use Codex as a check on Claude's work ## When Not to Use - For simple tasks Claude can finish quickly — don't add Codex overhead - For non-code tasks (research, content, design) — use dedicated skills instead - For DeepSeek reasoning — use `deepseek-reasoning` skill instead - If OPENAI_API_KEY is not configured — run `/codex:setup` first ## Container Integration Codex runs under the current tmux profile — there is no separate pseudo-user (the `openai-user`/`as-openai`/UID-1002 model is retired). The baked Codex CLI reads its credentials from `CODEX_HOME` (`~/.codex`), where the entrypoint wires `[consultants.codex]` auth and the `agentbox-memory` MCP server on first boot. Set `OPENAI_API_KEY` in the environment only if you are overriding that baked auth. ```bash # Codex commands run in-place; no user switch needed /codex:review # Review working tree changes /codex:adversarial-review # Challenge the implementation approach /codex:rescue [task] # Hand a stuck task to Codex /codex:status # Check Codex job status /codex:result # Get last Codex result /codex:cancel # Cancel running Codex job ``` ## Commands | Command | Description | |---------|-------------| | `/codex:review` | Code review of git changes (working tree or branch) | | `/codex:adversarial-review` | Challenge implementation, design choices, tradeoffs | | `/codex:rescue [task]` | Delegate investigation or fix to Codex when stuck | | `/codex:status` | Check Codex job progress | | `/codex:result` | Retrieve last Codex output | | `/codex:cancel` | Cancel running Codex job | | `/codex:setup` | Configure Codex CLI and API key | ## Rescue Agent The `codex-rescue` subagent activates proactively when: - Claude Code is stuck on a debugging task - A second implementation pass would help - Deeper root-cause investigation is needed - A substantial coding task should be delegated The rescue agent uses this skill's bundled prompting reference library (`references/codex-prompting/` — prompt blocks, recipes, and antipatterns) to compose tight, structured Codex prompts with XML tags, output contracts, and verification loops. ## Codex Prompting Patterns The skill includes a reference library for composing effective Codex prompts: | Pattern | Use Case | |---------|----------| | `<task>` + `<completeness_contract>` + `<verification_loop>` | Coding / debugging | | `<task>` + `<grounding_rules>` + `<structured_output_contract>` | Review tasks | | `<task>` + `<research_mode>` + `<citation_rules>` | Research / recommendations | | `<task>` + `<action_safety>` | Write-capable tasks (prevents unrelated refactors) | ## Review Output Schema Reviews follow a structured JSON schema (`review-output.schema.json`) with: - Severity levels (critical, major, minor, suggestion) - Category classification (bug, security, performance, design, style) - File + line references - Confidence scores ## Hooks - **SessionStart/SessionEnd**: Lifecycle management for Codex companion state - **Stop**: Review gate — optionally triggers a Codex review before session ends ## Environment Variables | Variable | Required | Description | |----------|----------|-------------| | `OPENAI_API_KEY` | No | Optional override; auth normally resolves from `~/.codex` (`[consultants.codex]`) wired by the entrypoint | | `CODEX_MODEL` | No | Override model (default: GPT-6 Astra; `spark` maps to `gpt-5.3-codex-spark`, the literal alias baked into the plugin's `MODEL_ALIASES` — verified against `/opt/agentbox/plugins/codex-plugin-cc/plugins/codex/scripts/codex-companion.mjs` on 2026-09-09, not an editorial claim about the current flagship model) | ## Setup ```bash # Auth is wired by the entrypoint (~/.codex / [consultants.codex]); no setup # is normally needed. To (re)configure the Codex CLI or supply your own key: /codex:setup # Verify: /codex:status ``` ## Two consultation paths (addendum 2026-09-08) The consultant model is **`gpt-6-astra`**. Path 1 (MCP `consultant-codex` → `consult`) takes a pasted excerpt; Path 2 (direct `codex exec`) reads a whole repository or document bundle itself. Full comparison table, the verified Path 2 recipe, and the gotchas that cost a run each (read-only sandbox, approval policy, stdin hang, "Context I still need"): [references/codex-exec-recipe.md](references/codex-exec-recipe.md). ## Runtime note The `/codex:*` commands run from the baked plugin at `/opt/agentbox/plugins/codex-plugin-cc`; behavioural fixes go through the flake overlay, not this skill. ## Integration with Other Skills | Skill | Relationship | |-------|-------------| | `openai-codex` | Legacy MCP bridge — codex-companion is the full-featured replacement | | `build-with-quality` | BWQ can delegate review phases to Codex for cross-model validation | | `github-code-review` | Codex reviews complement Claude reviews for multi-perspective analysis | | `vanity-engineering-review` | Run adversarial review first, then vanity check for over-engineering | ## Attribution Codex Plugin for Claude Code by OpenAI. Apache 2.0 License.
Files in this package (25)
- CHANGELOG.md 1 KB
- LICENSE 11 KB
- NOTICE 1 KB
- SKILL.md 6 KB
- references/codex-exec-recipe.md 3 KB
- references/codex-prompting/overview.md 4 KB
- references/codex-prompting/references/codex-prompt-antipatterns.md 1 KB
- references/codex-prompting/references/codex-prompt-recipes.md 4 KB
- references/codex-prompting/references/prompt-blocks.md 4 KB
- references/diverged-patches/README.md 5 KB
- references/diverged-patches/agents/codex-rescue.md 3 KB
- references/diverged-patches/commands/cancel.md 1 KB
- references/diverged-patches/commands/rescue.md 3 KB
- references/diverged-patches/commands/result.md 1 KB
- references/diverged-patches/commands/status.md 1 KB
- references/diverged-patches/prompts/adversarial-review.md 3 KB
- references/diverged-patches/scripts/codex-companion.mjs 29 KB
- references/diverged-patches/scripts/session-lifecycle-hook.mjs 3 KB
- references/diverged-patches/scripts/stop-review-gate-hook.mjs 5 KB
- references/diverged-patches/scripts/lib/app-server-protocol.d.ts 2 KB
- references/diverged-patches/scripts/lib/app-server.mjs 10 KB
- references/diverged-patches/scripts/lib/codex.mjs 29 KB
- references/diverged-patches/scripts/lib/git.mjs 6 KB
- references/diverged-patches/scripts/lib/job-control.mjs 9 KB
- references/diverged-patches/scripts/lib/process.mjs 4 KB
Versions
The database has no other skills named codex-companion.
Database snapshot: 13.11.2026 · package version 833e1f7b58b1 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 4 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100codex-skill
Leverage OpenAI Codex/GPT models for autonomous code implementation, code review, and plan review. Triggers: "codex", "use gpt", "gpt-5", "let openai", "full-auto", "adversarial review", "second opinion review", "用codex", "让gpt实现", "对抗式审查", "让codex审查计划", "第二意见". Use this skill… - 100codex-rescue
Delegate an implementation task to Codex, then Claude reviews the result. Use when asked \"codex rescue\", \"delegate to codex\", \"have codex do it\", or wants Codex to implement or fix something. - 100second-opinion
Use when the user wants a second opinion or an outside review from OpenAI's GPT through the Codex CLI — phrases like "second opinion", "ask ChatGPT", "ask GPT", "ask Codex", "review with GPT", "what would GPT say", in any language. GPT only reads and answers; Claude shows its… - 100use-codex
Delegate independent codebase analysis, adversarial review, debugging, implementation, or patching to OpenAI Codex CLI as an external subagent. Use only when the user explicitly asks to use Codex, requests a Codex review or second opinion, or wants Codex to patch files. Route… - 90codex-delegate
Orchestrate an implementation task where Claude plans and coordinates while OpenAI Codex performs the actual code edits; plans are cross-reviewed with Codex at its highest reasoning effort before implementation. Use when the user asks to "use codex", "use gpt", "use gpt-5.5",… - 90codex
Ask OpenAI's Codex CLI for help — a second opinion, a code review or a delegated task. Use when the user says "/codex", "ask Codex", "have Codex do it" or "second opinion".