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.01109 |
| Opus 5.5 | $0.00007 | $0.00444 |
| Sonnet 5.5 | $0.00004 | $0.00222 |
| Haiku 4.5 | $0.00002 | $0.00111 |
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 1mo 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.
- 1mo ago Changed 31bf72e39dec
- 1mo ago First seen · 94 lines · 18 tokens per session scan A f7d45e246211
analyze-misfires is a command published in the GitHub repository iliaal/whetstone (35 stars, last pushed today), licensed MIT. It adds 18 tokens to every session and 1,109 once invoked, about $0.0001 per session on Opus 5.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
sm-buff
You usually don't run buff directly — run sm sail. sm sail drives the whole PR to green and calls buff watch / triage for you, stopping only when it needs you to act (see /sm-sail). Reach for sm buff here only for surgical work: inspecting a specific failure, or resolving a single review thread when sail has parked on…
debug
Structured debugging with parallel investigation agents.
dead-code-scan
Scan for dead code, unused imports, duplicates, and zombie code across the project.
logic-fix-all
Autonomous audit-and-fix — after consent, scan the target, fix every logic issue found (all severities), verify each fix, and report anything unresolved.
logic-health
Sweep a whole codebase or directory for logic correctness — use before a release or to identify risk hotspots.
fec-tdd
Use front-end TDD workflow to implement functions, fix bugs, or refactor logic: first write failing tests, then implement minimal code, and then refactor.