Incident response workup for a lead in hand — an alert, an IOC, or a /dnr-hunt finding. Scopes the lead across the logs, verdicts whether the attack succeeded, quantifies blast radius, confirms root cause in source with a local PoC, and writes a proposed (never executed) containment/remediation/recovery plan. Use when asked to "respond to this alert", "work this incident", "how bad is this", or "run dnr-respond". /dnr-hunt is the no-alert entry to the same track.
Lead-in-hand incident response: take one concrete starting point and answer the four questions an incident commander needs, in order — what happened, did it succeed, how far did it go, and what do we do about it. The output is a verdict, a quantified blast radius, a root cause proven in source, and a response plan that is proposed, never executed.
Invoke with /dnr-respond <lead> [--logs dir] [--repo path] [--fresh].
The lead ($1) can be:
INCIDENTS.json (e.g. INC-2) — the
/dnr-hunt handoffOther arguments:
--logs = logs directory or dnr target directory (same resolution as
/dnr-hunt; defaults to targets/dnrcanary if it exists, else cwd).--repo = application source (defaults to the target's app/).--fresh = ignore any checkpoint in the run dir's .dnr-respond-state/
and mint a new run dir.confirmed_exploited requires log evidence + the flaw in source + a PoC
fired locally this session. Otherwise the ceiling is suspected.Read or cat a log file; wc/head/
tail to profile, grep/awk/sort/uniq/python3 to interrogate.
Small files (alert queues, error logs under ~200 lines) may be read whole.127.0.0.1 against an instance you
started. Never touch a remote host.First action — establish the run directory, the same way /dnr-hunt
does, but as a consumer. Let TARGET be the basename of the resolved
--logs/target path (default targets/dnrcanary) and SCOPE that path.
INC-n (the /dnr-hunt handoff, or a second lead from a hunt
you already started responding to): work the response into the investigation
that incident lives in. {RUN} is the newest results/TARGET/<timestamp>/
directory that contains an INCIDENTS.json — find it with Bash, e.g.
ls -1d results/TARGET/*/ | sort -r | while read d; do [ -f "$d/INCIDENTS.json" ] && echo "$d" && break; done.
Do not call rundir for an INC-n lead — rundir mints a fresh empty
dir once a prior /dnr-respond in that dir has completed, which would strand
the incident's INCIDENTS.json in the old dir. Only if no run dir holds an
INCIDENTS.json (you were handed INC-n but never ran the hunt) fall through
to the rundir line below.python3 .claude/skills/_lib/checkpoint.py rundir results/TARGET --state .dnr-respond-state --scope "SCOPE"
(append --fresh if it's in $ARGUMENTS). This adopts the newest run dir for
the target if one exists, else mints a fresh results/TARGET/<timestamp>/.That path is {RUN}; substitute the literal path everywhere below, and
double-quote it (and SCOPE) in Bash.
Checkpoint mechanics are identical to /dnr-hunt, state dir
{RUN}/.dnr-respond-state/, phases 0–4. When {RUN} already holds a
completed .dnr-respond-state from an earlier lead, load reports
complete and the rules below reset it cleanly — a second lead enriches the
same INCIDENTS.json and writes its own RESPONSE-<lead>.md. On start:
python3 .claude/skills/_lib/checkpoint.py load {RUN}/.dnr-respond-state —
absent/complete/--fresh → reset and start at Phase 0; running with
phase_done == N → read phase0.json…phaseN.json, resume at N+1. After
each phase: Write payload to {RUN}/.dnr-respond-state/_chunk.tmp, then
checkpoint.py save {RUN}/.dnr-respond-state <N> <name> --from {RUN}/.dnr-respond-state/_chunk.tmp.
Never write progress.json directly; never pass payload via heredoc/stdin.
After outputs: checkpoint.py done {RUN}/.dnr-respond-state 4.
--logs (dnr target config or bare directory) and inventory log
files (du, wc -l, head -2 each — identify formats and field
positions). The corpus is expected to exist already — the target README
covers generating it.INC-n → read that entry from {RUN}/INCIDENTS.json (the run dir
adopted above); its IPs, accounts, routes, and timeline rows are the
seed set.Checkpoint phase0.json:
{"lead": ..., "lead_type": ..., "entities": {"ips": [], "accounts": [], "routes": [], "windows": []}, "question": ..., "logs_dir": ..., "repo": ..., "files": [...]}
For each seed entity, extract its complete activity, then expand one ring:
Checkpoint phase1.json:
{"activity": [{"entity", "summary", "first_seen", "last_seen", "requests", "key_lines": [...]}], "expanded_entities": [...], "timeline": [...]}
Answer the working question with evidence on both sides:
seed_command early, before Phase 3, is fine).ruled_out record.Checkpoint phase2.json:
{"verdict": ..., "succeeded": bool, "discriminators": [...], "blast_radius": {"data": ..., "records": N, "distinct_victims": N, "window": ...}, "ongoing": bool, "last_activity": ...}
Same bar as /dnr-hunt Phase 3–4:
--repo; name the flaw (or the
defense) at file/function precision; check sibling routes for the same
flaw class.seed_command /
app_command are target-relative — run them with the target
directory as cwd; launch in the background via a single command that
prints the PID (the same python3 -c "...subprocess.Popen..." pattern
/dnr-hunt Phase 4 shows, with the port override env var if the default
port is busy). Fire the minimal PoC, record command + response
excerpt, fire the negative PoC against defended routes, then
kill <pid> (never by port or pattern).suspected, stated explicitly.Checkpoint phase3.json:
{"root_cause": {"file", "function", "mechanism"}, "poc": {"command", "status", "response_excerpt"}, "negative_poc": {...}, "siblings_checked": [...]}
Write the plan to {RUN}/RESPONSE.md — or {RUN}/RESPONSE-<lead>.md (e.g.
RESPONSE-INC-2.md) if a RESPONSE.md from a different lead already
exists in the run dir; never silently overwrite another incident's plan.
Sections, every action carrying what / why / risk-if-wrong:
/triage-compatible vuln entry;
interim mitigations if the fix will take time.Then update {RUN}/INCIDENTS.json (same schema as /dnr-hunt; create it if
absent): add or enrich this incident — verdict, quantified impact, root
cause, PoC, timeline. Extra keys are fine — graders match on content, not
structure. Negative outcomes go to ruled_out.
Mark complete (checkpoint.py done {RUN}/.dnr-respond-state 4) and point the
user onward (substitute the literal {RUN} path):
{RUN}: /triage INCIDENTS.json --repo <repo>
then /patch TRIAGE.json --repo <repo> — both write to the directory
they're invoked from, so running them there lands the verdicts and
patches beside the incidentspython <target>/grade.py {RUN}/INCIDENTS.json to
self-score (the user runs this)d3bea6b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.