| name | invoke-agent |
| description | Playbook for invoking non-interactive coding-agent CLIs (codex, gemini, cursor, kimi, claude) as subprocesses. Use this skill inside a moderate-debate per-turn subagent, or when any skill needs to shell out to another AI CLI with a prompt and capture the reply โ covers install checks, exact non-interactive invocation, input/output conventions, budget flags, and known per-CLI quirks. |
| license | MIT |
| compatibility | Requires the relevant CLI binaries (codex, gemini, cursor-agent, kimi, claude) on PATH for any participating agent. |
invoke-agent โ CLI invocation playbook
This skill is a reference library, not a flow. When you need to call another AI CLI, read the relevant file below for the exact command, flags, input conventions, output parsing rules, and known quirks.
Where this is read from: moderate-debate does not call CLIs from its own context. Each turn is dispatched into a fresh subagent (Agent / Task tool, isolated context) that loads the playbook for one CLI, runs the call, validates the contract, and returns a small structured result. See ../moderate-debate/SKILL.md ยง "Per-turn subagent" for the contract between moderator and subagent. If you find yourself reading these playbooks from a long-lived debate context, you are in the wrong place โ dispatch a subagent.
Supported CLIs
| CLI | File | Typical use |
|---|
| codex | references/codex.md | OpenAI Codex CLI |
| gemini | references/gemini.md | Google Gemini CLI |
| cursor | references/cursor.md | Cursor Agent CLI (cursor-agent) |
| kimi | references/kimi.md | Moonshot Kimi CLI |
| claude | references/claude.md | Anthropic Claude Code CLI |
Common invocation shape
Every CLI playbook follows the same schema so you can read them interchangeably:
- Install check โ one shell command that proves the CLI is on PATH.
- Invoke โ the exact non-interactive command template with placeholders for
{prompt}, {model}, {system}.
- Input โ stdin vs. flag vs. file. How to pass long prompts (usually: heredoc to stdin, or a tempfile).
- Output โ stdout shape (plain text, JSON, streaming). Any banner/ANSI stripping rules.
- Budget flags โ token/time caps if the CLI supports them.
- Known quirks โ auth env vars, rate limits, non-zero exits that are benign, output truncation.
General rules for the caller
If a CLI isn't supported yet
Copy one of the existing files as a template, fill in the six sections above, and add it to the table. No code changes needed anywhere else.
Files in this skill
Per-CLI playbooks (load only the file matching the CLI you're about to invoke this turn):
references/codex.md
references/gemini.md
references/cursor.md
references/kimi.md
references/claude.md
Cross-cutting reference (load only on demand):
references/skill-authoring.md โ Agent Skills spec & best practices. Load only when the prompt being sent to a CLI is asking it to author or revise an Agent Skill (otherwise it is dead weight in context).