Agent skill

Post Mortem

by hanamizuki in hanamizuki/solopreneur

Trace when a bug was introduced, find the root cause commit, understand why it happened, and produce a structured post-mortem report.

MITAuto-check passedDevOps & Cloud

Install Post Mortem

skills CLI
$ npx skills add hanamizuki/solopreneur --skill post-mortem -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hanamizuki/solopreneur post-mortem --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hanamizuki/solopreneur.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/solopreneur/post-mortem .claude/skills/post-mortem && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
post-mortem
GitHub stars
152
Token cost
~1.7k tokens
SKILL.md length
574 words
Files
1
Skills in repo
31
Repo updated
First seen
Licence
MIT

At a glance

Trace when a bug was introduced, find the root cause commit, understand why it happened, and produce a structured post-mortem report.

  • Works in 6 steps: Gather Information → Establish Timeline → Find the Fix Commit First → …
  • The user says post-mortem
  • SKILL.md covers Core Principles, Phase 1: Gather Information, Phase 2: Establish Timeline and Phase 3: Find the Fix Commit…, plus 3 more sections
  • Calls git

What it does

Post Mortem is an agent skill from hanamizuki/solopreneur. Trace when a bug was introduced, find the root cause commit, understand why it happened, and produce a structured post-mortem report. Use when the user says "post-mortem", "trace this bug", "when was this regression introduced", "find the root cause commit", "what commit broke this", or when they describe a crash/bug that appeared in a specific version. Works with any git repository.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Runbooks and postmortems and Root cause analysis. It works with Git. The repository describes itself as: Skills and agents for solopreneurs — ship, review, debug, and think through problems with AI. The licence is MIT.

When your agent uses it

  • The user says post-mortem
  • Was this regression introduced
  • Find the root cause commit
  • What commit broke this

Example prompts

  • “post-mortem”
  • “trace this bug”
  • “when was this regression introduced”
  • “/post-mortem”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Gather Information
  2. Establish Timeline
  3. Find the Fix Commit First
  4. Trace the Introduction
  5. If No Fix Commit Exists
  6. Produce the Report

What it can do on your machine

Read from SKILL.md and the folder at commit f43f001. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Post Mortem loads about 1.7k tokens when it runs. Until then it costs about 100 tokens; SKILL.md has 574 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~100
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hanamizuki/solopreneur at commit f43f001, republished under its MIT licence (© hanamizuki). 574 words, ~1,683 tokens.

Download SKILL.mdSave it as .claude/skills/post-mortem/SKILL.md (or your agent's skills folder).
name
post-mortem
description
Trace when a bug was introduced, find the root cause commit, understand why it happened, and produce a structured post-mortem report. Use when the user says "post-mortem", "trace this bug", "when was this regression introduced", "find the root cause commit", "what commit broke this", or when they describe a crash/bug that appeared in a specific version. Works with any git repository.

Post-mortem Investigation

Given a bug description, trace through git history to find when it was introduced, identify the root cause, and produce a structured report.

Core Principles

Code is truth — user-provided clues are just search starting points.

Users typically only know the symptoms, suspect a feature, or recall a related PR. These are valuable leads but cannot be taken at face value. Your job is to verify against actual git diffs, not follow assumptions blindly.

The fix commit is the most reliable root cause guide.

If a fix commit exists (merged or on another branch), find it first. The person who fixed it usually understood the problem — what they changed and what they wrote in the commit message often directly reveals what broke and why. Then trace backward to find when the broken code was introduced.

Phase 1: Gather Information

Collect from the user:

  • Bad version: commit hash, tag, version number, or branch
  • Symptoms: when it crashes, error messages, affected features
  • Fix info (optional): if the user knows the fix branch or commit, this is the golden lead — prioritize it
  • Search hints (optional): suspected features, files, keywords — treat as starting points, not final answers

Good version does not need to come from the user — it's usually the previous release / tag / stable commit. Derive it from git log yourself.

Phase 2: Establish Timeline

bash
# Resolve version / tag / branch to a definite commit hash
git rev-parse <bad_version>

# Find the previous good version (last release commit)
git log --oneline --format="%h %ad %s" --date=short <bad_commit>~20..<bad_commit>

# List all commits between the two versions (to understand scope of changes)
git log --oneline --format="%h %ad %s" --date=short <good_commit>..<bad_commit> --reverse

Phase 3: Find the Fix Commit First

Before searching for the introduction, find the fix. The fix commit's diff and message are the most reliable root cause guide — they directly show what was replaced and why.

bash
# Search for fix commits after the bad version
git log --oneline --grep="fix\|hotfix\|patch\|revert" <bad>..HEAD

# If the user mentioned a fix branch, look at it directly
git log --oneline <fix_branch> --not main | head -10
git show <fix_commit_hash>

When reading the fix commit, focus on:

  • Which files and functions were changed — this is where the problem lives
  • Commit message — often directly describes the root cause
  • Before/after diff — shows what the broken version looked like

With this information, proceed to Phase 4 to find when the broken code was introduced.

Phase 4: Trace the Introduction

Now that you know "what code is the problem", find "when this code first appeared":

bash
# Trace change history of the specific file
git log --oneline -- path/to/file

# View a specific commit's changes to that file
git show <commit_hash> -- path/to/file

# Compare good and bad versions to confirm when the problematic code appeared
git diff <good_commit>..<bad_commit> -- path/to/file
Show full SKILL.md (245 more words)Show less
Watch for "Latent Bug" Patterns

Sometimes the root cause was planted in the "good version" but didn't trigger on its own — it only manifested when a later change increased call frequency, data volume, or altered timing.

In this case:

  • Commits in the version window (good → bad) are the "trigger", not the root cause
  • The real root cause lies before the good version

Criterion: if the "suspicious commit" you found in the version window cannot logically explain the crash mechanism, widen your search to earlier commits.

bash
# Expand to earlier history
git log --oneline <good_commit>~30..<bad_commit> -- path/to/file

When this happens, the report should explain both:

  1. Which commit introduced the architectural flaw (true root cause)
  2. Which later commit became the trigger (the straw that broke the camel's back)

Phase 5: If No Fix Commit Exists

If the bug hasn't been fixed yet, fall back to keyword search:

bash
# Search for suspicious commits by symptom keywords
git log --oneline --grep="<feature_keyword>" <good>..<bad>

# Diff suspicious commits directly
git show <commit_hash> -- path/to/file

# Use pickaxe to search for additions/removals of specific strings
git log -S "suspicious_function_name" <good>..<bad>

After finding a suspicious change, ask yourself: "Can this change logically cause the symptoms the user described?" You need a clear logical explanation, not gut feeling. If you can't explain it, keep looking.

Phase 6: Produce the Report

Output a markdown report in the following format. Adapt headings and wording to fit the actual situation — don't copy the template verbatim.


markdown
## Post-mortem: [one-line bug description]

### Root Cause (TL;DR)

[1-2 sentences: what change caused the bug and why. Get straight to the point.]

### Timeline

| Date | Commit | Event |
|------|--------|-------|
| YYYY-MM-DD HH:MM | `xxxxxxx` | Bug introduced — [commit title] |
| YYYY-MM-DD HH:MM | `xxxxxxx` | [Affected version] released (exposure begins) |
| YYYY-MM-DD HH:MM | `xxxxxxx` | Bug fixed — [commit title] |
| YYYY-MM-DD HH:MM | `xxxxxxx` | [Fix version] released (exposure ends) |

**Exposure window**: X hours / X days

### The Change That Introduced the Bug

[Explain the original intent of the PR / commit]

// Bad: this code caused the issue <problematic code snippet>


[Explain why this code causes the crash / bug]

### The Fix

[Explain the fix approach]

// Fixed <fixed code snippet or description of fix direction>


### Root Cause Analysis

[Explain why this bug appeared at this time — not just "what code", but "why it
wasn't caught"]

### Prevention Measures

- [ ] [Specific action item]
- [ ] [Another action item]

[Each action item should be specific and trackable. Don't write vague things like
"add more tests" — write something like "add integration test for
HealthKitManager.requestAuthorization verifying typesToRead excludes correlation
types".]

After outputting the report, ask the user if they want to save it:

Save this report to a file? Suggested path: docs/post-mortem/YYYY-MM-DD-[short-bug-description].md

If the user agrees, save to the corresponding path.

© hanamizuki, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/solopreneur/post-mortem of hanamizuki/solopreneur.

Open the folder on GitHubat commit f43f001

Compare with similar skills

Post Mortem next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Post Mortem compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Post Mortem this skillhanamizuki/solopreneur152—~1.7kAutomated safety check: PassMIT
GreptimeDB Release RunbookGreptimeTeam/greptimedb6.7k—~1.4kAutomated safety check: PassApache-2.0
Post-Incident DebriefVeryGoodOpenSource/vgv-wingspan109—~1.9kAutomated safety check: PassMIT
CI Failure Triage and RepairChachamaru127/claude-code-harness3.2k1 repos~1.1kAutomated safety check: NotesMIT
Post Mortemthananon/9arm-skills3.2k—~3.4kAutomated safety check: PassNone
Release Processscragnog/HOT-Step-CPP171—~5.1kAutomated safety check: PassMIT

Similar skills

  • GreptimeDB Release Runbook

    GreptimeTeam/greptimedb

    Runbook for publishing a GreptimeDB version: pick the release branch, verify the Cargo version, then tag, create the GitHub release and open the docs note PR.

    6.7k GitHub stars~1.4k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Post-Incident Debrief

    VeryGoodOpenSource/vgv-wingspan

    Produces a blameless post-incident debrief with timeline, root cause and follow-up actions after an outage, failed release or significant bug, while details are fresh.

    109 GitHub stars~1.9k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • CI Failure Triage and Repair

    Chachamaru127/claude-code-harness

    Diagnoses failing CI pipelines and tests, deciding first whether the test or the implementation is at fault, and hands hard cases to a dedicated fixer subagent.

    3.2k GitHub starsUsed in 1 repo~1.1k tokens
    DevOps & CloudAuto-check: notes
  • Post Mortem

    thananon/9arm-skills

    Write the canonical engineering record of a fixed bug — root cause, mechanism, fix, validation, and how it slipped through.

    3.2k GitHub stars~3.4k tokensUpdated 3 mo ago
    DevOps & CloudAuto-check passed
  • Release Process

    scragnog/HOT-Step-CPP

    Runbook for cutting and publishing a HOT-Step CPP release via a v git tag that triggers the multi-platform CI build and drafts a GitHub Release.

    171 GitHub stars~5.1k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Production Error Hunt

    different-ai/openwork

    Traces an opaque production error in an OpenWork build to its cause using local server logs and Sentry, names the regressing PR and files a report.

    24k GitHub stars~803 tokensUpdated today
    DevelopmentAuto-check passed

More from hanamizuki/solopreneur

All 31 skills in this repo
  • Preview

    hanamizuki/solopreneur

    Create an interactive HTML preview of any proposal, plan, idea, doc, brief, or spec and land it in the browsable local Preview Library by default (opens under file:// with a catalog sidebar and…

    152 GitHub stars~5.2k tokensUpdated 12 days ago
    Auto-check passed
  • iOS Patterns

    hanamizuki/solopreneur

    A skill your agent uses when building iOS/macOS apps with SwiftUI — covers localization (String Catalogs), date/time formatting, JSON date decoding, Previews, state management, sheet/navigation…

    152 GitHub stars~2.3k tokensUpdated 12 days ago
    Auto-check: notes
  • Linkedin Growth

    hanamizuki/solopreneur

    LinkedIn organic growth consultant — diagnoses profiles, discusses goals, and co-creates a personalized 90-day growth plan.

    152 GitHub stars~3.7k tokensUpdated 12 days ago
    Auto-check passed
  • Perspective

    hanamizuki/solopreneur

    Switch perspectives to think through problems using the mental models of ten iconic thinkers: Elon Musk, Richard Feynman, Charlie Munger, Naval Ravikant, Steve Jobs, Nassim Taleb, Ilya Sutskever…

    152 GitHub stars~971 tokensUpdated 12 days ago
    Auto-check passed
  • Slide Design

    hanamizuki/solopreneur

    Create brand-aware presentations using frontend-slides or reveal.js.

    152 GitHub stars~3.9k tokensUpdated 12 days ago
    Auto-check passed
  • X Growth

    hanamizuki/solopreneur

    X/Twitter growth consultant — diagnoses profiles, discusses goals, and co-creates a personalized growth plan.

    152 GitHub stars~3.8k tokensUpdated 12 days ago
    Auto-check passed

Works with

Questions about Post Mortem

What does Post Mortem do?

Trace when a bug was introduced, find the root cause commit, understand why it happened, and produce a structured post-mortem report. Post Mortem is an agent skill from hanamizuki/solopreneur. Trace when a bug was introduced, find the root cause commit, understand why it happened, and produce a structured post-mortem report.

When should I use Post Mortem?

Post Mortem fits situations like: the user says post-mortem; was this regression introduced; find the root cause commit; what commit broke this.

How do I install Post Mortem in Claude Code?

Run `npx skills add hanamizuki/solopreneur --skill post-mortem -a claude-code`. Or copy the skill folder (skills/solopreneur/post-mortem in hanamizuki/solopreneur) into .claude/skills/post-mortem in your project. Claude Code loads it when a task matches its description.

How do I install Post Mortem in Codex?

Run `npx skills add hanamizuki/solopreneur --skill post-mortem -a codex`. Or copy the skill folder (skills/solopreneur/post-mortem in hanamizuki/solopreneur) into .agents/skills/post-mortem in your project. Codex loads it when a task matches its description.

Can I use Post Mortem in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hanamizuki/solopreneur --skill post-mortem -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/post-mortem, .gemini/skills/post-mortem, .github/skills/post-mortem and .opencode/skills/post-mortem in your project.

What does Post Mortem need to run?

Going by SKILL.md and its folder, Post Mortem needs the command-line tools its instructions call (git).

Does Post Mortem access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Post Mortem safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Post Mortem use?

Post Mortem is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Post Mortem use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Post Mortem?

Skills that share tags, products or a category with Post Mortem: GreptimeDB Release Runbook (GreptimeTeam/greptimedb, 6.7k stars), Post-Incident Debrief (VeryGoodOpenSource/vgv-wingspan, 109 stars), CI Failure Triage and Repair (Chachamaru127/claude-code-harness, 3.2k stars) and Post Mortem (thananon/9arm-skills, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Post Mortem?

hanamizuki (a GitHub user) maintains it in hanamizuki/solopreneur, which has 152 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on September 26, 2026.

Source: hanamizuki/solopreneur on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.