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/studioKjm/ai-harness-templatenpx agentmods add commands/studiokjm/ai-harness-template/incident-patternsWrote 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/studiokjm/ai-harness-template/incident-patterns)<a href="https://agentmods.dev/commands/studiokjm/ai-harness-template/incident-patterns"><img src="https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/incident-patterns.svg" alt="Measured on agentmods" 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.00017 | $0.01020 |
| Opus 5 | $0.00009 | $0.00510 |
| Sonnet 5 | $0.00003 | $0.00204 |
| Haiku 4.5 | $0.00002 | $0.00102 |
Grade A, and why
incident-patterns 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 6d 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 — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/incident-patterns — Pattern Analysis Across Incidents
One incident is bad luck. Three with the same root cause is a system flaw.
When to use
- Quarterly retrospective — surface recurring causes
- Before deciding on a major architecture change — validate it addresses real pain
- After a sev1 — check if you've seen the same pattern before
- When deciding what to invest in (monitoring? testing? refactoring?)
Usage
/incident-patterns [--days N]
Default: last 90 days. Adjust based on incident volume.
Output format
Incident pattern analysis (last 90 days)
──────────────────────────────────────────────────
Total incidents: 12
By severity:
sev1: 1
sev2: 3
sev3: 6
sev4: 2
Top root causes (recurring):
[3x] DB connection pool exhausted under load spike
[2x] Stale cache served deleted data
Contributing factor categories:
5x monitoring
4x documentation
3x testing
2x deployment
Instructions
Step 1 — Run the script
python3 .harness/methodologies/incident-review/scripts/inc.py patterns --days 90
Step 2 — Interpret recurrence
| Recurrence | Meaning | Action |
|---|---|---|
| 1x cause | Probably bad luck | Note, but don't over-engineer |
| 2x cause (different incidents) | Suspicious | Investigate why action items from first didn't prevent second |
| 3x+ cause | Systemic flaw | Major investment justified — refactor / new monitoring / process change |
Step 3 — Interpret contributing factors
Categories aggregate across all incidents (not just recurring ones). Top categories indicate investment areas:
monitoring>5x → invest in observability (consider+ observability-firstmethodology when added)documentation>5x → invest in runbookstesting>5x → invest in test coverage / CIdeployment>5x → invest in rollout safetydependencies>5x → audit external services
Step 4 — Convert pattern findings to durable artifacts
Recurring patterns should become:
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.
- 6d ago First seen · 127 lines · 17 tokens per session scan A 27bd882ce701
incident-patterns is a command published in the GitHub repository studioKjm/ai-harness-template (43 stars, last pushed 3mo ago), licensed MIT. It adds 17 tokens to every session and 1,020 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
harness-review
Review the current change set from an opposing harness-engineering perspective.
observability
Add error monitoring and structured logging to a Next.js + Supabase app — Sentry for errors, request-scoped logs, and useful context without leaking PII. Use...
api-aqa-flow-execution-and-report-analysis
Phase 6 Execution & Report Analysis of api-aqa-flow (USER INTERACTION REQUIRED).
fire-resurrect
Autonomous Resurrection Mode — reverse-engineer intent from messy code, then rebuild clean from scratch.
fire-reflect
After any failure (debug resolution, test failure, approach rotation, stalled loop), capture what was tried, why it failed, and what actually worked as a persistent reflection. Future sessions search these before investigating.
fire-verify-uat
Conversational User Acceptance Testing with automatic parallel diagnosis on failures.