Skip to main content
skill CX Codex

postmortem · sethgammon — Claude Code skill: incident reports and setup

The postmortem skill reviews completed campaigns or incidents using project files, telemetry, and Git history. It shows what failed and which safeguards caught it.

MIT ★ 937 updated 2026-10-29

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add SethGammon/Citadel
/plugin install citadel@citadel-local
Open on GitHub

What postmortem does

For a finished campaign, the skill compares the plan with the delivered work and examines decision records, Git changes, and data in .planning/telemetry/. It identifies failures, scope changes, safeguard activations, and recurring issues. You can also run it on a standalone incident using recent Git history.

The report is written to .planning/postmortems/postmortem-{slug}-{date}.md and covers failures, detection, recommendations, and recorded metrics. Provide a campaign path or time range; with no argument, the skill selects the most recently completed campaign. When .planning/ is missing, it prints the report in the conversation instead, so there is no file saved automatically.

What it helps with

  • review failures after a campaign ends
  • compare planned work with the feature ledger
  • find errors caught by hooks and quality gates
  • spot recurring issues in commits and changed files
  • write an incident report from recent Git history

Example prompts for the agent

  • Write a postmortem for the most recently completed campaign.
  • Review what went wrong in the last session using Git history and telemetry.
  • Compare .planning/campaigns/launch.md with the delivered work and produce a report.

How to install postmortem

1Plugin marketplace

/plugin marketplace add SethGammon/Citadel
/plugin install citadel@citadel-local

This installs the whole citadel plugin with all its skills

2Skills CLI (Vercel)

npx skills add SethGammon/Citadel --skill postmortem -a claude-code

3Manually: put the files in place

~/.claude/skills/postmortem/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/postmortem/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about postmortem

How do I install postmortem in Claude Code?

Run /plugin marketplace add SethGammon/Citadel, then /plugin install citadel@citadel-local.

What does the postmortem skill do?

It gathers campaign or incident evidence from project files, telemetry, and Git history, then writes a structured review of failures, safeguards, and recurring issues.

Can I run postmortem without a campaign file?

Yes. Give it a time range, such as the last session, or run it without an argument to use the latest completed campaign. For an incident without a campaign, it uses recent Git history and session context.

Source text

SKILL.md · MIT
---
name: postmortem
license: MIT
description: >-
  Auto-generates a structured postmortem from a completed campaign. Reads the
  campaign file, telemetry logs, and feature ledger. Produces a documented
  analysis of what broke, what the safety systems caught, and what patterns
  emerged. Can also be invoked manually for any incident.
user-invocable: true
auto-trigger: false
trigger_keywords:
  - postmortem
  - retro
  - what broke
  - what happened
  - debrief
effort: medium
---

# /postmortem — Campaign Postmortem Generator

## Orientation

**Use when:** A campaign just completed and you want a structured analysis of what broke, what safety systems caught, and what patterns emerged. Also for ad-hoc incident analysis from recent git history.

**Don't use when:** You want to preserve session context for the next conversation (use `/session-handoff`), extract reusable patterns from findings into the knowledge base (use `/learn`), or score and improve quality iteratively (use `/improve`).

## When to Use

- After any Archon campaign completes (Archon should suggest it)
- After a difficult debugging session
- When the user says "what just happened" or "what broke"
- When /do routes "postmortem", "retro", "what broke", "what happened"

## Inputs

One of:
1. A campaign file path (.planning/campaigns/*.md)
2. A time range ("last session", "today", "this week")
3. Nothing (reads the most recent completed campaign)

## Protocol

### Step 1: GATHER

Collect data from all available sources:

**From the campaign file (if it exists):**
- Direction vs what was actually built (scope drift?)
- Phase completion timeline (which phases needed rework?)
- Decision log entries (what architectural choices were made?)
- Review queue items (what needed human eyes?)
- Circuit breaker activations (what hit the limit?)
- Feature ledger (what shipped?)

**From telemetry (.planning/telemetry/):**
- hook-timing.jsonl: which hooks fired most, any patterns
- hook-errors.log: what was blocked, what failed, what had parse errors
- Circuit breaker trips
- Quality gate violations

**From git history:**
- Commits during the campaign period
- Files changed (which areas got the most churn?)
- Any reverts (what was undone?)
- Commit message patterns (fix: commits indicate bugs found)

**From the session itself (if no campaign):**
- Recent tool calls and their outcomes
- Files edited and errors encountered

### Step 2: ANALYZE

Identify patterns across the data:

1. **What broke:** List every failure, error, or unexpected outcome.
   For each: what happened, what caught it (hook/gate/human/nothing),
   what it cost (time, rework, tokens).

2. **What the safety systems caught:** Circuit breaker activations,
   quality gate blocks, anti-pattern warnings, typecheck failures.
   This is the "invisible value" section — problems prevented.

3. **What drifted:** Compare the campaign direction to what was built.
   Did scope expand? Did phases get skipped or reordered? Did the
   architecture change mid-build?

4. **What patterns emerged:** Recurring error types, files that kept
   needing fixes, phases that took longest, common anti-patterns.

### Step 3: PRODUCE

Write to `.planning/postmortems/postmortem-{slug}-{date}.md`:

```markdown
# Postmortem: {Campaign Name or Session Description}

> Date: {ISO date}
> Campaign: {path to campaign file, or "ad-hoc session"}
> Duration: {time from first to last commit}
> Outcome: {completed | partial | parked}

## Summary
{2-3 sentences: what was attempted, what happened, what the result was}

## What Broke
{Numbered list. For each:}
### {N}. {Short description}
- **What happened:** {the failure}
- **Caught by:** {hook name / quality gate / human / nothing}
- **Cost:** {rework time, files affected, phases repeated}
- **Fix:** {what resolved it}
- **Infrastructure created:** {new hook rule, new anti-pattern, new end condition — or "none needed"}

## What Safety Systems Caught
{Things that WOULD have been problems without the hooks/gates}
| System | What It Caught | Times | Impact Prevented |
|--------|---------------|-------|-----------------|
| {hook/gate name} | {description} | {count} | {what would have happened} |

## Scope Analysis
- **Planned:** {what the campaign direction said}
- **Built:** {what the feature ledger shows}
- **Drift:** {none | minor | significant — with specifics}

## Patterns
{Recurring themes worth watching:}
- {pattern 1}
- {pattern 2}

## Recommendations
{Concrete next actions:}
1. {recommendation — e.g., "Add anti-pattern rule for X"}
2. {recommendation — e.g., "Phase Y needs tighter end conditions"}

## Numbers
| Metric | Value |
|--------|-------|
| Phases planned | {N} |
| Phases completed | {N} |
| Commits | {N} |
| Files changed | {N} |
| Circuit breaker trips | {N} |
| Quality gate blocks | {N} |
| Anti-pattern warnings | {N} |
| Rework cycles | {N} |
```

### Step 4: HANDOFF

Output the HANDOFF block from the Exit Protocol, then suggest: `Run /learn {campaign-slug} to extract patterns into the knowledge base.`

## What /postmortem Does NOT Do

- Invent failures that didn't happen (real data only)
- Blame the user or the model (document what happened, not whose fault)
- Recommend changes to skill files (that's for the user to decide)
- Run during a campaign (only after completion or on demand)

## Quality Gates

- Every "What Broke" entry has all 5 fields filled
- Numbers section has real data (not estimates)
- Recommendations are concrete actions (not "be more careful")
- If no failures occurred, say so honestly (don't manufacture drama)

## Fringe Cases

**Campaign not found**: If the specified campaign file doesn't exist, check `.planning/campaigns/` for the most recently modified campaign. If no campaigns exist, run in ad-hoc mode using recent git history and session context.

**No telemetry data**: Proceed without telemetry. Mark the "What Safety Systems Caught" table as "No telemetry available" and the Numbers section fields as "N/A". Don't manufacture data.

**Partial campaign** (parked or in-progress): Generate the postmortem with `Outcome: partial`. Document what was completed and what was parked. Include a "Remaining Work" section listing incomplete phases.

**If .planning/postmortems/ does not exist**: Create it before writing. If `.planning/` itself doesn't exist, output the postmortem inline and note: "Run /do setup to initialize .planning/ for future storage."

## Exit Protocol

```
---HANDOFF---
- Postmortem: {name}
- Document: .planning/postmortems/postmortem-{slug}-{date}.md
- Failures documented: {count}
- Safety catches: {count}
- Recommendations: {count}
- Reversibility: green — one file written to .planning/postmortems/; git rm to undo
---
```

After displaying the HANDOFF block, suggest: `Run /learn {campaign-slug} to extract patterns into the knowledge base.`

© SethGammon · MIT · SethGammon/Citadel

Similar skills

All skills for Agent setup: memory, context, orchestration →

postmortem by other authors comes first.

postmortem Alireza Rezvani postmortem runs a blameless 5 Whys review after a failed launch, missed target, or bad hire. It turns the findings into owned changes with review dates. CX Codex +1 1,465installs game-postmortem AlterLab-IEU game-postmortem — a skill for Claude Code, Codex, and Cursor that runs data-driven post-mortems on completed or canceled game phases. Collects Git metrics, issue logs, and AI costs into production/milestones/. CX Codex +1 ★ 57repo stars postmortem-writing Seth Hobson The postmortem-writing skill turns incident reviews into blameless postmortems with timelines, root-cause analysis, and concrete follow-up actions. CX Codex +1 10,800installs postmortem-writer patricio0312rev postmortem-writer turns an incident into a written postmortem: timeline, root cause, contributing factors, action items with owners. Runs as a skill inside your coding agent. CX Codex +1 265installs write-a-postmortem Inkeep write-a-postmortem drafts blameless incident reviews in postmortems/ using the Google SRE framework. Focuses on system affordances and evidence instead of personal fault. CX Codex +1 243installs incident-postmortem official github The incident-postmortem GitHub Copilot skill creates blameless incident reviews in the Google SRE format. It starts on requests for a postmortem, RCA, or outage report. CX Codex +1 81installs signal-postmortem tradermonty signal-postmortem is a Claude Code skill that records trading-signal results and feeds detected errors into weight tuning. It runs after trades close or holding periods mature. CX Codex +1 3,700installs

From the same set55

The whole set →
deploy-steward deploy-steward serializes PR merges into main, tracks CI gates, triggers deploys, and files repair tasks when checks fail. CX Codex +1 ★ 937repo stars prd prd turns an app idea into a structured product requirements document, asking about decisions that affect its shape. Use it before handing a project plan to Archon. CX Codex +1 ★ 937repo stars organize organize — a skill that audits and corrects project structure: checks file placement, moves files to match conventions, updates imports. Leaves code inside files untouched. CX Codex +1 ★ 937repo stars create-app create-app — a skill for Claude Code and Codex that builds applications from a single prompt. It routes work across five distinct tiers, passing through PRD, architecture, and verified execution phases. CX Codex +1 ★ 937repo stars map map generates a JSON index of a repository's files, exports, imports and dependency graph so an agent can locate relevant code without extra Glob or Grep calls. CX Codex +1 ★ 937repo stars phase-validator The phase-validator subagent for Claude Code compares phase handoff reports with exit conditions and returns a pass or fail verdict. It checks automated development pipelines. CX Codex ★ 937repo stars fleet fleet splits a big job into campaigns and runs them in waves of 2–3 agents, handing each wave's findings to the next. Fits when the tasks don't touch the same files. CX Codex ★ 937repo stars workspace workspace coordinates changes across multiple repositories in a single task. Breaks work into waves, runs campaigns per repo, verifies contracts between them. CX Codex +1 ★ 937repo stars

Project sponsors

Companies that keep this analytics open