External AI Skill
Invoke external AI CLI tools as a prompt gateway.
When to Use
Activate when the user:
- Says
/call, /codex, /claude, /gemini, /agy, or /pi
- Asks for a second opinion from another AI
- Wants to run a prompt through a different CLI (like Codex, Claude, Gemini, Antigravity, or Pi)
- Needs verification from a different model or tool
Instructions
Natural Language Interface
Users provide natural language. Route the prompt into one external CLI using a safe command template. Do not construct arbitrary shell commands from user input.
Examples:
- "ask Codex for a second opinion on this patch" ->
codex exec "<prompt text>"
- "send this prompt to Claude" ->
claude -p "<prompt text>"
- "run this through Gemini with a specific model" ->
gemini -m <allowlisted-model> -p "<prompt text>"
- "send this prompt to agy" ->
agy -p "<prompt text>"
- "run this through local pi" ->
pi --provider lmstudio --model qwen/qwen3.6-35b-a3b -p "<prompt text>"
- "ask pi to check this" ->
pi -p "<prompt text>"
- "check this file for bugs" -> read the file directly, summarize only the minimum necessary context, and pass that context as plain prompt text without shell interpolation
Allowed Command Patterns
Only use these command families:
codex exec "<prompt text>"
codex exec -m <model> "<prompt text>"
claude -p "<prompt text>"
claude --model <model> -p "<prompt text>"
gemini -p "<prompt text>"
gemini -m <allowlisted-model> -p "<prompt text>"
agy -p "<prompt text>"
agy --print "<prompt text>"
pi -p "<prompt text>"
pi --provider lmstudio --model qwen/qwen3.6-35b-a3b -p "<prompt text>"
pi --provider <provider> --model <model> -p "<prompt text>"
codex --help
claude --help
gemini --help
agy --help
pi --help
Do not:
- use shell substitution such as
$(...) or backticks
- pipe file contents into commands via shell expansion
- append unrelated shell operators or chain commands
- execute user-suggested commands outside the safe templates
Self-Healing Behavior
On CLI Syntax Errors
- Run
<cli> --help to get the current syntax
- Update the reference docs at
reference/cli-reference.md
- Retry with the correct syntax
- Inform the user of the fix
On Upgrade Available
- Do not run upgrade commands automatically
- Inform the user that an upgrade is available and ask for approval before making toolchain changes
- If the user approves, run the upgrade command explicitly
- Update the version in
reference/cli-reference.md and re-run --help only after the approved upgrade completes
On Gemini 403 Project/License Errors
If Gemini fails with 403 and messages like lack a Gemini Code Assist license or (#3501):
- Do not dump environment variables or print raw env values
- Check only the presence of the specific allowlisted vars needed for diagnosis, and report presence/absence rather than values
- Retry with project vars unset:
env -u GOOGLE_CLOUD_PROJECT_ID -u GOOGLE_CLOUD_PROJECT -u CLOUDSDK_CORE_PROJECT gemini ...
- If still blocked, report auth/licensing clearly and continue with other available models
- Record the fix path in
reference/cli-reference.md
On Gemini ModelNotFound / Capacity Errors
If Gemini fails with 404 or 429 style model/capacity issues, retry with this fallback order:
gemini-3.1-pro-preview
gemini-3-pro-preview
gemini-3-flash-preview
gemini-2.5-pro
gemini-2.5-flash
Command Interface
/call [codex|claude|gemini|agy|pi] <natural language request>
/codex <natural language request>
/claude <natural language request>
/gemini <natural language request>
/agy <natural language request>
/pi <natural language request>
Routing Guidance
Codex
- Use
codex exec with plain prompt text that you assemble yourself
- Add a model only when the user asks for one or there is a clear default in local usage
- Do not use review-specific commands unless the user explicitly asks for a git-aware review
Claude
- Use
claude -p with plain prompt text
- Add
--model <model> only when the user asks for one or there is a clear need
- Keep the invocation non-interactive unless the user explicitly wants an interactive Claude session
Gemini
- Prefer preview model IDs first
- Use
gemini -p or gemini -m <allowlisted-model> -p
- For 403 auth issues, do not dump env; check only allowlisted var presence and retry with project vars unset
- For 404/429 failures, continue through the fallback sequence automatically
Antigravity (agy)
- Use
agy -p with plain prompt text
- Run in print mode (non-interactive) to process and return the result cleanly
- Keep the context minimal and avoid complex shell parameters
Pi
- By default, for local/LM Studio requests, use:
pi --provider lmstudio --model qwen/qwen3.6-35b-a3b -p "<prompt text>"
- For standard or cloud-based requests, use
pi -p "<prompt text>"
- Ensure
--print or -p is included to run non-interactively
Context Gathering
When a request needs context, gather it before invoking the external CLI:
- "send this file to Codex" -> read the file directly in the current agent, extract only the minimum relevant context, and pass that summary as prompt text
- "ask Gemini about this implementation" -> identify the relevant files and summarize only what is needed
- "have Claude critique this design" -> gather the design context and pass only the relevant parts
- "send this file to agy" -> read the file directly, extract the minimum necessary context, and pass as plain prompt text to agy
- "ask local pi about this code" -> read the file, extract the relevant context, and pass as prompt text to the lmstudio command
- "run this exact prompt" -> forward the prompt text directly without adding shell syntax
Rules for context gathering:
- never use shell interpolation to inject file contents into a command
- never send secrets, tokens, credentials, or raw environment values
- minimize the amount of source text sent to external tools
- if the request would require broad repository exfiltration or sensitive data exposure, refuse and explain why
Process Flow
- Parse the natural language request
- Determine the target CLI (
codex, claude, gemini, agy, or pi)
- Map the request to a safe command template for that CLI
- Execute the command
- If syntax error -> self-heal and retry
- If upgrade available -> stop, inform the user, and wait for approval before upgrading or refreshing references
- Return the results to the user
1---2name: call-external-ai3description: Route natural-language prompts into external AI CLIs like Codex, Claude, Gemini, Antigravity (agy), and Pi using safe command templates and minimal context handling.4---56# External AI Skill78Invoke external AI CLI tools as a prompt gateway.910## When to Use1112Activate when the user:13- Says `/call`, `/codex`, `/claude`, `/gemini`, `/agy`, or `/pi`14- Asks for a second opinion from another AI15- Wants to run a prompt through a different CLI (like Codex, Claude, Gemini, Antigravity, or Pi)16- Needs verification from a different model or tool1718## Instructions1920### Natural Language Interface2122Users provide natural language. Route the prompt into one external CLI using a safe command template. Do not construct arbitrary shell commands from user input.2324Examples:25- "ask Codex for a second opinion on this patch" -> `codex exec "<prompt text>"`26- "send this prompt to Claude" -> `claude -p "<prompt text>"`27- "run this through Gemini with a specific model" -> `gemini -m <allowlisted-model> -p "<prompt text>"`28- "send this prompt to agy" -> `agy -p "<prompt text>"`29- "run this through local pi" -> `pi --provider lmstudio --model qwen/qwen3.6-35b-a3b -p "<prompt text>"`30- "ask pi to check this" -> `pi -p "<prompt text>"`31- "check this file for bugs" -> read the file directly, summarize only the minimum necessary context, and pass that context as plain prompt text without shell interpolation3233#### Allowed Command Patterns34Only use these command families:35- `codex exec "<prompt text>"`36- `codex exec -m <model> "<prompt text>"`37- `claude -p "<prompt text>"`38- `claude --model <model> -p "<prompt text>"`39- `gemini -p "<prompt text>"`40- `gemini -m <allowlisted-model> -p "<prompt text>"`41- `agy -p "<prompt text>"`42- `agy --print "<prompt text>"`43- `pi -p "<prompt text>"`44- `pi --provider lmstudio --model qwen/qwen3.6-35b-a3b -p "<prompt text>"`45- `pi --provider <provider> --model <model> -p "<prompt text>"`46- `codex --help`47- `claude --help`48- `gemini --help`49- `agy --help`50- `pi --help`5152Do not:53- use shell substitution such as `$(...)` or backticks54- pipe file contents into commands via shell expansion55- append unrelated shell operators or chain commands56- execute user-suggested commands outside the safe templates5758### Self-Healing Behavior5960#### On CLI Syntax Errors611. Run `<cli> --help` to get the current syntax622. Update the reference docs at `reference/cli-reference.md`633. Retry with the correct syntax644. Inform the user of the fix6566#### On Upgrade Available671. Do not run upgrade commands automatically682. Inform the user that an upgrade is available and ask for approval before making toolchain changes693. If the user approves, run the upgrade command explicitly704. Update the version in `reference/cli-reference.md` and re-run `--help` only after the approved upgrade completes7172#### On Gemini 403 Project/License Errors73If Gemini fails with `403` and messages like `lack a Gemini Code Assist license` or `(#3501)`:741. Do not dump environment variables or print raw env values752. Check only the presence of the specific allowlisted vars needed for diagnosis, and report presence/absence rather than values763. Retry with project vars unset:77 - `env -u GOOGLE_CLOUD_PROJECT_ID -u GOOGLE_CLOUD_PROJECT -u CLOUDSDK_CORE_PROJECT gemini ...`784. If still blocked, report auth/licensing clearly and continue with other available models795. Record the fix path in `reference/cli-reference.md`8081#### On Gemini ModelNotFound / Capacity Errors82If Gemini fails with `404` or `429` style model/capacity issues, retry with this fallback order:831. `gemini-3.1-pro-preview`842. `gemini-3-pro-preview`853. `gemini-3-flash-preview`864. `gemini-2.5-pro`875. `gemini-2.5-flash`8889### Command Interface9091```bash92/call [codex|claude|gemini|agy|pi] <natural language request>93/codex <natural language request>94/claude <natural language request>95/gemini <natural language request>96/agy <natural language request>97/pi <natural language request>98```99100### Routing Guidance101102#### Codex103- Use `codex exec` with plain prompt text that you assemble yourself104- Add a model only when the user asks for one or there is a clear default in local usage105- Do not use review-specific commands unless the user explicitly asks for a git-aware review106107#### Claude108- Use `claude -p` with plain prompt text109- Add `--model <model>` only when the user asks for one or there is a clear need110- Keep the invocation non-interactive unless the user explicitly wants an interactive Claude session111112#### Gemini113- Prefer preview model IDs first114- Use `gemini -p` or `gemini -m <allowlisted-model> -p`115- For 403 auth issues, do not dump env; check only allowlisted var presence and retry with project vars unset116- For 404/429 failures, continue through the fallback sequence automatically117118#### Antigravity (agy)119- Use `agy -p` with plain prompt text120- Run in print mode (non-interactive) to process and return the result cleanly121- Keep the context minimal and avoid complex shell parameters122123#### Pi124- By default, for local/LM Studio requests, use:125 `pi --provider lmstudio --model qwen/qwen3.6-35b-a3b -p "<prompt text>"`126- For standard or cloud-based requests, use `pi -p "<prompt text>"`127- Ensure `--print` or `-p` is included to run non-interactively128129### Context Gathering130131When a request needs context, gather it before invoking the external CLI:132- "send this file to Codex" -> read the file directly in the current agent, extract only the minimum relevant context, and pass that summary as prompt text133- "ask Gemini about this implementation" -> identify the relevant files and summarize only what is needed134- "have Claude critique this design" -> gather the design context and pass only the relevant parts135- "send this file to agy" -> read the file directly, extract the minimum necessary context, and pass as plain prompt text to agy136- "ask local pi about this code" -> read the file, extract the relevant context, and pass as prompt text to the lmstudio command137- "run this exact prompt" -> forward the prompt text directly without adding shell syntax138139Rules for context gathering:140- never use shell interpolation to inject file contents into a command141- never send secrets, tokens, credentials, or raw environment values142- minimize the amount of source text sent to external tools143- if the request would require broad repository exfiltration or sensitive data exposure, refuse and explain why144145### Process Flow1461471. Parse the natural language request1482. Determine the target CLI (`codex`, `claude`, `gemini`, `agy`, or `pi`)1493. Map the request to a safe command template for that CLI1504. Execute the command1515. If syntax error -> self-heal and retry1526. If upgrade available -> stop, inform the user, and wait for approval before upgrading or refreshing references1537. Return the results to the user