incident

A predefined incident-response workflow for handling a service problem through triage, containment, investigation, root-cause analysis, and follow-up learning.

In plain words
What is it for?
Use it to assess impact, roll back or limit affected features, gather logs and traces, confirm root causes, and create a post-incident report with assigned actions.
Why use it?
It provides an ordered response when an incident is affecting users, helping the team limit harm before spending time on deeper diagnosis.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/caiaffa/claude-code-ultimate-engineering-system/incident
Clone the repo
git clone --depth 1 https://github.com/caiaffa/claude-code-ultimate-engineering-system

Made for: Claude Code.

Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 276 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00011 $0.00276
Opus 5 $0.00005 $0.00138
Sonnet 5 $0.00002 $0.00055
Haiku 4.5 $0.00001 $0.00028

Measured 2d ago against content hash 254a3719759c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

incident scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/incident.md · 34 lines

What it actually says

Phase 1: Triage + Contain (staff-sre, urgent)

Use the staff-sre agent immediately:

  • Assess: $ARGUMENTS
  • Triage user impact and blast radius
  • Contain: rollback, feature-flag, rate-limit — act before deep diagnosis

Phase 2: Investigate (parallel, after containment)

Run in parallel:

Subagent A — systematic-debugging (backend-platform-engineer):

  • List top 3 hypotheses for the root cause
  • For each, identify the ONE confirmation signal
  • Narrow and verify

Subagent B — observability-engineer:

  • Gather relevant traces, metrics, and logs
  • Identify detection gaps
  • Check if existing alerts fired (and when)

Phase 3: Root cause (sequential)

Use the backend-platform-engineer agent with deep-root-cause-investigator skill:

  • Build full cause chain: symptom → trigger → local cause → systemic cause
  • Identify failed detection and failed containment

Phase 4: Learn (sequential)

Use the staff-sre agent with postmortem-reviewer and incident-learning-loop skills:

  • Fill POSTMORTEM_TEMPLATE.md
  • Identify standards/templates that should change
  • Assign corrective actions with owner + deadline
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 34 lines · 11 tokens per session scan A 254a3719759c

Subscribe to this mod's changes

incident is a command published in the GitHub repository caiaffa/claude-code-ultimate-engineering-system (17 stars, last pushed 2mo ago), licensed MIT. It adds 11 tokens to every session and 276 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.