← ClaudeAtlas

mode-routerlisted

Administer the per-prompt caveman/ponytail router — show status, force a mode, or turn routing off.
filippolmt/skills · ★ 0 · AI & Automation · score 71
Install: claude install-skill filippolmt/skills
# 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`): ```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 1. **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. 2. **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 constr