From senate
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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/senate:invoke-agentThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
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.
| 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 |
Every CLI playbook follows the same schema so you can read them interchangeably:
{prompt}, {model}, {system}.-p / exec flag. Never spawn an interactive shell.codex exec - <<'PROMPT'
<prompt body>
PROMPT
.senate/runs/<id>/stages/<n>-<name>/turns/<NNN>-<cli>-<role>/{stdout,stderr}.log (the moderator mints this directory before dispatching the per-turn subagent; <NNN> is the monotonic turn number from transcript.jsonl). Always keep stdout.log, even if empty on a hard failure — the workspace contract uses it as the stable raw-output slot, and the moderator records its path on the transcript line. Delete stderr.log only when it ends up empty ([ -s "$TURN_DIR/stderr.log" ] || rm -f "$TURN_DIR/stderr.log").../moderate-debate/references/failures.md; retry only for that file's retryable cases (rate_limit, timeout, and the documented exit-0 empty-stdout unknown case), sharing the same single r1 retry budget as contract re-prompts.sed 's/\x1b\[[0-9;]*m//g' if the CLI emits color codes even when stdout is a pipe.../moderate-debate/references/budget.md (use GNU timeout when available, gtimeout on Homebrew/Coreutils macOS installs, otherwise the Perl fallback). Do not assume bare timeout exists on macOS.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.
Per-CLI playbooks (load only the file matching the CLI you're about to invoke this turn):
references/codex.mdreferences/gemini.mdreferences/cursor.mdreferences/kimi.mdreferences/claude.mdCross-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).Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub sebastianelvis/senate --plugin senate