mode-routerlisted
Install: claude install-skill filippolmt/skills
# mode-router
A hook (`hooks/route.js`) fires on every prompt. In `auto` mode it makes the
model classify the request and invoke exactly one mode skill — coding task →
**`ponytail`** (minimal code), everything else → **`caveman`** (terse output) —
**on top of** any other skill the turn dispatches, never instead of it. A context
holds **one mode**: the first one in. A request that classifies the other way is a
**mode switch**, and the router answers with a notice recommending a reset instead
of loading the second mode ([`ROUTING.md`](ROUTING.md)).
The hook only routes; the two skills own their behavior. This skill reads and
flips the control file that picks the mode.
## Control file
`$XDG_CONFIG_HOME/mode-router/state.json` (or `~/.config/mode-router/state.json`):
```json
{ "mode": "auto" }
```
`mode` is one of: `auto` (default — model routes per request), `caveman` (force
terse everywhere, regardless of request type), `ponytail` (force minimal-code
everywhere), `off` (inject nothing). Missing or invalid → `auto`. A forced mode
does not override a context that already holds the other one: it gets the same
switch notice, and takes effect after the `/clear`.
This file is **user configuration** and nothing else writes to it. Runtime state
is kept apart under `$XDG_STATE_HOME/mode-router/` (or
`~/.local/state/mode-router/`), three files per session:
```json
session-<id>.json { "modes": ["caveman"] }
session-<id>.skills.json { "skills": [{ "name": "grilling", "sour