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/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/studiokjm/ai-harness-template/incident-patterns"><img src="https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/incident-patterns.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.00017 | $0.01020 |
| Opus 5.5 | $0.00007 | $0.00408 |
| Sonnet 5.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 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 — 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.
- 1mo 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 (45 stars, last pushed 14d ago), licensed MIT. It adds 17 tokens to every session and 1,020 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
ic
Full-system integrity check — file references, version anchors, hook registration + wiring, hooks-alive (main sessions actually receiving injections), carrier facts, replay corpus, CLAUDE.md @-imports, skills, intents, retired tokens, gate counts, spinner tips and verbs, command/agent frontmatter. Deterministic, under…
isdown
Check whether a site is down for everyone or just you — local probe + downforeveryoneorjustme API, with --deep for a 7-node worldwide sweep via check-host.net.
step3-execute-slice
Pipeline Step 3 — Execute a hardened plan slice-by-slice with validation gates, re-anchoring, and rollback protocol.
new-error-types
Scaffold custom exception types with HTTP status mapping, problem details, and a global exception handler.
investigate
Command → Agent → Skill orchestration for investigating and fixing bugs.
step4-completeness-sweep
Pipeline Step 4 — Completeness sweep to eliminate TODOs, mocks, stubs, and placeholder code before review.