Postmortem Writing
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when the user asks to "write postmortem", "create postmortem document", "document code issue", "postmortem best practices"…
Об этом скилле
Postmortem Writing for Code Issues
This skill provides guidance for writing effective postmortem documents that learn from code fixes and prevent future regressions.
Purpose
Postmortem documents serve as a knowledge base for preventing code regression in AI-assisted development. Each postmortem analyzes a bug fix to extract:
- What went wrong and why
- How it was fixed
- What patterns to watch for
- How to prevent similar issues systematically
Blameless principle: Focus on learning and prevention, not blame. Never include author attribution.
Document Structure
Postmortem documents follow a standard structure with YAML frontmatter and markdown sections.
YAML Frontmatter
Required metadata fields:
---
commit: abc123def456 # Full commit hash
date: 2026-01-13 # Commit date (YYYY-MM-DD)
severity: medium # low, medium, high, critical
tags: [authentication, race-condition] # Descriptive tags
files_changed: 5 # Number of files modified
related_commits: [] # Related fix commits (hashes)
---
Severity levels:
- critical: System crash, data loss, security breach
- high: Core functionality broken, widespread impact
- medium: Feature broken, workaround available
- low: Minor issue, edge case, cosmetic problem
Tags: Use descriptive, searchable tags for categorization:
- Component/module names:
authentication,database,api - Problem types:
race-condition,null-pointer,memory-leak - Technologies:
postgres,redis,react - Patterns:
boundary-check,input-validation,error-handling
Markdown Sections
Each postmortem includes these sections in order:
1. Title
Format: # Postmortem: [Brief Description]
Use imperative form and be specific:
- Good:
Fix null pointer in user authentication flow - Good:
Resolve race condition in cache invalidation - Avoid:
Bug fix - Avoid:
Update code
2. Problem Summary
Describe the observable symptom and broken functionality.
What to include:
- What was the user-visible problem?
- What functionality was broken or degraded?
- Under what conditions did it occur?
Keep it concise: 2-3 sentences maximum.
Example:
## Problem Summary
Users were unable to log in after password reset. The authentication
service returned a 500 error when validating reset tokens. This affected
all users who attempted password reset between 2026-01-10 and 2026-01-12.
3. Root Cause Analysis
Explain WHY the problem occurred, not just what was wrong.
Structure:
## Root Cause Analysis
**Root cause category**: [Logic Error | Missing Validation | Race Condition |
Architecture Flaw | Dependency Issue | Configuration Error | Other]
**Why it happened**:
- [Primary reason - dig deep, not surface]
- [Contributing factors]
- [Missed edge cases or incorrect assumptions]
Go beyond surface symptoms: Identify the underlying cause, not just the immediate trigger.
Good analysis:
**Root cause category**: Logic Error
**Why it happened**:
- Token validation logic assumed tokens were always 32 characters
- Password reset flow generates 64-character tokens
- No length validation on token input
- Original implementation only supported session tokens (32 chars)
Poor analysis:
**Why it happened**:
- The code had a bug
- Token check failed
4. Code Changes
Describe what was modified to fix the issue.
Structure:
## Code Changes
**Modified files**:
[List files with change summary]
**Key logic changes**:
- [Describe algorithmic or logical changes]
- [What was added, removed, or refactored]
**API/Interface changes**:
- [Function signature changes]
- [Data structure modifications]
- [Impact on callers or dependencies]
Be specific: Mention actual file names, function names, and logic changes.
Example:
## Code Changes
**Modified files**:
- `src/auth/token_validator.py`: Updated validation logic
- `tests/auth/test_token_validation.py`: Added test cases
**Key logic changes**:
- Removed hardcoded 32-character length check
- Added flexible token length validation (16-128 chars)
- Improved error messages to distinguish token types
**API/Interface changes**:
- `validate_token()` now accepts optional `token_type` parameter
- Return value includes token type for better error handling
5. Risk Pattern
Identify patterns to watch for in future changes.
Structure:
## Risk Pattern
**File/module risk**:
- Files: [Specific files prone to similar issues]
- Modules: [Components or services]
**Code pattern risk**:
- [Vulnerable code structures or patterns]
- [Common mistakes in this area]
**Common mistake**:
- [What assumption led to this bug]
- [What developers might miss]
Make it actionable: Describe patterns that can be detected in code changes.
Example:
## Risk Pattern
**File/module
Установить Postmortem Writing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл Postmortem Writing?
This skill should be used when the user asks to "write postmortem", "create postmortem document", "document code issue", "postmortem best practices", "postmortem format", or needs guidance on structuring and writing effective postmortem documentation for code fixes.
Как установить скилл Postmortem Writing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Postmortem Writing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic