9thlevelsoftware/legion/cli-dispatch
- community
Checking that the SKILL.md file is still in the repository.
Cross-CLI dispatch infrastructure for routing work to external CLIs
Install
npx vskill@latest install 9thlevelsoftware/legion/cli-dispatchSKILL.md
CLI Dispatch
Infrastructure layer for /legion:build and other skills that need to route tasks to external CLIs (Gemini CLI, Codex CLI, Copilot CLI, etc.). Handles discovery, capability matching, prompt construction, invocation, result collection, and cleanup. Callers treat this as a black box: pass a task, get back a result.
Section 1: CLI Discovery
How to discover which external CLIs are available at dispatch time.
Capability vocabulary (controlled list — use only these terms in adapter dispatch configs and task hints):
| Capability | Description | |
|---|---|---|
code_implementation | Writing new code, features, or modules | |
code_review | Reviewing existing code for quality, correctness | |
testing | Writing or running tests | |
refactoring | Restructuring code without changing behavior | |
bug_fixing | Diagnosing and resolving defects | |
ui_design | UI component design and implementation | |
ux_research | User experience analysis and recommendations | |
web_search | Searching the web for current information | |
large_analysis | Analyzing large codebases or long documents | |
security_audit | Security vulnerability analysis | |
performance_analysis | Performance profiling and optimization | |
documentation | Writing technical docs, READMEs, comments |
Section 2: Capability Matching Algorithm
How to select the best external CLI for a given task.
Section 3: Prompt Construction Template
How to build the prompt that is sent to the external CLI.
Section 4: Invocation Protocol
How to invoke the external CLI after building the prompt.
Preconditions (verify before Step 1):
- Read the active adapter file at
adapters/{adapter-id}/ADAPTER.md. Resolve{adapter-id}fromsettings.jsonkeycli_adapter. - If the adapter file is missing or cannot be parsed → emit
<escalation>severity: blocker, type: infrastructure, decision: Cannot dispatch without adapter metadata, context: adapter file missing or malformed at adapters/{adapter-id}/ADAPTER.md</escalation>and STOP. - If
settings.jsondoes not declarecli_adapter→ emit<escalation>severity: blocker, type: infrastructure, decision: No CLI adapter selected, context: settings.json missing cli_adapter key</escalation>and STOP. - Verify the resolved
{AGENTS_DIR}from workflow-common-core exists and contains the target{agent-id}.md. If missing → emit<escalation>severity: blocker, type: scope, decision: Cannot inject personality, context: agent file {agent-id}.md not found under {AGENTS_DIR}</escalation>and STOP.
Dispatch specification — External CLI invocation (canonical)
| Field | Value | |
|---|---|---|
| When | After Section 3 prompt assembly completes AND all Section 4 preconditions pass. Fires once per dispatched task (single-task path) OR once per task in the wave (parallel fan-out path). | |
| Why parallel is safe | Each dispatch writes to a distinct {task-id}-PROMPT.md + {task-id}-RESULT.md file pair under .planning/dispatch/. Task IDs include {phase}-{plan}-{timestamp} which is unique per dispatch. No two concurrent dispatches share prompt or result paths; the external CLI process is the only writer to {result_path} during its lifetime. | |
| How many | Single-task path: exactly 1 Bash call. Parallel fan-out path: exactly N Bash calls where N = count of tasks in the current wave (from wave-executor Section 4). Do not batch multiple tasks into a single CLI call. | |
| Mechanism | Bash tool invocation constructed per adapter prompt_delivery (file_path/stdin_pipe/content_flag). Parallel fan-out: all N Bash calls in the SAME LLM response block, each with run_in_background: true. Single-task: run_in_background: false is also valid. Timeout: adapter.timeout_ms. Model substitution: {model} placeholder from Section 3 Part 6 (RESOLVED_MODEL). |
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/cli-dispatch/SKILL.md
Popularity
- Repository stars
- 62
- Repository forks
- 7
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
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/9thlevelsoftware/legion/cli-dispatch)