mk:agent-detector — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited mk:agent-detector (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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.
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.
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.mdIf 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.
0b. Phase-zero rule load. After the safety baseline is confirmed, scan context for the cached-sentinel marker:
## Phase-zero rules: verified (cached, session <id>)If the marker IS present: emit Phase-zero rules: verified (cached) and SKIP the 6-file Read loop. If ABSENT (turn 1 or env-var override), Read each phase-zero file. These govern Phase 0 routing and are read once per agent-detector invocation:
.claude/rules/phase-contracts.md — what each phase expects/produces.claude/rules/agent-routing.md — agent → role → phase table.claude/rules/model-selection-rules.md — task-type → model-tier mapping.claude/rules/scale-adaptive-rules.md — domain CSV → complexity routing.claude/rules/risk-checklist.md — 9 horizontal-risk flags.claude/skills/agent-detector/references/skill-domain-routing.md — intent → skill dispatch table (used at hand-off, Step 5)If any of the 5 rule Reads fails: ABORT with PHASE-ZERO RULE MISSING: <name> — same fail-fast semantics as Step 0. These rules drive the routing logic in steps 2–4; without them, detection silently degrades to keyword-only. The skill-domain-routing reference is advisory dispatch guidance (not a routing rule): if it is absent, log skill-domain-routing reference absent; skill dispatch falls back to inline judgment and continue — do NOT abort.
Agile context detection (additive — Agile-only load). After the 5 phase-zero Reads succeed:
.claude/rules-conditional/ directory exists. If absent → log agile rules: rules-conditional/ not deployed; skipping load and skip steps 2–4. (Defensive: filesystem may lag pruning-plan status doc.)tasks/contracts/sprint-state-*-sprint-*.md returns ≥1 resultjira_tickets:MEOW_JIRA_BASE_URL env var is set[A-Z]{2,10}-\d+ (Jira-key pattern).claude/rules-conditional/agile-story-gates.md.claude/rules-conditional/agile-sprint-commitment.md.claude/rules-conditional/agile-feedback-cycle.mdPer-file Read failure (file absent inside the directory): log and skip THAT rule; do NOT abort Step 0b. The phase-zero baseline is already loaded.
sprint_goal: from the newest active sprint-state file (status: active) and surface in the orient banner.Non-Agile sessions skip steps 1–4 silently — zero context cost.
references/detection-process.mdreferences/multi-layer-detection.md, references/scoring-and-thresholds.mdreferences/model-selection.md, references/complexity-detection.md, references/team-mode.md.claude/rules/risk-checklist.md (loaded in Step 0b). For each of the 9 flags (AUTH, AUTHZ, DATA_MODEL, AUDIT_SEC, EXT_SYSTEM, PUBLIC_CONTRACT, CROSS_PLATFORM, EXISTING_BEHAVIOR, WEAK_PROOF), evaluate whether the task description matches its trigger criteria. Emit matched_flags: [<ID>, ...] (default []). If any flag in {AUTH, AUTHZ, DATA_MODEL, AUDIT_SEC, EXT_SYSTEM} matches, escalate the tier to COMPLEX per rules/model-selection-rules.md Rule 2 — regardless of mk:scale-routing outcome.matched_flags line if non-empty), load agent instructions, invoke skill. See references/detection-process.md, references/after-detection.mdreferences/lifecycle-routing.md -- Task signal → phase → skill mapping (advisory, does not change scoring)references/complexity-detection.md -- Complexity levels, auto-detection criteria, detection logicreferences/model-selection.md -- Model mapping tables (complexity, task type, agent defaults)references/multi-layer-detection.md -- Layers 0-4: task content, tech, intent, project context, file patternsreferences/scoring-and-thresholds.md -- Scoring weights, agent thresholds, QA activation rulesreferences/detection-process.md -- Step-by-step process (cache, Steps 0-5, banner format)references/examples.md -- Seven worked examples covering common detection scenariosreferences/team-mode.md -- Team mode gate, composition rules, output format, handoffreferences/after-detection.md -- Post-detection actions, available agents, manual overrideAfter complexity detection, check user depth signals per references/token-budget-levels.md to set response verbosity. Silent by default — do not surface to users.
--quick or use the explicit /mk:fix --quick shorthand to force the right complexity level.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.