plugins/clade/skills/incident/SKILL.md
Incident response mode — diagnose a production issue, write a postmortem, add follow-up tasks to TODO.md. Use when user says "/incident [description]".
npx skillsauth add shenxingy/claude-code-kit incidentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This workflow runs directly in Codex. Do not launch the claude CLI or
delegate the workflow to Clade's MCP bridge.
Codex compatibility rules:
AGENTS.md files for repository instructions. If a project
has only CLAUDE.md, treat it as legacy project guidance and read it too..clade/ (or ~/.clade/ for personal
state). Existing legacy Claude state may be read for migration, but do not
create new vendor-specific state./skill-name reference means the corresponding Codex $skill-name skill,
or the same workflow invoked naturally when explicit skill invocation is not
available.<plugin-root>/... are relative to the installed Clade plugin
containing this SKILL.md; resolve that root before invoking a helper.This skill helps you systematically capture incidents, analyze their root causes, and extract lessons learned to prevent future recurrence.
If the user provided a description with /incident <description>, use that. Otherwise, ask the user:
Once you have the details, conduct a structured RCA:
settings-disconnect: Config defined but not wired, loaded, or callededge-case: Untested input, OS-specific behavior, empty/null/first-run stateasync-race: TOCTOU (time-of-check-time-of-use), stale closures, missing locks, zombie processessecurity: Unsanitized input, leaked secrets, missing auth/validationdeploy-gap: Source differs from deployed, config not reloaded, code defined but not called at runtimeCreate or update .clade/incidents.md with a new entry:
## Incident — {date: YYYY-MM-DD}
**What:** {1-2 sentence symptom - what went wrong}
**Context:** {1-2 sentences - what was being done, what changed}
**Root cause:** {1-2 sentences - why did it happen, which category}
**Fix applied:** {how was it resolved, if immediate fix exists}
**Prevention:** {what should prevent this next time - concrete steps, not vague}
Example:
## Incident — 2026-02-26
**What:** API endpoint returned 500 on startup, database connection string missing from error response.
**Context:** Deploying to production with new secrets management; assumed .env would be loaded from system but it wasn't.
**Root cause:** Secrets loading hook defined in config but never called during server startup. [deploy-gap]
**Fix applied:** Added explicit `await loadSecrets()` call in server init before database connect.
**Prevention:** Add startup checklist: (1) required envvars defined, (2) all config-loading hooks executed, (3) test startup on fresh container.
If the incident reveals a pattern worth remembering, offer to append a rule to corrections/rules.md:
Format:
- [YYYY-MM-DD] {domain} ({root-cause-category}): {do this} instead of {not this}
Example:
- [2026-02-26] deploy (deploy-gap): Call `loadSecrets()` explicitly in server init — not rely on framework autoload
Ask the user if they want to add the rule. If yes, append it to the file. If no, skip.
Once the incident entry is written, print:
✓ Incident logged to .clade/incidents.md — [link to timestamp]
If a rule was added:
✓ Corrective rule added to corrections/rules.md
# Incident Log\n\n.# Correction Rules\n\n./incident with optional description: /incident "API timeout during batch job".clade/incidents.md.clade/blockers.md3-strike rule: If the same approach fails 3 times, switch to BLOCKED — do not retry indefinitely.
development
Orchestrate a fleet of parallel `codex exec` workers with you (Claude Code) as the supervisor — spawn one per isolated git worktree, dispatch headless, verify each INDEPENDENTLY, PR/merge. The manual "codex-ultracode" pattern for fanning out real implementation, research, or review work onto Codex. Bakes in the hard gotchas (stdin blocking, background tracking, don't-trust-self-reports, writer isolation). Triggers on — orchestrate codex, codex workers, codex fleet, spawn codex, delegate to codex in parallel, manual ultracode, 开 codex 小弟, 派 codex worker — NOT for a single cross-vendor opinion (use the `second-opinion-codex` agent), NOT for web-UI worker decomposition (use `/orchestrate`).
development
Create and manage git worktrees for parallel Codex sessions
development
Verify project behavior anchors — compilation, tests, and interaction checks after autonomous runs. NOT the Codex built-in /verify (which runs the app to observe a single change working) — this one walks the AGENTS.md "Features (Behavior Anchors)" list.
documentation
End-of-session documentation sync — updates TODO.md and PROGRESS.md only (run /commit after to commit everything)