skill-routerlisted
Install: claude install-skill martinbouvet2000-tech/claude-code-stage-4
# skill-router
You do not do the work: you pick **the smallest set of active skills** that does it best, in the right order, then you chain them.
Files (same folder):
- `registry.yaml` — source of truth: cards (`skills:`) + chains (`chains:`); counts via `--counts`, never from memory. **Never load the cards whole** — grep them.
- `scripts/build-registry.mjs` — drift guard (disk ↔ registry). `--help` for the modes.
- `references/external-discovery.md` — skills.sh discovery when nothing matches.
- `test-prompts.json` — router evaluation set. **Do not read it while routing** (it contains the expected answers).
First run on a new machine: the shipped `registry.yaml` is an example. Move it aside, then
`node ~/.claude/skills/skill-router/scripts/build-registry.mjs --init`, enrich the stub cards, add chains, `--check` until exit 0.
## Protocol
### Fast path (90% of requests) — 2-4 calls (batch the reads)
1. **Intent** in one sentence: what to deliver, which format, which domain. A named project → check what it is (memory, `ls` of the folder) before choosing the chain.
2. **Chains first, in one read**: `awk '/^chains:/{f=1} f' ~/.claude/skills/skill-router/registry.yaml`. Choose on `intent` + `triggers`; apply it (step `x?` only if the condition in `note` holds; `a + b` = together; `tools:` = non-skill tools used as is).
3. **No chain → triggers**: `rg -i -B6 -A8 "triggers:.*<keyword>" registry.yaml` with 2-3 keywords (and synonyms). Read `status`, `priority`, `conflicts_with`.