Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/fatihkan/badiWrote 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/fatihkan/badi/post-mortem)<a href="https://agentmods.dev/commands/fatihkan/badi/post-mortem"><img src="https://agentmods.dev/badge/commands/fatihkan/badi/post-mortem.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.00000 | $0.00540 |
| Opus 5 | $0.00000 | $0.00270 |
| Sonnet 5 | $0.00000 | $0.00108 |
| Haiku 4.5 | $0.00000 | $0.00054 |
Grade A, and why
post-mortem 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 today.
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 — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Post-incident analysis (post-mortem) command. Documents root-cause analysis of production incidents and major failures.
Required Tools
- Read (log files, incident records)
- Write (post-mortem report)
- Grep (error pattern search)
- Bash (git log, timestamp analysis)
Procedure (6 Steps)
Step 1: Collect the Incident Summary
- When did the incident start? (first detection)
- When was it resolved? (full recovery)
- Blast radius: how many users / which services were affected?
- Severity: CRITICAL / HIGH / MEDIUM / LOW
Step 2: Build the Timeline
A minute-by-minute incident chronology:
[HH:MM] First alarm / detection
[HH:MM] Response started
[HH:MM] Root cause identified
[HH:MM] Fix applied
[HH:MM] Verification complete
[HH:MM] Full recovery
Step 3: Root Cause Analysis
Apply the 5 Whys technique:
- Why did it happen? -> ...
- Why did that happen? -> ...
- Why did that happen? -> ...
- Why did that happen? -> ...
- Why did that happen? -> (root cause)
Identify the technical root cause and the organizational root cause separately.
Step 4: What Went Well / Badly
Went Well:
- Things detected quickly
- Effective interventions
- Systems that worked
Went Badly:
- Problems noticed late
- Wrong turns
- Missing alarms/monitoring
Got Lucky:
- Situations that could have gone worse but didn't
Step 5: Action Items
For each item: owner, priority, target date
- Immediate (this week): Urgent fixes
- Short Term (this sprint): Preventive measures
- Long Term (this quarter): Structural improvements
Step 6: Build and Save the Report
Save to post-mortems/[date]-[incident-name].md.
Output Format
=== BADI POST-MORTEM ===
Incident: [incident name]
Date: [date]
Severity: [level]
Impact Duration: [minutes/hours]
Root Cause: [one-sentence summary]
Actions: [count] items
File: post-mortems/[date]-[incident-name].md
========================
Notes
- Use blameless, learning-focused language
- Ask "what" and "why", not "who"
- Nominate every post-mortem into knowledge-base.md
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.
- today First seen · 78 lines · 0 tokens per session scan A 09c89fb8ee44
post-mortem is a command published in the GitHub repository fatihkan/badi (7 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 540 tokens. 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-09-06.
Other commands, from other repositories
check-cache-bugs
Audit Claude Code setup for cache bugs (CC#40524) — sentinel, --resume/--continue, attribution header + ArkNill B3/B4/B5.
investigate
Systematic root-cause debugging — find the cause before writing any fix.
optimize
Analyze and suggest performance improvements for code, queries, or systems.
diagnose
Interactive troubleshooting assistant for Claude Code issues.
audit-agents-skills
Audit quality of agents, skills, and commands in a Claude Code project.
land-and-deploy
Merge PR, wait for CI, verify deploy, run canary — the complete landing pipeline.