mk:agent-detector

mk:agent-detector is a skill for Claude Code from ngocsangyem/MeowKit. It costs 51 tokens per session (2,240 once invoked), scanned A, original, MIT.

An automatic task-routing helper that identifies the type and difficulty of a development request. It selects an appropriate agent, model level, and workflow policy.

In plain words
What is it for?
Use it to route tasks based on their subject, technology, project files, and expected complexity.
Why use it?
It reduces the need to choose an agent or complexity level by hand for every request. It also performs an initial safety check before work begins.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ngocsangyem/meowkit/agent-detector
Any agent
npx skills add ngocsangyem/MeowKit --skill agent-detector
Clone the repo
git clone --depth 1 https://github.com/ngocsangyem/MeowKit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mk:agent-detector

README.md
[![agentmods](https://agentmods.dev/badge/skills/ngocsangyem/meowkit/agent-detector.svg)](https://agentmods.dev/skills/ngocsangyem/meowkit/agent-detector)
Your own site
<a href="https://agentmods.dev/skills/ngocsangyem/meowkit/agent-detector"><img src="https://agentmods.dev/badge/skills/ngocsangyem/meowkit/agent-detector.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,240 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.02240
Opus 5 $0.00026 $0.01120
Sonnet 5 $0.00010 $0.00448
Haiku 4.5 $0.00005 $0.00224

Measured 2d ago against content hash 56fd0d42001f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

mk:agent-detector scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/agent-detector/SKILL.md · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Detector

Priority: HIGHEST - Runs FIRST for every message. Automatically detects the correct agent, task complexity level, and model tier for each user message using a multi-layer scoring system. No manual agent selection needed -- the detector analyzes task content, explicit technology mentions, user intent, project context, and file patterns to route to the right agent with the right model.

When to Use

ALWAYS - Every user message, no exceptions. This skill fires before any other skill or agent action. It determines who handles the task, at what complexity level, and with which model.

Workflow

  1. Safety baseline precheck (HARD GATE). Before any other step, scan the context window for the cached-sentinel marker emitted by safety-sentinel-inject.cjs:

    ## Safety baseline: verified (cached, session <id>)
    

    If the marker IS present (turns 2..N of the same session): emit Safety baseline: verified (cached) and SKIP the 5-file Read loop below. The 5 rules remain in context from the inner harness's CLAUDE.md auto-load; the sentinel only suppresses redundant re-reads.

    If the marker is ABSENT (turn 1 of a new session, OR MEOWKIT_SKIP_SAFETY_SENTINEL=off): Read each of the 5 always-on safety/baseline rules:

    • .claude/rules/security-rules.md
    • .claude/rules/injection-rules.md
    • .claude/rules/gate-rules.md
    • .claude/rules/core-behaviors.md
    • .claude/rules/development-rules.md

    If any Read returns "file does not exist" or equivalent, ABORT IMMEDIATELY with the exact message:

    SAFETY BASELINE INCOMPLETE: rule <name> not found at .claude/rules/<name>.md
    Refusing to route any task. Restore the rule (git checkout / the installer) before retrying.
    

    Do NOT proceed to detection. Do NOT route to any agent. The 5 rules are the deterministic baseline; their absence indicates either repo corruption or a partial install. Replaces the unverified directory-auto-load assumption with a positive existence check.

Read the full file on GitHub · 126 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 126 lines · 51 tokens per session scan A 56fd0d42001f

Subscribe to this mod's changes

mk:agent-detector is a skill published in the GitHub repository ngocsangyem/MeowKit (14 stars, last pushed 1mo ago), licensed MIT. It adds 51 tokens to every session and 2,240 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories