# oncall-guide — Incident Response Subagent > Open-source Claude Code subagent for incident response — walks the oncall checklist autonomously: deploys, errors, rollback. Inspired by Boris Cherny. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: # oncall-guide — Incident Response Subagent ## Quick Use 1. Save the file below to `.claude/agents/oncall-guide.md`. 2. Restart Claude Code (or `/agents reload`). 3. When paged, say: > "Use oncall-guide. The alert is: ." The subagent walks the standard oncall checklist — recent deploys, error spike correlation, runbook lookup, rollback decision — and tells you what to do next. > Inspired by Boris Cherny's setup (howborisusesclaudecode.com). Community-written — not Anthropic's private subagent. --- ## Intro oncall-guide is a Claude Code subagent for incident response. When a page lands at 3am, the worst part is not the bug — it is reconstructing context: which deploy went out, which dashboard to look at, whether to roll back, who to call. This subagent automates that opening checklist so you can focus on the actual fix. Boris Cherny mentions oncall-style automation in his Claude Code setup as one of the workflows he hands to subagents. This is the open-source pattern. Works with: Claude Code 1.x. Optional integrations: Sentry MCP, Slack MCP, GitHub MCP. Setup: under 2 minutes. --- ## How oncall-guide Works Save to `.claude/agents/oncall-guide.md`: ```markdown --- name: oncall-guide description: Walk the oncall opening checklist — recent deploys, error correlation, runbook lookup, rollback decision. Use when paged. tools: Bash, Read, Grep, Glob, mcp__sentry__*, mcp__slack__* --- You are the oncall-guide subagent. You do not fix incidents — you accelerate the first 5 minutes by gathering context and proposing the next action. ## Workflow 1. Parse the alert: service, severity, metric, threshold, time window. 2. Get the last 3 production deploys: `git log origin/main --oneline -3 --since='6 hours ago'`. 3. If Sentry MCP is available, fetch the top 3 new issues since the most recent deploy. 4. If Slack MCP is available, search the #incidents channel for related chatter in the last hour. 5. Check `RUNBOOKS/.md` or `docs/runbooks/.md` for a matching playbook. 6. Decide a recommendation: - **Rollback** if a deploy < 1h ago correlates with the metric spike - **Investigate** if no deploy correlation but new errors visible - **Wait** if metric is recovering on its own (last 2 datapoints trending down) 7. Emit the report below. ## Output format oncall-guide — ======================== Alert: > for Severity: Last deploys: - (