pre-mortem
Skill1 starsChanged 11 days agoMITView on GitHub
Before a significant task (feature build, refactor, integration, migration, or architectural change), imagine the project has failed. Name 3-5 specific failure scenarios, rate them, and reorder the plan so high-risk items come first. Then proceed. Stop and ask only when a HIGH risk is irreversible, outward-facing (live customer data, sends, deploys, money) or expensive; reversible local work goes ahead without waiting.
34 other projects use a version of this.
Adopted by
Most recently taken up by
- Vacayy/explorertheir own version, first seen Nov 29, 2026
- broomva/skillstheir own version, first seen Nov 26, 2026
- EdgeCaser/shipwrighttheir own version, first seen Nov 22, 2026
- SpencerGoss/agent-engineeringtheir own version, first seen Nov 20, 2026
- charly-vibes/incitacionestheir own version, first seen Nov 18, 2026
- dvy1987/agent-loomtheir own version, first seen Nov 15, 2026
Used with
Projects with it also use brainstorm-experiments-existing, prioritize-assumptions and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
skytiger6724Skillbrainstorm-experiments-existing
Design experiments to test assumptions for an existing product — prototypes, A/B tests, spikes, and other low-effort validation methods. Use when validating assumptions, testing feature ideas cheaply, or planning product experiments.
Also in 7 projects that use this
skytiger6724Skillprioritize-assumptions
Prioritize assumptions using an Impact × Risk matrix and suggest experiments for each. Use when triaging a list of assumptions, deciding what to test first, or applying the assumption prioritization canvas.
Also in 7 projects that use this
45ckSkillpestle-analysis
Also in 7 projects that use this
About-IntelligenceSkillpositioning-ideas
Brainstorm product positioning ideas differentiated from competitors.
Also in 7 projects that use this
About-IntelligenceSkillproduct-name
Brainstorm 5 unique, memorable product names with rationale aligned to brand values and target audience.
Also in 6 projects that use this
EdgeCaserSkilllean-canvas
Builds a one-page Lean Canvas capturing the core business model: problem, solution, key metrics, unfair advantage, channels, customer segments, and cost/revenue structure. Based on Ash Maurya's adaptation of the Business Model Canvas for startups.
Also in 9 projects that use this
- +6 more from skytiger6724
Other versions34 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 34
- avelikiy/great_cto★ 115same name
- ysskrishna/ai-agent-skills★ 29same name
- MbappeWU/murder-board★ 15same name
- jackjin1997/ClawForge★ 12same name
- sergeeey/Claude-cod-top-2026★ 9same name
- EdgeCaser/shipwright★ 8same name
- broomva/skills★ 7same name
- carlkibler/agent-skills★ 6same name
- fzfclee/consulting-skills★ 6same name
- dvy1987/agent-loom★ 4same name
24 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- arch-reviewSkill
- debug-to-fixSkill
- global-config-guardSkill
- keep-it-simpleSkill
- lowtierSkill
- parallelizeSkill
- probe-before-batchSkill
- prove-itSkill
- sanity-checkSkill
- scan-before-rmrfSkill
- skill-forgeSkill
- stay-in-laneSkill
- trace-itSkill
- vet-ai-patchesSkill
- you-sureSkill
- zero-inSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
Before writing code, run a short analysis:
- Distinctive: line 79
Test vs production environment confusion
- Distinctive: line 96
No logging for debugging
- Distinctive: line 143
Create rollback path before risky changes
- Distinctive: line 144
Add logging before complex logic
- Distinctive: line 152
Ask the user first only when a HIGH risk is irreversible, outward-facing (live customer data, emails or posts, deploys, money) or expensive.
- Distinctive: line 159
HIGH: - Must mitigate before proceeding:
- Distinctive: line 181
Start significant tasks without naming the main risks
- Distinctive: line 307
Not reordering the plan: If you identify HIGH risks but still implement in original order, you've wasted the exercise.
“Common” is measured: kept by at least 6 in 10 of the 27 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
Before writing code, run a short analysis:
python3 <this-skill-dir>/scripts/analyse_risk.py --task "<task description>" --path .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:
Pre-mortem Analysis: [Task Name]
If this fails in 2 weeks, it's probably because:
1. HIGH: [Scenario]
Impact: [What breaks]
Mitigation: [How to prevent]
2. HIGH: [Scenario]
Impact: [What breaks]
Mitigation: [How to prevent]
3. MED: [Scenario]
Impact: [What breaks]
Mitigation: [How to prevent]
4. MED: [Scenario]
Impact: [What breaks]
Mitigation: [How to prevent]
5. LOW: [Scenario]
Impact: [What breaks]
Mitigation: [How to prevent]
Adjusted Plan:
[Reordered implementation addressing HIGH risks first]
Proceed with this plan?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: Proceed, or ask only when it matters
Reversible local work (git-tracked edits, files with a backup, dry-runs): state the top risks in two or three lines and proceed.
Ask the user first only when a HIGH risk is irreversible, outward-facing (live customer data, emails or posts, deploys, money) or expensive. They may accept the plan, add risks, or deprioritise mitigations.
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 naming the main risks
- Generate generic risks (be specific to THIS task)
- Skip high-risk mitigations to save time
- Assume "it probably won't happen"
- Proceed past an irreversible, outward-facing or expensive HIGH risk without asking
- Block reversible local work waiting for an 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"
Pre-mortem Analysis: Stripe Payment Integration
If this fails in 2 weeks, it's probably because:
1. HIGH: Webhook signature validation wrong
Impact: Payments process but our system never knows - orders stuck in limbo
Detection: Customer complaints about "paid but not delivered"
Mitigation: Test webhooks with Stripe CLI locally before writing business logic
2. HIGH: No idempotency keys
Impact: Network retry causes duplicate charges
Detection: Customer charged twice, refund requests
Mitigation: Implement idempotency keys from the start, not retrofitted
3. HIGH: Test vs live key confusion
Impact: Real charges in development, or test mode in production
Detection: Angry customers or "payments not working" in prod
Mitigation: Env validation on startup, assert key prefix matches environment
4. MED: Missing error states in UI
Impact: User sees spinner forever, retries, double charge
Detection: Support tickets, rage clicks in analytics
Mitigation: Design loading/error/success states before API integration
5. MED: No payment logging
Impact: Can't debug failed payments, refund disputes unwinnable
Detection: "We have no record of this" situations
Mitigation: Log every payment event with correlation ID
Adjusted Plan:
1. Set up Stripe CLI + webhook endpoint (test signature validation)
2. Implement idempotency key generation
3. Add environment validation (key prefix checks)
4. Build payment service with full logging
5. Create UI states (loading/error/success)
6. Then: actual payment flow implementation
7. End-to-end test with Stripe test cards
Proceed with this plan?Example 2: Database Migration
User: "Add soft delete to all models"
Pre-mortem Analysis: Soft Delete Migration
If this fails in 2 weeks, it's probably because:
1. HIGH: Existing queries return "deleted" records
Impact: Users see deleted data, privacy/legal issues
Detection: "Why is this showing up? I deleted it"
Mitigation: Add default scope, audit ALL existing queries before migration
2. HIGH: Unique constraints now broken
Impact: Can't recreate record with same email/username after soft delete
Detection: "Email already exists" on new signup
Mitigation: Make unique constraints exclude deleted records, or use different approach
3. HIGH: No rollback path
Impact: If migration fails midway, data integrity unknown
Detection: 500 errors, inconsistent state
Mitigation: Test on production clone first, have restore procedure ready
4. MED: Cascade deletes still hard-delete related records
Impact: Parent soft-deleted but children gone forever
Detection: Missing related data after restore
Mitigation: Audit all ON DELETE CASCADE, convert to soft delete
5. MED: Analytics/reporting now wrong
Impact: Counts include deleted records, metrics inflated
Detection: "Numbers don't match the UI"
Mitigation: Update all aggregate queries to filter deleted
Adjusted Plan:
1. Audit all existing queries (grep for affected tables)
2. Audit unique constraints and cascades
3. Design soft delete schema (deleted_at column approach)
4. Create migration with rollback script
5. Test on staging with production data clone
6. Update queries one-by-one with tests
7. Then: deploy migration
8. Monitor for "deleted showing" errors
Proceed with this plan?Example 3: Minor Task (Pre-mortem Not Needed)
User: "Fix the typo in the error message"
This is a trivial change (single string edit). Pre-mortem not needed.
Proceeding directly.<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>
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

