agentleFS
drafthqdrafthq/draft/skills/incident-response/SKILL.md

incident-response

Skill40 starsChanged 4 months agoMITView on GitHub

Incident management lifecycle — triage, communicate, mitigate, postmortem. Three modes — new (start incident), update (status update), postmortem (blameless RCA report).

81 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use dora-metrics, background-jobs 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.
  • jholhewresSkill

    dora-metrics

    Calculate DORA metrics from git + deploy logs

    Also in 3 projects that use this

  • YepAPISkill

    background-jobs

    Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

    Also in 4 projects that use this

  • MicrosoftSkill

    data-modeling

    Use when the app needs to store or read data — records, a database, entities, CRUD, lists, "save/remember X", or per-user data with row-level security. This app's data layer is Rayfin's: you declare entities as TypeScript classes with decorators in rayfin/data/, register them in the schema, and read/write them through the typed rayfin-client. Covers: defining an @entity, field decorators, registering it, per-entity access with @role, owner-only row-level security, and the client query/mutation API. Triggers: data, database, model, entity, schema, table, record, CRUD, create, read, update, delete, list, store, save, persist, per-user, row-level security, RLS, access control, ownership.

    Also in 7 projects that use this

  • YepAPISkill

    data-pipelines

    ETL patterns, cron scheduling, queue-based processing, and batch jobs with Inngest/BullMQ.

    Also in 4 projects that use this

  • mmondoraSkill

    infrastructure-as-code

    Infrastructure as Code with Terraform and Pulumi. State management, modularity, drift detection, secrets handling. Use when provisioning cloud resources, writing Terraform/Pulumi modules, or managing infrastructure configuration.

    Also in 5 projects that use this

  • csiddhant796-blipSkill

    threat-detection

    Use when hunting for threats in an environment, analyzing IOCs, or detecting behavioral anomalies in telemetry. Covers hypothesis-driven threat hunting, IOC sweep generation, z-score anomaly detection, and MITRE ATT&CK-mapped signal prioritization.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. 0 are common, 12 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 68 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check for Draft context:

    line 24
  2. Very specific:

    If available, follow the base procedure in core/shared/draft-context-loading.md.

    line 32
  3. Very specific:

    If Jira ticket linked: pull details via MCP (get_issue, get_issue_description, get_issue_comments)

    line 78
  4. Very specific:

    Use curl/wget to fetch dashboards or error pages mentioned

    line 80
  5. Very specific:

    Use ssh to access remote log paths if mentioned

    line 81
  6. Very specific:

    If GitHub MCP available: check recent deployments (last 24h)

    line 82
  7. Distinctive:

    Can we rollback?: If yes and severity ≥ SEV2: recommend rollback first, investigate after

    line 89
  8. Distinctive:

    Can we hotfix?: If rollback not possible: identify minimal fix

    line 90
  9. Distinctive:

    Need to escalate?: If none of above work, escalate severity

    line 92
  10. Distinctive:

    Document all actions taken with timestamps.

    line 94
  11. Distinctive:

    Read existing incident file

    line 130
  12. Distinctive:

    Add new timeline entry with timestamp

    line 131
  13. Distinctive:

    Update status field if changed

    line 132
  14. Distinctive:

    Update severity if changed (with justification)

    line 133
  15. Distinctive:

    Read incident file for timeline and evidence

    line 142
  16. Distinctive:

    If Jira MCP: pull ticket history and transitions

    line 144
  17. Distinctive:

    If GitHub MCP: pull changes submitted during/after incident

    line 145
  18. Distinctive:

    Detection Lag: When was the bug introduced vs when was it detected?

    line 160
  19. Very specific:

    HLD Claims vs Reality (): If the affected service has a hld.md (search draft/tracks/*/hld.md for §Detailed Design components matching the …

    line 164
  20. Very specific:

    MANDATORY: Include YAML frontmatter with git metadata: Follow core/shared/git-report-metadata.md.

    line 174

“Common” is measured: kept by at least 6 in 10 of the 68 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Incident Response

You are managing an incident through its full lifecycle using structured incident management practices.

Red Flags — STOP if you're

  • Fixing before communicating (stakeholders must know first)
  • Skipping severity classification
  • Writing a postmortem with blame (blameless only)
  • Closing an incident without prevention items
  • Ignoring rollback as a mitigation option

Communicate first. Fix second. Learn always.


Pre-Check

  1. Check for Draft context:
ls draft/ 2>/dev/null

This skill works standalone — incidents don't wait for project setup.

  1. If available, follow the base procedure in core/shared/draft-context-loading.md.

Step 1: Parse Arguments

  • /draft:incident-response new <description> — Start new incident
  • /draft:incident-response update <status> — Post status update
  • /draft:incident-response postmortem — Generate postmortem report
  • /draft:incident-response (no args) — Interactive: ask which mode

NEW Mode — Start Incident

Step 2: Triage

Classify severity:

LevelResponse TimeWhoExamples
SEV1Immediate, all-handsEntire teamData loss, complete outage, security breach
SEV215 minutesOn-call + team leadMajor feature broken, significant degradation
SEV31 hourOn-callMinor feature broken, workaround exists
SEV4Next business dayAssigned engineerCosmetic issue, minor inconvenience

Assess:

  1. What is broken? (from description or Jira ticket)
  2. Who is affected? (from draft/product.md user types if available)
  3. What is the blast radius? (from draft/.ai-context.md service topology if available)
  4. Is data at risk? (escalate to SEV1 if yes)

Step 3: Communicate

Generate initial status update:

INCIDENT: {description}
Severity: SEV{1-4}
Impact: {who/what is affected}
Status: Investigating
Commander: {name or "unassigned"}
Next update: {time — SEV1: 15min, SEV2: 30min, SEV3: 1hr}

Step 4: Gather Evidence

  • If Jira ticket linked: pull details via MCP (get_issue, get_issue_description, get_issue_comments)
  • Extract URLs and log paths from ticket
  • Use curl/wget to fetch dashboards or error pages mentioned
  • Use ssh to access remote log paths if mentioned
  • If GitHub MCP available: check recent deployments (last 24h)
  • Record all evidence in incident timeline

Step 5: Mitigate

Following core/agents/ops.md production-safety mindset:

  1. Can we rollback? If yes and severity ≥ SEV2: recommend rollback first, investigate after
  2. Can we hotfix? If rollback not possible: identify minimal fix
  3. Can we mitigate? Feature flag, config change, traffic routing
  4. Need to escalate? If none of above work, escalate severity

Document all actions taken with timestamps.

Step 6: Save Incident File

Save to: draft/incidents/incident-<timestamp>.md or draft/tracks/<id>/incident.md

# Incident: {description}

| Field | Value |
|-------|-------|
| **Severity** | SEV{N} |
| **Status** | {Investigating/Mitigating/Resolved} |
| **Started** | {timestamp} |
| **Commander** | {name} |

## Timeline
| Time | Action |
|------|--------|
| {time} | Incident detected |
| {time} | Triage: classified as SEV{N} |
| {time} | {mitigation action} |

## Evidence
| Source | Finding |
|--------|---------|
| {source} | {finding} |

## Status Updates
{chronological updates}

UPDATE Mode

  1. Read existing incident file
  2. Add new timeline entry with timestamp
  3. Update status field if changed
  4. Update severity if changed (with justification)
  5. Generate formatted status update for stakeholders

POSTMORTEM Mode

Step 2: Gather Timeline

  • Read incident file for timeline and evidence
  • git log for related commits during incident window
  • If Jira MCP: pull ticket history and transitions
  • If GitHub MCP: pull changes submitted during/after incident

Step 3: Root Cause Analysis

Reference core/agents/rca.md methodology:

  1. 5 Whys Analysis:
    • Why did {symptom} happen? → Because {cause 1}
    • Why {cause 1}? → Because {cause 2}
    • Continue until root cause reached (typically 3-5 levels)
  2. Root Cause Classification:
    • Logic error | Race condition | Data corruption | Configuration error
    • Dependency failure | Capacity exceeded | Security exploit | Human error
  3. Detection Lag: When was the bug introduced vs when was it detected?
  4. SLO Impact: Which SLOs were affected and by how much?
  5. HLD Claims vs Reality (): If the affected service has a hld.md (search draft/tracks/*/hld.md for §Detailed Design components matching the failing module), compare incident behavior against HLD claims:
    • Did §Resiliency claims (graceful degradation, circuit breakers, timeout handling) actually hold during the incident?
    • Did §Multi-tenancy claims (tenant isolation, predictable performance) hold? Did one tenant impact another?
    • Did §Upgrade claims (backward compat, dependent service order) hold? Did an upgrade trigger this?
    • Did §Scale claims hold under the load that triggered the incident?
    • Did §Observability claims hold — were the listed key metrics sufficient for detection?
    • Cite the specific HLD §section using section text (draft/tracks/<id>/hld.md §Resiliency) for each gap — avoid markdown anchor slugs since renderers (GitHub, mkdocs, Hugo) generate different slugs for nested headings. These citations feed the §Action Items as "amend HLD §X — claim was {claim} but reality showed {reality}."

Step 4: Generate Postmortem

MANDATORY: Include YAML frontmatter with git metadata. Follow core/shared/git-report-metadata.md.

Save to: draft/incidents/postmortem-<timestamp>.md with symlink postmortem-latest.md Or track-scoped: draft/tracks/<id>/postmortem.md

# Postmortem: {incident title}

## Summary
{2-3 sentences: what happened, impact, duration}

## Impact
- **Duration:** {start} to {end} ({total time})
- **Users affected:** {count or percentage}
- **SLO impact:** {which SLOs, by how much}
- **Data impact:** {any data loss or corruption}

## Timeline
| Time | Event |
|------|-------|
| {time} | {event} |

## Root Cause
{1-2 sentence root cause statement}

### 5 Whys
1. Why? → {answer}
2. Why? → {answer}
...

### Classification
- **Type:** {classification}
- **Detection Lag:** {introduced} → {detected} = {gap}

## What Went Well
- {positive observations}

## What Went Wrong
- {things that made the incident worse}

## Design Claims vs Reality
{populated when an HLD was available — list each HLD claim that did not hold, citing the specific §section}

| HLD Section | Claim | Reality During Incident | Recommended HLD Amendment |
|-------------|-------|-------------------------|---------------------------|
| §Resiliency | {what was claimed} | {what actually happened} | {how to update HLD} |

## Action Items
| # | Action | Owner | Deadline | Status |
|---|--------|-------|----------|--------|
| 1 | {detection improvement} | {name} | {date} | [ ] |
| 2 | {process improvement} | {name} | {date} | [ ] |
| 3 | {code improvement} | {name} | {date} | [ ] |
| 4 | Amend `draft/tracks/<id>/hld.md` §{section} (if claim drift identified) | {design owner} | {date} | [ ] |

Step 5: Jira Sync

Follow core/shared/jira-sync.md:

  • Attach postmortem to Jira ticket
  • Post comment: "[draft] Postmortem complete. Root cause: {1-line summary}. {N} action items."

⚠️ Test Writing Guardrail: If postmortem identifies missing tests, ASK: "Want me to create regression test tasks? [Y/n]"

Cross-Skill Dispatch

  • Triggered by: /draft:new-track when incident keywords detected in description
  • Postmortem feeds into: /draft:regression (find the breaking commit), /draft:learn (update guardrails)
  • Can create: Bug track via /draft:new-track for the fix

Error Handling

If no incident file found (update/postmortem mode): List available incidents, ask which one If no Jira ticket: Proceed without sync, note: "Link a Jira ticket for automatic sync"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

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.