Agent skill · kochetkov-ma
agent-router-setup
Installs, configures or removes the agent-router hook (routes a generic Agent spawn to the real project/plugin expert). Triggers: agent-router, wrong agent, route to expert, роутер агентов, не тот агент.
What it needs
About 11k tokens when loaded.
What this skill does
Agent Router EXPERIMENTAL. Installer/configurator skill. It wires ONE self-contained PreToolUse hook (matcher Agent) that checks whether the main loop picked the RIGHT agent for a spawn and redirects it to the real expert — a project agent from .claude/agents/, or a brewcode specialist — when it reached for a generic one. All runtime behavior lives in the hook file and in a JSON config; this skill only decides mode and level, then delegates the file work to the brewcode:hook-creator agent following the runbook. The main loop picks general-purpose out of habit while the repo carries a hand-written domain expert that would have done it properly. Tier 1 catches that deterministically, for zero tokens. A deny is returned to the model as a tool error it can act on: the human is never prompted, the turn is not interrupted, and a retry always gets through. Prompt contract Position 1 of $ARGUMENTS is a free-form prompt (RU/EN) — modes and flags are optional and may follow in any order. Nobody types keys: resolve mode + scope FROM the prompt. 1. Strip flags. An explicit mode token anywhere wins outright, no scoring. 2. Else score modes by distinct whole-word keyword hits (table in Step 2). Highest unique score wins. Tie with a destructive mode (purge) -> AskUserQuestion; tie with status -> status; tie of two mutating modes -> the keyword appearing first; all zero -> status. 3. Empty arguments -> status; ask ONE scoping AskUserQuestion only when the answer changes what gets written. A read-only run asks nothing. 4. Outcome-changing ambiguity -> ONE AskUserQuestion (max 4 questions) BEFORE any work. 5. Prose that is not a mode/id/path is still input: extract the id, path or target from it. Then print this block ONCE, before the first action: Labels are literal; values follow the conversation language. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills kochetkov-ma/agent-router-setup