| name | mode-router |
| disable-model-invocation | true |
| description | Administer the per-prompt caveman/ponytail router — show status, force a mode, or turn routing off. |
mode-router
A UserPromptSubmit 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). The mode applies on top of any other skill the turn
dispatches — never instead of it. 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):
{ "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.
Operations
- Status — read the control file (report
auto if absent) and state the
active mode plus the auto routing rule. Done when the user knows which mode
is in force.
- Set mode — write
{ "mode": "<value>" } to the control file, creating the
directory if needed. Reject any value outside the four above. Done when the
file holds the requested value.
Changes take effect on the next prompt — the hook re-reads the file every turn.
Routing behavior
route.js is the single source of truth for the exact routing and precedence
rules, and injects them into every turn. For how slash commands, precedence over
hard constraints, and multi-turn spec-driven workflows are handled, see
ROUTING.md.