| name | with |
| description | Routes tasks to external AI CLI agents (Codex, Gemini, Copilot) with automatic complexity-based model routing. Supports collaboration, delegation, and parallel execution modes. |
| argument-hint | <agent|all> <task description> |
| disable-model-invocation | true |
| context | fork |
| allowed-tools | Bash(codex *), Bash(gemini *), Bash(copilot *), Bash(mktemp *), Bash(cat *), Bash(rm *), Bash(wait *), Bash(which *), Read, Grep, Glob |
Agent Orchestration
์ธ๋ถ AI CLI ์์ด์ ํธ์ ์์
์ ์ ๋ฌํฉ๋๋ค. ๋ณต์ก๋๋ฅผ ์๋ ๋ถ์ํ์ฌ ์ต์ ์ ๋ชจ๋ธ/์ค์ ์ ์ ํํฉ๋๋ค.
When to Use
- ์ธ๋ถ AI ์์ด์ ํธ์ ์๊ฒฌ์ด๋ ๋ถ์์ด ํ์ํ ๋
- ํน์ ์์ด์ ํธ์ ๊ฐ์ ์ ํ์ฉํ๊ณ ์ถ์ ๋ (Codex: ์ฝ๋ ์คํ, Gemini: ์น ๊ฒ์, Copilot: GitHub)
- ์ฌ๋ฌ ์์ด์ ํธ์ ์๋ต์ ๋น๊ตํ์ฌ ์ต์ ์์ ๋์ถํ๊ณ ์ถ์ ๋
- ์์
์ ์ธ๋ถ ์์ด์ ํธ์ ์์ํ๊ณ ์ถ์ ๋
Agent Availability
- Codex: !
which codex 2>/dev/null && echo "available" || echo "not installed"
- Gemini: !
which gemini 2>/dev/null && echo "available" || echo "not installed"
- Copilot: !
which copilot 2>/dev/null && echo "available" || echo "not installed"
Supported Agents
| Agent | CLI | ๊ฐ์ | ๊ธฐ๋ณธ ๋ชจ๋ธ |
|---|
| Codex | codex | ์ฝ๋ ์์ฑ/์คํ, ๋๋ฒ๊น
, ์๋๋ฐ์ค | gpt-5.4 |
| Gemini | gemini | ์น ๊ฒ์, ๋ฆฌ์์น, ๋ฉํฐ๋ชจ๋ฌ | gemini-3.1-pro-preview |
| Copilot | copilot | GitHub ์ฐ๋, ๋ฉํฐ๋ชจ๋ธ ์ง์ | claude-sonnet-4.6 |
Instructions
1. Parse Arguments
$ARGUMENTS์์ ๋ค์์ ํ์ฑํฉ๋๋ค:
- ์์ด์ ํธ: ์ฒซ ๋ฒ์งธ ๋จ์ด๊ฐ
codex, gemini, copilot, all ์ค ํ๋์ธ์ง ํ์ธ
- ๋งค์นญ๋๋ฉด ํด๋น ์์ด์ ํธ ์ฌ์ฉ
all ๋๋ ๋งค์นญ ์ ๋๋ฉด โ ๋ชจ๋ ํ๋ณ๋ก ์ด๋
- ๋ชจ๋ ๊ฐ์ง (ํ๋กฌํํธ ๋ด ํค์๋):
- ํ์
: "๊ฐ์ด", "์์", "๋ฌผ์ด๋ด", "์๊ฒฌ" โ Claude ์ฃผ๋ + ์์ด์ ํธ ์ฐธ๊ณ
- ์์: "๋งก๊ฒจ", "์์ผ", "์ฒ๋ฆฌํด" โ ์์ด์ ํธ ์ฃผ๋
- ๋ณ๋ ฌ: "๋น๊ต", "์ ๋ถ", "๋ค ๊ฐ์ด", "all" โ ๋ชจ๋ ์์ด์ ํธ ๋ณ๋ ฌ
- ๊ธฐ๋ณธ๊ฐ: ์ ํค์๋๊ฐ ์์ผ๋ฉด ํ์
๋ชจ๋๋ก ๋์
- ์์ด์ ํธ ๋ฏธ์ง์ ์: ์์
์ ํ์ผ๋ก ์๋ ์ ํ
- ์ฝ๋ ์์ฑ/์คํ/๋๋ฒ๊น
โ Codex
- ๋ฆฌ์์น/์ค๋ช
/์น ๊ด๋ จ โ Gemini
- GitHub/PR/๋ฆฌ๋ทฐ ๊ด๋ จ โ Copilot
2. Complexity Analysis
์์
๋ด์ฉ์์ ๋ณต์ก๋๋ฅผ ๋ถ์ํฉ๋๋ค (๊ฐ 1์ ):
- ํค์๋: refactor, migrate, architecture, system, optimize, redesign, ๋ฆฌํฉํ ๋ง, ๋ง์ด๊ทธ๋ ์ด์
, ์ํคํ
์ฒ, ์ต์ ํ
- ๋ฉํฐํ์ผ/๋ชจ๋ ๋ณ๊ฒฝ ํ์
- ์์กด์ฑ/๊ด๊ณ ์ดํด ํ์
- ํ
์คํธ ์ ๋ต ํฌํจ
- ํก๋จ ๊ด์ฌ์ฌ (๋ณด์, ์ฑ๋ฅ, ๋์์ฑ)
- ์ธ๋ถ ์์คํ
/API ์ฐ๋
3. Model Routing
๋ณต์ก๋ ์ ์์ ๋ฐ๋ผ ๋ชจ๋ธ/effort๋ฅผ ์๋ ์ ํํฉ๋๋ค:
| ๋ณต์ก๋ | ์ ์ | Codex effort | Copilot model | Gemini model |
|---|
| Simple | 0-2 | low | claude-sonnet-4.6 | gemini-3.1-flash-preview |
| Medium | 3-4 | high | claude-opus-4.6 | gemini-3.1-pro-preview |
| Complex | 5+ | xhigh | gpt-5.4 | gemini-3.1-pro-preview |
4. Execute
๋จ์ผ ์์ด์ ํธ:
PROMPT='<task, shell-escaped>'
codex --model gpt-5.4 <effort> exec "$PROMPT"
gemini -m <model> -p "$PROMPT"
copilot --model <model> -p "$PROMPT"
๋ณ๋ ฌ ์คํ (all ๋๋ Complex ์์):
PROMPT='<task, shell-escaped>'
TMPDIR=$(mktemp -d)
(codex --model gpt-5.4 xhigh exec "$PROMPT" > "$TMPDIR/codex.txt" 2>/dev/null; echo $? > "$TMPDIR/codex.exit") &
(gemini -m gemini-3.1-pro-preview -p "$PROMPT" > "$TMPDIR/gemini.txt" 2>/dev/null; echo $? > "$TMPDIR/gemini.exit") &
(copilot --model gpt-5.4 -p "$PROMPT" > "$TMPDIR/copilot.txt" 2>/dev/null; echo $? > "$TMPDIR/copilot.exit") &
wait
5. Present Results
๋จ์ผ ์์ด์ ํธ:
## <Agent> (<model>) โ Complexity: <level> (score: <N>)
<response>
ํ์
๋ชจ๋ (๋จ์ผ): ์์ด์ ํธ ์๋ต ํ์ ํ, Claude๊ฐ ํด์ค๊ณผ ์ต์ ์์ ์ข
ํฉํฉ๋๋ค.
์์ ๋ชจ๋ (๋จ์ผ): ์์ด์ ํธ ์๋ต์ ๊ทธ๋๋ก ์ ๋ฌํฉ๋๋ค.
๋ณ๋ ฌ ๋ชจ๋:
## Agent Comparison โ Complexity: <level> (score: <N>)
### Codex (gpt-5.4)
<response>
### Gemini (<model>)
<response>
### Copilot (<model>)
<response>
---
## Synthesis
- **Agreements**: ํฉ์์
- **Differences**: ์ฐจ์ด์
- **Recommendation**: ์ถ์ฒ์
6. Cleanup
๋ณ๋ ฌ ์คํ ํ:
rm -r "$TMPDIR"
Timeout
| ๋ณต์ก๋ | ๋จ์ผ | ๋ณ๋ ฌ (๊ฐ) |
|---|
| Simple | 5m | 5m |
| Medium | 10m | 10m |
| Complex | 20m | 20m |
Error Handling
- CLI ๋ฏธ์ค์น: ์ค์น ๋ช
๋ น ์๋ด (
npm i -g @openai/codex ๋ฑ)
- ํ์์์: ๋ณด๊ณ ํ ๋ ๊ฐ๋จํ ํ๋กฌํํธ ์ ์
- exit code ๋น์ ์: stderr ํ์
- ๋ณ๋ ฌ ์ ์ผ๋ถ ์คํจ: ์ฑ๊ณตํ ์์ด์ ํธ ๊ฒฐ๊ณผ๋ง ํ์
Examples
/with codex ์ด ํจ์ ๋ฆฌํฉํ ๋งํด์ค โ Simple, Codex ๋จ์ผ
/with gemini ๋งก๊ฒจ - REST API ์ค๊ณ โ Medium ์์, Gemini
/with copilot ๊ฐ์ด - ์ธ์ฆ ๋ชจ๋ ๋ณด์ ๊ฒํ โ ํ์
, Copilot
/with all ์ด ์ํคํ
์ฒ ์ ๊ทผ๋ฒ ๋น๊ตํด์ค โ Complex ๋ณ๋ ฌ
/with ์ด ์๋ฌ ๋๋ฒ๊น
ํด์ค โ ์์ด์ ํธ ์๋ ์ ํ (Codex)