Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/iliaal/whetstonenpx agentmods add commands/iliaal/whetstone/analyze-misfiresWrote 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.
[](https://agentmods.dev/commands/iliaal/whetstone/analyze-misfires)<a href="https://agentmods.dev/commands/iliaal/whetstone/analyze-misfires"><img src="https://agentmods.dev/badge/commands/iliaal/whetstone/analyze-misfires/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/iliaal/whetstone/analyze-misfires"><img src="https://agentmods.dev/badge/commands/iliaal/whetstone/analyze-misfires.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00018 | $0.01164 |
| Opus 5 | $0.00009 | $0.00582 |
| Sonnet 5 | $0.00004 | $0.00233 |
| Haiku 4.5 | $0.00002 | $0.00116 |
Grade A, and why
analyze-misfires 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analyze skill injection misfires
Identify skills whose trigger regex matches too broadly, causing injection into irrelevant tasks. Propose concrete fixes to skill-patterns.sh and skill descriptions.
Arguments
MIN_EXAMPLES=30 (default)
TOP=5 (how many worst misfires to investigate, default: 5)
Parse from: $ARGUMENTS
Pipeline
Step 1: Harvest + analyze
python3 distillery/scripts/distiller.py harvest-sessions
python3 distillery/scripts/distiller.py analyze-misfires --min-examples <MIN_EXAMPLES>
Present the full misfire table. Flag skills with misfire rate > 15%.
Step 2: Investigate top misfires
For each of the top TOP misfiring skills:
- Read the current regex from
plugins/whetstone/hooks/skill-patterns.sh(grep forSKILL_PATTERNS[<skill-name>]) - Read the skill's YAML description from its SKILL.md
- Review the irrelevant task samples from the analyze-misfires output
- Identify what the regex is matching that it shouldn't (e.g., "database" matching audit tasks that mention databases)
Step 3: Propose fixes
For each misfiring skill, propose:
- Tightened regex -- remove overly broad terms, add word boundaries, require more specific combinations
- Description update -- add explicit "not for X" exclusions if the description is attracting wrong matches
- Tier adjustment -- if the skill is Tier 1 but shouldn't fire as eagerly, suggest moving to Tier 2
Present each proposed change for review before applying. Format:
=== ia-postgresql (51% misfire) ===
Current regex: SKILL_PATTERNS[ia-postgresql]='postgres|jsonb|rls|cte[s]?|window\.?function'
Problem: "postgres" matches any mention of PostgreSQL in task context, including Laravel tasks that reference a postgres database
Proposed regex: SKILL_PATTERNS[ia-postgresql]='postgres.*(?:query|schema|index|optim)|jsonb|rls|\bcte[s]?\b|window\.?function|explain\s+analyze'
Description change: Add "Not for tasks that merely use PostgreSQL as a backend"
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.
- 10d ago First seen · 94 lines · 18 tokens per session scan A f7d45e246211
analyze-misfires is a command published in the GitHub repository iliaal/whetstone (33 stars, last pushed 2d ago), licensed MIT. It adds 18 tokens to every session and 1,164 once invoked, about $0.0001 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-08-30.
Other commands, from other repositories
audit
Audit an existing codebase. Detects stack, finds gaps, creates tasks, generates PROJECT.md.
debug
Systematic debugging: root cause before any fix, one hypothesis at a time, and a three-strikes rule that questions the architecture instead of stacking patches.
triage
Triages a PR comment — from a bot (Copilot, CI) or a human reviewer. Fetches the comment and diff via gh CLI, classifies it, applies the fix directly to the file if valid, posts a reply on the thread, and resolves it. Run from inside the repo.
linkerd
Linkerd-specific diagnostics — mTLS verification, proxy injection issues, authorization policy debugging, traffic management, and multi-cluster connectivity problems.
bugfix
TDD-driven bugfix workflow: tester writes failing test (RED) → developer fixes (GREEN) → developer refactors (REFACTOR) → reviewer validates. Accepts issue number, description, or both. Auto-creates PR unless --no-pr flag is passed.
review
Multi-agent code review with parallel validation.