elliotjlt/claude-skill-potions/pre-mortem
Claude Code and agent skill by elliotjlt/claude-skill-potions
- community
Checking that the SKILL.md file is still in the repository.
Before starting ANY significant task (feature build, refactor, integration, migration, or architectural change), first imagine the project has failed. Generate 3-5 specific failure scenarios, assess risk levels, identify mitigations, then adjust the implementation plan to address high-risk items FIRST. Do not start coding until the pre-mortem is acknowledged.
Install
npx vskill@latest install elliotjlt/claude-skill-potions/pre-mortemSKILL.md
Pre-mortem
<purpose> Elite engineers instinctively ask "how could this fail?" before writing code. Claude does the opposite - jumps to implementation, discovers problems mid-way, patches reactively. This skill encodes prospective hindsight: imagine failure, then prevent it. </purpose>
Why This Works
Gary Klein's research on prospective hindsight shows teams who imagine failure identify 30% more risks than teams who just "plan carefully." The mental shift from "how do we succeed?" to "why did we fail?" unlocks different thinking.
Instructions
<trigger> Activate before ANY task involving:
- New feature implementation
- External service integration (payments, auth, APIs)
- Database migrations or schema changes
- Refactoring across multiple files
- Dependency upgrades
- Infrastructure changes
- Anything the user calls "significant" or "important"
</trigger>
Step 1: Pause Before Implementing
Do NOT start writing code. First, run analysis:
Or manually assess by examining:
- Files that will be touched
- External dependencies involved
- Data/state that could be corrupted
- User-facing impact if broken
Step 2: Generate Failure Scenarios
Imagine it's 2 weeks later. The task failed. Ask: "Why did it fail?"
Generate 3-5 specific failure scenarios. For each:
| Component | Description | |
|---|---|---|
| Scenario | Concrete failure description | |
| Likelihood | HIGH / MEDIUM / LOW | |
| Impact | What breaks if this happens | |
| Detection | How would we know it failed | |
| Mitigation | How to prevent or reduce risk |
<failure-categories> Common failure patterns to consider:
Integration failures:
- Auth/credentials misconfigured
- Webhook signatures not validated
- Rate limits not handled
- Timeout/retry logic missing
- Test vs production environment confusion
Data failures:
- Migration corrupts existing data
- Missing null checks
- Race conditions on concurrent writes
- No rollback path
- Foreign key violations
Logic failures:
- Edge cases not handled
- Off-by-one errors in loops/pagination
- Timezone/locale assumptions
- Currency/precision errors
- State machine invalid transitions
Operational failures:
- No logging for debugging
- Secrets committed to repo
- No monitoring/alerting
- Deployment breaks rollback
- Missing feature flags
</failure-categories>
Step 3: Present Pre-mortem
Format output as:
Step 4: Adjust Implementation Order
Reorder the implementation plan to:
- Address HIGH risk mitigations first
- Build verification/detection early
- Create rollback path before risky changes
- Add logging before complex logic
- Then proceed with main implementation
Step 5: Get Acknowledgment
Do NOT proceed until user confirms. They may:
- Accept the plan
- Add risks you missed
- Deprioritise certain mitigations
- Ask for more detail on specific risks
Risk Severity Guide
<severity> HIGH - Must mitigate before proceeding:
- Data loss or corruption possible
- Security vulnerability
- Money/billing affected
- No rollback path
- Silent failure (looks fine, actually broken)
MEDIUM - Mitigate or explicitly accept risk:
- Poor user experience
- Performance degradation
- Technical debt accumulation
- Manual intervention needed if broken
LOW - Note but proceed:
- Cosmetic issues
- Minor inconvenience
- Easy to fix post-launch
- Caught by existing tests
</severity>
NEVER
- Start significant tasks without pre-mortem
- Generate generic risks (be specific to THIS task)
- Skip high-risk mitigations to save time
- Assume "it probably won't happen"
- Proceed without user acknowledgment
ALWAYS
- Be specific: "webhook signature validation" not "security issues"
- Include detection method for each risk
- Reorder plan based on risk findings
- Surface risks even if they're awkward
- Acknowledge when you're uncertain about a risk
Examples
Example 1: Payment Integration
User: "Add Stripe payment integration"
Example 2: Database Migration
User: "Add soft delete to all models"
Example 3: Minor Task (Pre-mortem Not Needed)
User: "Fix the typo in the error message"
<failed-attempts> What DOESN'T work:
- Generic risks: "Security issues" is useless. "Webhook signature validation wrong" is actionable.
- Skipping for "simple" tasks: The "simple" migration that corrupts production data.
- Listing risks without mitigations: Identifying problems without solutions is just anxiety.
- Not reordering the plan: If you identify HIGH risks but still implement in original order, you've wasted the exercise.
- Perfunctory pre-mortems: Going through motions without real imagination. Ask "how would this ACTUALLY fail?"
- Only technical risks: Missing "team doesn't understand the change" or "deploy on Friday before vacation"
- Assuming user will read carefully: Present the most critical risks prominently, not buried in a list.
- Pre-mortem paralysis: 15 risks identified, nothing gets built. Focus on HIGH risks, accept some LOW risk.
</failed-attempts>
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/pre-mortem/SKILL.md
Popularity
- Repository stars
- 55
- Repository forks
- 2
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 12 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/elliotjlt/claude-skill-potions/pre-mortem)