Agent skill

Postmortem

by SethGammon in SethGammon/Citadel

Auto-generates a structured postmortem from a completed campaign.

MITAuto-check passedDevOps & Cloud

Install Postmortem

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

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

GitHub CLI
$ gh skill install SethGammon/Citadel postmortem --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/SethGammon/Citadel.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/postmortem .claude/skills/postmortem && 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
postmortem
GitHub stars
922
Token cost
~1.7k tokens
SKILL.md length
610 words
Files
3
Skills in repo
48
Repo updated
First seen
Licence
MIT

At a glance

Auto-generates a structured postmortem from a completed campaign.

  • Works in 4 steps: GATHER → ANALYZE → PRODUCE → …
  • Tasks that involve Runbooks and postmortems
  • SKILL.md covers Orientation, When to Use, Inputs and Protocol, plus 4 more sections
  • Calls git

What it does

Postmortem is an agent skill from SethGammon/Citadel. 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.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `__benchmarks__/no-campaign.md` and `__benchmarks__/with-completed.md`).

It sits in DevOps & Cloud, covering Runbooks and postmortems. The repository describes itself as: The operating layer for Claude Code + OpenAI Codex: persistent project memory, intent routing, safety hooks, cost telemetry, and parallel agent fleets. The licence is MIT.

When your agent uses it

  • Tasks that involve Runbooks and postmortems

Example prompts

  • “/postmortem”

Workflow steps

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

  1. GATHER
  2. ANALYZE
  3. PRODUCE
  4. HANDOFF

What it can do on your machine

Read from SKILL.md and the folder at commit e41ff1d. 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

Postmortem loads about 1.7k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 610 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
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 SethGammon/Citadel at commit e41ff1d, republished under its MIT licence (© SethGammon). 610 words, ~1,710 tokens.

Download SKILL.mdSave it as .claude/skills/postmortem/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
postmortem
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.
license
MIT
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.

Show full SKILL.md (247 more words)Show less
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. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in skills/postmortem of SethGammon/Citadel.

  • SKILL.md
  • __benchmarks__/no-campaign.md
  • __benchmarks__/with-completed.md

Open the folder on GitHubat commit e41ff1d

Compare with similar skills

Postmortem 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.

Postmortem compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Postmortem this skillSethGammon/Citadel922—~1.7kAutomated safety check: PassMIT
Trader Memory Coretradermonty/claude-trading-skills3k2 repos~4.3kAutomated safety check: PassMIT
Author Migrationnrwl/nx29k—~12kAutomated safety check: NotesMIT
Write Notes Like Deepseekczm15053/write-notes-like-deepseek477—~1.9kAutomated safety check: PassNone
OpenRig Upgrade Proceduremvschwarz/openrig5.5k—~2.9kAutomated safety check: PassApache-2.0
GreptimeDB Release RunbookGreptimeTeam/greptimedb6.7k—~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Trader Memory Core

    tradermonty/claude-trading-skills

    Track investment theses across their lifecycle — from screening idea to closed position with postmortem.

    3k GitHub starsUsed in 2 repos~4.3k tokens
    DevOps & CloudAuto-check passed
  • Author or scope a first-party Nx migration. An agent skill from nrwl/nx.

    29k GitHub stars~12k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Write Notes Like Deepseek

    czm15053/write-notes-like-deepseek

    A skill your agent uses when a change is non-trivial by DSH standards (behavior, architecture, cross-file contracts, process/tooling, testing strategy, or on-disk/wire/config formats), when choosing…

    477 GitHub stars~1.9k tokensUpdated 15 days ago
    DevOps & CloudAuto-check passed
  • OpenRig Upgrade Procedure

    mvschwarz/openrig

    Walks an agent through upgrading the OpenRig CLI and daemon one observed step at a time, keeping live seats alive and reconciling managed plugin files.

    5.5k GitHub stars~2.9k tokensUpdated today
    DevOps & CloudAuto-check passed
  • 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 2 days ago
    DevOps & CloudAuto-check passed
  • Statem

    henryqin1997/statem

    A skill your agent uses when a long coding or research task should be managed with statem state-machine runbooks, including creating specs, starting or resuming runs, checking current state…

    1.3k GitHub stars~1.2k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed

More from SethGammon/Citadel

All 48 skills in this repo
  • Create Skill

    SethGammon/Citadel

    Creates new skills from the user's repeating patterns. An agent skill from SethGammon/Citadel.

    922 GitHub stars~1.9k tokensUpdated 6 days ago
    Auto-check passed
  • Houseclean

    SethGammon/Citadel

    Cross-drive storage audit and cleanup. An agent skill from SethGammon/Citadel.

    922 GitHub stars~2.2k tokensUpdated 6 days ago
    Auto-check passed
  • Loop

    SethGammon/Citadel

    Bounded foreground repetition for the current session. An agent skill from SethGammon/Citadel.

    922 GitHub stars~1.4k tokensUpdated 6 days ago
    Auto-check passed
  • Triage

    SethGammon/Citadel

    GitHub issue and PR investigator. An agent skill from SethGammon/Citadel.

    922 GitHub stars~2.7k tokensUpdated 6 days ago
    Auto-check passed
  • Watch

    SethGammon/Citadel

    File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills.

    922 GitHub stars~2.9k tokensUpdated 6 days ago
    Auto-check passed
  • Archon

    SethGammon/Citadel

    Autonomous multi-session campaign agent. An agent skill from SethGammon/Citadel.

    922 GitHub stars~5.4k tokensUpdated 6 days ago
    Auto-check passed

Categories

Questions about Postmortem

What does Postmortem do?

Auto-generates a structured postmortem from a completed campaign. Postmortem is an agent skill from SethGammon/Citadel. Auto-generates a structured postmortem from a completed campaign.

When should I use Postmortem?

Postmortem fits situations like: tasks that involve Runbooks and postmortems.

How do I install Postmortem in Claude Code?

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

How do I install Postmortem in Codex?

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

Can I use Postmortem 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 SethGammon/Citadel --skill postmortem -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/postmortem, .gemini/skills/postmortem, .github/skills/postmortem and .opencode/skills/postmortem in your project.

What does Postmortem need to run?

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

Does Postmortem 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 Postmortem 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 Postmortem use?

Postmortem is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Postmortem use?

About 1.7k tokens (SKILL.md is roughly 6.8k 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 Postmortem?

Skills that share tags, products or a category with Postmortem: Trader Memory Core (tradermonty/claude-trading-skills, 3k stars), Author Migration (nrwl/nx, 29k stars), Write Notes Like Deepseek (czm15053/write-notes-like-deepseek, 477 stars) and OpenRig Upgrade Procedure (mvschwarz/openrig, 5.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Postmortem?

SethGammon (a GitHub user) maintains it in SethGammon/Citadel, which has 922 GitHub stars. The repository holds 48 skills in this directory. The repository was last updated on October 1, 2026.

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