mk:agent-detector
Runs at the start of every message to pick the task agent, complexity tier and response depth.
| Source | .claude/skills/agent-detector/SKILL.md |
| Owner | lifecycle |
| Runtime | claude-code |
| Risk | medium |
mk:agent-detector runs once per task, when it starts or its scope changes. It picks the specialist agent, the complexity tier and any risk flags, and states them in one line. You do not call it. It is not user-invocable.
When not to use it
A question, a one-line edit or a follow-up inside the same task needs no detection. mk:scale-routing is the separate skill that maps domain keywords to a complexity level.
What it does
- Safety baseline. Reads the six always-on rules in
.claude/rules/(meowkit-core,security-rules,injection-rules,core-behaviors,development-rules,agent-conduct) unless the session sentinel reports them verified. If one is missing it stops and refuses to route. - Reads
docs/project-context.mdwhen it exists, then the phase contracts and the agent-routing, model-selection and risk-checklist references. If the task names a Jira key or a sprint contract exists, it also reads the threeagile-*.mdreferences. - Picks the agent from the live roster in
.claude/agents/. Jira and Confluence leaf agents are routed by their hub skills. - Picks TRIVIAL, STANDARD or COMPLEX, using the
mk:scale-routingresult when there is one. A match on AUTH, AUTHZ, DATA_MODEL, AUDIT_SEC or EXT_SYSTEM raises the tier to COMPLEX. - Reports
Agent | Tier | Flagsand invokes the skill the task needs.
Each agent runs on its own model pin. The tier decides which agent runs, not which model it uses. Pins are listed in scripts/lib/model-pins.md.
Session cache for the rule loads
On turns after the first, the UserPromptSubmit handler injects a marker (## Safety baseline: verified (cached, session <id>)). When the marker is in context the skill skips the file reads. State is in .meowkit/state/session-sentinels.jsonl, reset at each new session. MEOWKIT_SKIP_SAFETY_SENTINEL=off turns the markers off, so every turn reads the files.
Gotchas
- A short message with a domain keyword ("fix the auth token") can look like heavy work. The skill judges scope as well as keywords and states the tier so you can correct it.
- A change of topic is a new task and is detected again.
- For a task that spans two domains, name the main concern first ("Security task: add a check to the payment UI").