joogy06/agent-foundry/codex-orchestration
Claude Code and agent skill by joogy06/agent-foundry
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Use when delegating tasks to Codex CLI (OpenAI GPT-5.6) or Antigravity CLI (agy) from Claude Code — research tasks, challenger/devil's advocate reviews, prototyping, idea generation, code review, second-opinion analysis. Covers Codex plugin commands, codex exec (incl. per-call reasoning-effort tiers), and agy -p headless mode. Triple-model orchestration for Claude + Codex + Antigravity (agy).
Install
npx vskill@latest install joogy06/agent-foundry/codex-orchestrationSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Cross-Model Orchestration — Claude + Codex + Antigravity (agy)
Delegate tasks to Codex CLI (GPT-5.6-sol) and the Antigravity CLI (`agy`) from Claude Code for second opinions, parallel research, challenger reviews, and idea generation. Each model runs as an independent agent with its own context, tools, and reasoning — different models catch different things.
<HARD-RULE> Pin reasoning effort PER CALL on every codex exec delegation: -c model_reasoning_effort=<tier> (see "Reasoning-Effort Tiers" below). Never rely on the config default — ~/.codex/config.toml holds whatever the interactive TUI last persisted, so an unpinned headless call can silently run anywhere from none to max. </HARD-RULE>
<HARD-RULE> Always check Codex availability before delegating. Read tools.codex.installed from ~/.claude/state/inventory.json (written by env-adoption skill). If the inventory is missing, run bash ~/.claude/skills/env-adoption/scripts/probe.sh check --inventory-only --silent first. If tools.codex.installed is false, fall back to Claude Code agents. </HARD-RULE>
<HARD-RULE> Never pass secrets, API keys, or credentials in Codex prompts. Prompts may be logged in ~/.codex/sessions/ and ~/.codex/history.jsonl. Use environment variables or file references instead. </HARD-RULE>
<HARD-RULE> Always use --ephemeral for orchestration tasks to avoid polluting Codex session history. Orchestration calls are fire-and-forget — they don't need persistent sessions. </HARD-RULE>
<HARD-RULE> </HARD-RULE>
Codex Plugin Commands (Primary Interface)
The Codex plugin (codex@openai-codex) provides first-class slash commands for structured Codex interaction. Prefer plugin commands over raw `codex exec` for reviews, task delegation, and managed workflows.
| Command | Purpose | Replaces | |
|---|---|---|---|
/codex:review | Code review against git diffs | Manual codex exec review briefs | |
/codex:adversarial-review | Challenge review (design, tradeoffs) | Manual challenger briefs | |
/codex:rescue | Delegate investigation/fix to Codex | codex exec task delegation | |
/codex:setup | Check readiness, toggle review gate | Manual codex --version check | |
/codex:status | Track background jobs | No equivalent (was fire-and-forget) | |
/codex:result | Retrieve finished job output | Manual -o file reading | |
/codex:cancel | Cancel running jobs | No equivalent |
When to Use Plugin vs Raw codex exec
| Use Plugin Commands | Use Raw codex exec | |
|---|---|---|
Code reviews (/codex:review) | Parallel batch tasks with & and wait | |
| Adversarial/challenger reviews | Custom brief files with skill injection | |
Task delegation (/codex:rescue) | Structured output schemas (--output-schema) | |
| Background job management | Streaming JSONL events (--json) | |
Resume prior Codex threads (--resume) | MCP server mode (codex mcp-server) |
Plugin commands handle job lifecycle (tracking, resume, cancel). Raw `codex exec` is better for parallel orchestration and custom prompt engineering.
Antigravity CLI (agy) — Primary Interface
The Antigravity CLI (agy) is this host's second-opinion / challenger / research delegate. It authenticates itself via the Antigravity account — no API key or env prefix needed. There is no MCP server: call agy directly via Bash. See the antigravity-cli skill for the full reference.
Headless single-prompt mode:
- STDIN RULE (mandatory, #135):
< /dev/nullon every headless agy call — agy reads
non-TTY stdin until EOF before the model call; background/harness shells never EOF → infinite hang at 0 bytes (--print-timeout does not protect; it guards only the print phase). Piped input (cat file | agy -p) is safe (the pipe EOFs). Always wrap in shell timeout. Same behavior class as codex exec's stdin-block.
- FLAG ORDER RULE (mandatory, root-caused 2026-07-02): every flag BEFORE
-p, prompt LAST.
-p is a string flag and consumes the next token — agy -p --sandbox "X" runs UN-sandboxed with the literal prompt --sandbox and discards "X", after which agy improvises from its implicit memory (the "does work instead of consulting" failure mode) and can fork-bomb re-testing the broken command. Correct: agy --sandbox [--add-dir D] [--print-timeout 15m] -p "…".
- SANDBOX RULE (mandatory for analyst/read-only delegation, #157):
--sandboxon every agy
call that should only READ — agy has write/shell/git tools by default, and an un-sandboxed "analyst" can author and git-commit code (S052 rogue auto-commit incident). Scope caveat (verified 2026-07-02, 1.0.15): --sandbox constrains shell/git commands only, NOT agy's native file writes — do not --add-dir a writable live repo for consultancy (pipe content instead), open the prompt with "Advisory only — do not modify any files; answer on stdout", and run git status --short afterwards if a repo was exposed. Omit --sandbox only when the task explicitly requires writes, and say so in the prompt.
- Output is plain text on stdout — there are no structured response fields. Callers must parse text, not JSON.
agyuses the Antigravity-account default model by convention — as of 1.0.5+ (current 1.1.6) a--modelflag and anagy modelssubcommand DO exist (there is no short-malias), but omit--modelunless a call explicitly needs a specific model. The account default is `gemini-3.6-flash` (verified 2026-07-24), so omitting the flag rides the current line automatically. FLASH-ONLY HARD-RULE (user directive 2026-07-24): agy runs gemini flash models ONLY. ✅gemini-3.6-flash-{high,medium,low}(current) /gemini-3.5-flash-*(legacy). ❌ FORBIDDEN with no carve-out:claude-sonnet-4-6,claude-opus-4-6-thinking,gpt-oss-120b-medium, and `gemini-3.1-pro-{high,low}`. Reasons: (1) provider diversity — agy holds the third-model slot because it is neither Anthropic nor OpenAI; repointing it atclaude-sonnet-4-6(the tempting "fix" for an agy no-show) collapses the cross-check into an echo, andgpt-oss-*collapses into the Codex arm; (2) flash-tier discipline — agy is advisory-tier, so don't reach for pro. On a no-show: retry under the STDIN/FLAG-ORDER/Pattern-2 rules, then record the provider gap honestly — there is no gemini fallback (retired 2026-07-25). Escalate to another arm rather than repointing agy.- For long-running prompts raise the wait timeout:
agy --print-timeout 15m -p "<prompt>" < /dev/null(default5m0s). Keep< /dev/nulleven here —--print-timeoutonly guards the print phase, NOT the stdin read, so omitting it still hangs to the shelltimeout(#135). - Append a
served_byprobe line to the prompt if you need provenance — self-reported model identity is unreliable, so capture it at the call layer.
Use cases (all via a single agy -p call): research, analysis, code review, large-file analysis, and brainstorming (frame the methodology — SCAMPER, Design Thinking, Divergent, Convergent, Lateral — directly inside the prompt text, since there is no dedicated brainstorm tool).
agy -p invocation patterns
agy Availability Check
Cache for the session like the Codex check. Both can be checked in parallel at session start.
Reasoning-Effort Tiers (benchmarked 2026-07-11)
Measured on gpt-5.6-sol / codex-cli 0.144.1 with planted-bug review fixtures (14 scored runs, easy + hard rounds + a delta-seeking challenger round). Every tier found all planted bugs with zero false positives; the only quality separations were (a) one subtle unplanted defect caught only at xhigh/max under a plain review prompt, and (b) finding ALTITUDE under a delta-seeking prompt — medium returned concrete-bug deltas, xhigh added state-consistency reasoning, max alone produced a design-level finding. high never beat medium in any run — skip it. ultra matched max's findings at 2.3x the time on bounded tasks; it exists for orchestrated deep dives, not verdicts.
| Tier | Use for | Typical wall-clock | Shell timeout | |
|---|---|---|---|---|
medium | Inner-loop delta passes, mechanical consults, smoke checks | ~25–40s | 600s | |
xhigh | Challenger, QC, devil's advocate, Gate-1 ballots, arbiter verdicts (FLOOR for these roles) | ~2–2.5 min | 600s | |
max | Conceptual/direction reviews, design ratification, stuck-after-2-attempts escalation, post-incident analysis | ~5–7 min | 1200s | |
ultra | Deliberate orchestrated deep-dives ONLY (codex spawns its own agents; rewrite the prompt contract for fan-out) | 10–30 min | 1800s+ |
Delta-seeking challenger prompt (the honest-loop contract). Prompt shape matters as much as tier: telling codex "the basics are done" reallocates attention to the tail — at medium this recovered a subtle bug that a plain review prompt missed even at high. Template to embed in challenger briefs:
A prior review already found:<findings list>. Your ONLY job: find genuine defects theprior review MISSED. Do not repeat, rephrase, or elaborate on listed findings. Inventinga finding to have something to say is a failure mode; if you find nothing genuinely new,output exactly: NONE_FOUND
Operational notes:
- Retry ONCE on
Selected model is at capacity(transient; fails within ~2s, so the retry is cheap). - Keep
-s read-onlyon every consultancy call: atmax, codex has run unrequested
read-only shell detours (reading its own skill files) despite an explicit "do not browse the filesystem" instruction — the sandbox contained it.
max/ultraworkflow stages need raised timeouts (1200s/1800s), not the default 600s.
Three-Model Validation Pattern
For COMPLEX tasks, run all three models for maximum coverage:
| Model | Role | Strength | |
|---|---|---|---|
| Claude (Fable 5) | Orchestrator, architect | 1M context, skills/agents, MCP, conversation memory | |
| Codex (GPT-5.6-sol) | Challenger, code review | Independent perspective, web search, structured review output | |
Antigravity (agy) | Analyst, research | Independent third-model perspective, headless agy -p delegation, brainstorming |
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/codex-orchestration/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 5
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/joogy06/agent-foundry/codex-orchestration)