runbook-writer
Writes an operational runbook for a service covering symptoms, diagnostic checks, mitigations, and escalation paths. Use when shipping a new service or when an existing service lacks incident procedures.
- License 许可
- MIT
- 最近更新
- 2026-10-14
- Stars
- ★ 25
- Forks
- 3
01 前言 Front Matter
- name
- runbook-writer
- metadata
- { "title": "Runbook Writer" }
- description
- Writes an operational runbook for a service covering symptoms, diagnostic checks, mitigations, and escalation paths. Use when shipping a new service or when an existing service lacks incident procedures.
03 SKILL.md 正文
Runbook Writer
A runbook is a recipe for a tired engineer at 2 AM. It must answer: what is broken, how do I confirm it, what do I try first, and when do I give up and escalate.
Required Sections
Every runbook gets exactly these sections in this order.
1. Service Overview (3-5 lines)
State what the service does, its criticality (which SEVs it can cause), its SLO target, and its direct dependencies. Skip history and rationale.
2. Symptoms and Alerts
List each alert that fires for this service. For each:
- Alert name and what condition triggers it.
- What it means in plain language (not the PromQL).
- Expected SEV range when it fires.
3. Diagnostic Checks
Numbered, runnable steps. Each step must be executable in under 2 minutes.
- Check service health endpoint and current error rate dashboard link.
- Check dependency health (upstream/downstream) - list the specific dashboards or commands.
- Check recent deploys: confirm or rule out a code change as cause.
- Check resource saturation: CPU, memory, disk, connection pool exhaustion.
- Check logs for the first occurrence of the error pattern.
Use real command patterns (no placeholders left for the user to invent). Mark any step that requires elevated permissions.
4. Mitigations (ordered by speed)
- Fast (under 5 min): rollback last deploy, toggle feature flag off, redirect traffic to healthy region.
- Medium (5-30 min): scale out replicas, drain and restart unhealthy pods, flush a poisoned cache.
- Slow (over 30 min): restore from backup, run a data repair job, coordinate with a dependency team.
Label each mitigation with its risk: Low / Medium / High. High-risk mitigations require IC approval.
5. Escalation Path
- First escalation: service team on-call. Include Slack handle or PagerDuty policy name.
- Second escalation: platform/infra team if the issue is infrastructure-layer.
- Third escalation: vendor support contact if a managed service (include account ID and SLA tier).
6. Post-Incident
Link to the postmortem template. Note any automatic rollback or alerting that should trigger after resolution.
Worked example: a diagnostic step
The difference between a paragraph and a procedure:
Bad: "Check if the database is healthy and connections are okay."
Good: "Run kubectl -n payments exec deploy/api -- pg_isready -h db.payments.internal -p 5432. Expect accepting connections. If it fails or times out, skip to Mitigation 3 (fail over to replica - requires IC approval) and page #db-oncall. If it succeeds, check pool saturation on the connections dashboard: above 90% used, go to Mitigation 2 (scale out API pods)."
The good version names the exact command, the expected output, the decision threshold, and what to do on both branches. A step without a failure branch is a step that stalls the incident.
Deliverable
Produce one runbook document per service, versioned alongside the service's code, containing exactly the six sections above - with real dashboard URLs, executable command patterns, named escalation contacts (Slack handles or PagerDuty policies), and a risk label on every mitigation. Someone who has never operated the service should be able to execute it end to end without asking a question in chat.
Quality bar
- Every diagnostic step is executable in under 2 minutes and states its expected output.
- Every step that can fail says what to do when it fails - no dead ends.
- Every mitigation carries a speed bracket (fast/medium/slow) and a risk label (Low/Medium/High).
- All links resolve and all commands are copy-pasteable; nothing requires the reader to invent a placeholder.
- The runbook lives in version control with the service, not in a wiki page nobody updates.
Do / Don't
- Do: include real URLs and command templates. A runbook without links is a paragraph, not a procedure.
- Do: version the runbook with the service. Stale runbooks cause more harm than none.
- Don't: document root-cause analysis in a runbook. That belongs in a postmortem.
- Don't: write steps that require guessing or judgment without a fallback. If a step can fail, say what to do when it fails.
04 同仓库更多 Skills
有氧运动计划
zone-2-cardio-plan
当有人要求制定稳态有氧训练计划、进行有氧基础训练或达到第二区间、安排轻松或耐力型的每周有氧训练、按心率区间训练,或提高静息心率、最大摄氧量或耐力时,可以使用此方案。该方案构建了一个包含训练计划结构、训练方式选择和进度安排的心率区间有氧训练模块。本方案仅提供一般健身指导,不构成医疗建议。请勿用于设计力量或举重训练计划(请使用力量训练计划)、高强度间歇训练 (HIIT) 或循环训练(请使用体能训练和 HIIT 计划),或灵活性/柔韧性训练(请使用灵活性训练计划)。
youtube-script-writer
Writes retention-engineered long-form YouTube scripts on a hook/body/payoff architecture - a first-30-seconds hook that survives the retention cliff, a beat-sheet body with mini-hooks and bridges, timed pattern interrupts, and a payoff that over-delivers - with B-roll and editing cues marked inline. Use when someone says "script my next video", "my retention graph dies at the start", "tighten this draft", or "outline a video on X". Do NOT use for the 3-second opener of TikTok, Reels, or Shorts - use video-hook-writer instead; do NOT use for spoken voiceover synced to on-screen tutorial actions - use narration-script instead; do NOT use for a sales demo built on a buyer's discovery notes - use demo-script instead; do NOT use to design the thumbnail and title - use thumbnail-concept instead.
win-back-campaign
Designs segmented win-back email sequences for dormant users - dormancy tiers, a three-beat sequence with a single proportional incentive, and a suppression rule - and measures success by re-activation, not opens. Use when someone says "our users went quiet", "design a win-back campaign", "how do I re-engage lapsed customers", "should we email people who haven't logged in for months", or lifecycle messaging has stopped landing with a lapsed segment. Do NOT use for recovering an unfinished checkout - use abandoned-cart-sequence instead. Do NOT use for diagnosing and fixing why active customers cancel - use churn-reduction instead. Do NOT use for building always-on onboarding or nurture flows - use email-drip-builder instead.
wikipedia-style
Writes neutral, verifiable, encyclopedic prose following Wikipedia's core content policies and manual of style - NPOV, inline citations, notability-backed claims, and a strict ban on promotional language. Use when someone asks "write this like a Wikipedia article", "draft a Wikipedia page for this company or person", "make this neutral and encyclopedic", or "why does my article draft keep getting rejected". Do NOT use for persuasive or opinion writing - use op-ed-writer instead; for thesis-driven academic papers, use academic-essay; for verifying claims in existing text, use fact-checker.
whitepapers
Structures and writes authoritative B2B whitepapers - a standalone executive summary, a data-sized problem statement, methodology, evidence-driven findings, recommendations, and a soft call to action - flagging every claim that needs a real citation. Use when a marketer asks "write a whitepaper on this topic", "turn our research into a lead-gen asset", "make this credible enough for executives", or a draft reads like a product pitch instead of analysis. Do NOT use for customer-story-driven proof - use case-study-builder instead; for policy audiences, use policy-brief.
white-space-analysis
Finds unmet market gaps by ranking jobs-to-be-done on importance versus satisfaction, overlaying them against current solutions and workarounds, and validating that each gap is real, winnable, and worth winning. Use when someone asks "where are the gaps in this market", "what's underserved here", "where should we play next", or is hunting for product, feature, or market-entry opportunities. Do NOT use for profiling competitors and building battle cards - use competitive-intelligence instead; for putting a dollar figure on an identified opportunity - use market-sizing instead; for extracting jobs-to-be-done from raw customer interviews - use jtbd-extractor instead.