Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Identify failure modes before they occur using structured risk analysis
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 134% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 253% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 88% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 160% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 167% | 0% |
Identify failure modes before they occur by systematically questioning plans, designs, and implementations. Based on Gary Klein's technique, popularized by Shreyas Doshi (Stripe).
/premortem # Auto-detect context, choose depth
/premortem quick # Force quick analysis (plans, PRs)
/premortem deep # Force deep analysis (before implementation)
/premortem <file> # Analyze specific plan or code> "Imagine it's 3 months from now and this project has failed spectacularly. Why did it fail?"
| Category | Symbol | Meaning | |----------|--------|---------| | Tiger | [TIGER] | Clear threat that will hurt us if not addressed | | Paper Tiger | [PAPER] | Looks threatening but probably fine | | Elephant | [ELEPHANT] | Thing nobody wants to talk about |
Do NOT flag risks based on pattern-matching alone. Every potential tiger MUST go through verification.
Common mistakes that create false tigers:
if exists(): fallbackBefore flagging ANY tiger, verify:
yamlpotential_finding: what: "Hardcoded path at line 42" verification: context_read: true # Did I read ±20 lines around the finding? fallback_check: true # Is there try/except, if exists(), or else branch? scope_check: true # Is this even in scope for this code? dev_only_check: true # Is this in __main__, tests/, or dev-only code? result: tiger | paper_tiger | false_alarm
If ANY verification check is "no" or "unknown", DO NOT flag as tiger.
Every tiger MUST include:
yamltiger: risk: "<description>" location: "file.py:42" severity: high|medium # REQUIRED - what mitigation was checked and NOT found: mitigation_checked: "No exists() check, no try/except, no fallback branch"
If you cannot fill in mitigation_checked with specific evidence, it's not a verified tiger.
python# Auto-detect based on context if in_plan_creation: depth = "quick" # Localized scope elif before_implementation: depth = "deep" # Global scope elif pr_review: depth = "quick" # Localized scope else: # Ask user AskUserQuestion( question="What depth of pre-mortem analysis?", header="Depth", options=[ {"label": "Quick (2-3 min)", "description": "Plans, PRs, localized changes"}, {"label": "Deep (5-10 min)", "description": "Before implementation, global scope"} ] )
Run through these mentally, note any that apply:
Core Questions:
Output Format:
yamlpremortem: mode: quick context: "<plan/PR being analyzed>" # Two-pass process: first gather potential risks, then verify each one potential_risks: # Pass 1: Pattern-matching findings - "hardcoded path at line 42" - "missing error handling for X" # Pass 2: After verification tigers: - risk: "<description>" location: "file.py:42" severity: high|medium category: dependency|integration|requirements|testing mitigation_checked: "<what was NOT found>" # REQUIRED elephants: - risk: "<unspoken concern>" severity: medium paper_tigers: - risk: "<looks scary but ok>" reason: "<why it's fine - what mitigation EXISTS>" location: "file.py:42-48" # Show the mitigation location false_alarms: # Findings that turned out to be nothing - finding: "<what was initially flagged>" reason: "<why it's not a risk>"
Work through each category systematically:
Technical Risks:
Integration Risks:
Process Risks:
Testing Risks:
Output Format:
yamlpremortem: mode: deep context: "<implementation being analyzed>" # Two-pass process potential_risks: # Pass 1: Initial scan findings - "no circuit breaker for external API" - "hardcoded timeout value" # Pass 2: After verification (read context, check for mitigations) tigers: - risk: "<description>" location: "file.py:42" severity: high|medium category: scalability|dependency|data|security|integration|testing mitigation_checked: "<what mitigations were looked for and NOT found>" suggested_fix: "<how to address>" elephants: - risk: "<unspoken concern>" severity: medium|high suggested_fix: "<suggested approach>" paper_tigers: - risk: "<looks scary>" reason: "<why it's actually ok - cite the mitigation code>" location: "file.py:45-52" false_alarms: - finding: "<initial concern>" reason: "<why verification showed it's not a risk>" checklist_gaps: - category: "<which checklist section>" items_failed: ["<item1>", "<item2>"]
BLOCKING: Present findings and require user decision.
python# Build risk summary risk_summary = format_risks(tigers, elephants) AskUserQuestion( question=f"""Pre-Mortem identified {len(tigers)} tigers, {len(elephants)} elephants: {risk_summary} How would you like to proceed?""", header="Risks", options=[ { "label": "Accept risks and proceed", "description": "Acknowledged but not blocking" }, { "label": "Add mitigations to plan (Recommended)", "description": "Update plan with risk mitigations before proceeding" }, { "label": "Research mitigation options", "description": "I don't know how to mitigate - help me find solutions" }, { "label": "Discuss specific risks", "description": "Talk through particular concerns" } ] )
python# Log acceptance for audit trail print("Risks acknowledged. Proceeding with implementation.") # Continue to next workflow step
python# User provides mitigation approach # Update plan file with mitigations section # Re-run quick premortem to verify mitigations address risks
python# Spawn parallel research for each HIGH severity tiger for tiger in high_severity_tigers: # Internal: How has codebase handled this before? Task( subagent_type="scout", prompt=f""" Find how this codebase has previously handled: {tiger.category} Specifically looking for patterns related to: {tiger.risk} Return: - File:line references to similar solutions - Patterns used - Libraries/utilities available """ ) # External: What are best practices? Task( subagent_type="oracle", prompt=f""" Research best practices for: {tiger.risk} Context: {tiger.category} in a {tech_stack} codebase Return: - Recommended approaches (ranked) - Library options - Common pitfalls to avoid """ ) # Wait for research to complete # Synthesize options # Present via AskUserQuestion with 2-4 mitigation options
python# Ask which risk to discuss AskUserQuestion( question="Which risk would you like to discuss?", header="Risk", options=[format_risk_option(r) for r in all_risks[:4]] ) # Then have conversation about that specific risk
If user added mitigations, append to the plan:
markdown## Risk Mitigations (Pre-Mortem) ### Tigers Addressed: 1. **{risk}** (severity: {severity}) - Mitigation: {user_or_researched_mitigation} - Added to phase: {phase_number} ### Accepted Risks: 1. **{risk}** - Accepted because: {reason} ### Pre-Mortem Run: - Date: {timestamp} - Mode: {quick|deep} - Tigers: {count} - Elephants: {count}
After plan structure is approved, before ExitPlanMode:
python# Run quick premortem /premortem quick # If HIGH risks found, block until addressed # If only MEDIUM/LOW, inform and proceed
python# Run deep premortem on full plan /premortem deep thoughts/shared/plans/YYYY-MM-DD-feature.md # Block until all HIGH tigers addressed
python# Run quick premortem on diff scope /premortem quick # Inform of any risks found
| Severity | Blocking? | Action Required | |----------|-----------|-----------------| | HIGH | Yes | Must address or explicitly accept | | MEDIUM | No | Inform user, recommend addressing | | LOW | No | Note for awareness |
User: /premortem deep thoughts/shared/plans/2026-01-08-api-rate-limiting.md
Claude: Running deep pre-mortem on API rate limiting plan...
[Reviews plan against deep checklist]
Pre-mortem complete. Found 2 tigers, 1 elephant:
**TIGERS:**
1. [HIGH] No circuit breaker for external payment API
- Category: dependency
- If payment API is slow/down, requests will pile up
2. [HIGH] No rollback strategy defined
- Category: integration
- If rate limiting breaks auth flow, no quick fix path
**ELEPHANTS:**
1. [MEDIUM] Team hasn't used Redis before
- We're introducing Redis for rate limit counters
- Learning curve could slow implementation
**PAPER TIGERS:**
1. Database migration size - Only adds one index, <1s migration
[AskUserQuestion presented]
User: Research mitigation options
Claude: Researching mitigations...
[Spawns scout + oracle in parallel]
Found 3 options for circuit breaker:
1. **Use existing retry util** (Recommended)
- Found at src/utils/retry.ts:45
- Already handles exponential backoff
- Just need to add circuit breaker state
2. **Add resilience4j-lite**
- Popular library for this pattern
- More features but new dependency
3. **Custom implementation**
- Full control but more code to maintain
Which approach for the circuit breaker?
User: Option 1 - use existing retry util
Claude: Added to plan:
## Risk Mitigations (Pre-Mortem)
### Tigers Addressed:
1. **No circuit breaker** (HIGH)
- Mitigation: Extend src/utils/retry.ts with circuit breaker state
- Added to Phase 1
Shall I also address the rollback strategy tiger?| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-08 | fail→pass | 10,464 | 7,156 | -32% | 1 | 1 | 0% | 1,842 | 4,303 | +134% | 0 | 0 | — |
case-01 | fail→fail | 16,438 | 3,974 | -76% | 1 | 1 | 0% | 2,765 | 3,473 | +26% | 0 | 0 | — |
case-02 | fail→fail | 16,369 | 5,348 | -67% | 1 | 1 | 0% | 326 | 3,738 | +1047% | 0 | 0 | — |
case-03 | fail→fail | 16,496 | 4,014 | -76% | 1 | 1 | 0% | 3,191 | 3,349 | +5% | 0 | 0 | — |
case-04 | pass→fail | 10,312 | 6,279 | -39% | 1 | 1 | 0% | 1,540 | 3,486 | +126% | 0 | 0 | — |
case-05 | pass→pass | 11,103 | 15,961 | +44% | 1 | 1 | 0% | 1,899 | 4,529 | +138% | 0 | 0 | — |
case-06 | fail→fail | 9,626 | 15,773 | +64% | 1 | 1 | 0% | 628 | 5,092 | +711% | 0 | 0 | — |
case-07 | fail→fail | 7,755 | 3,302 | -57% | 1 | 1 | 0% | 1,318 | 3,715 | +182% | 0 | 0 | — |
case-09 | pass→pass | 8,453 | 5,512 | -35% | 1 | 1 | 0% | 1,379 | 4,078 | +196% | 0 | 0 | — |
case-10 | fail→pass | 6,361 | 2,319 | -64% | 1 | 1 | 0% | 1,006 | 3,555 | +253% | 0 | 0 | — |
case-11 | pass→pass | 11,522 | 5,919 | -49% | 1 | 1 | 0% | 1,834 | 4,099 | +124% | 0 | 0 | — |
case-12 | pass→pass | 9,319 | 6,304 | -32% | 1 | 1 | 0% | 1,530 | 4,197 | +174% | 0 | 0 | — |
case-13 | fail→pass | 12,353 | 3,149 | -75% | 1 | 1 | 0% | 1,962 | 3,684 | +88% | 0 | 0 | — |
case-14 | fail→pass | 8,862 | 3,748 | -58% | 1 | 1 | 0% | 1,478 | 3,850 | +160% | 0 | 0 | — |
case-15 | fail→pass | 9,631 | 5,628 | -42% | 1 | 1 | 0% | 1,510 | 4,026 | +167% | 0 | 0 | — |
case-16 | pass→pass | 10,624 | 3,303 | -69% | 1 | 1 | 0% | 1,747 | 3,855 | +121% | 0 | 0 | — |
case-17 | pass→pass | 10,324 | 5,261 | -49% | 1 | 1 | 0% | 1,418 | 4,074 | +187% | 0 | 0 | — |
case-18 | fail→pass | 13,141 | 8,510 | -35% | 1 | 1 | 0% | 2,184 | 4,704 | +115% | 0 | 0 | — |
case-19 | fail→fail | 9,286 | 3,870 | -58% | 1 | 1 | 0% | 1,565 | 3,882 | +148% | 0 | 0 | — |
case-20 | pass→pass | 14,792 | 5,983 | -60% | 1 | 1 | 0% | 2,525 | 4,259 | +69% | 0 | 0 | — |
case-21 | fail→pass | 10,262 | 6,239 | -39% | 1 | 1 | 0% | 1,868 | 4,187 | +124% | 0 | 0 | — |
case-22 | pass→pass | 7,812 | 2,380 | -70% | 1 | 1 | 0% | 1,259 | 3,556 | +182% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 18 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +27 percentage points is the difference between those two pass rates over the 18 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/29/2026 | +32% |
Other measured skills in the registry, with their headline benchmark lift.