用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/hpsgd/turtlestack --skill write-runbook命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Review staged or recent changes — native Claude Code review for mechanics, layered with team conventions and the team verdict contract
Perform a security-focused audit of code changes or a specific area of the codebase.
Propose a change to a marketplace repo based on learned patterns — new rules, updated skills, evolved regex patterns. Infers which upstream marketplace the learning belongs to, confirms with the user, then creates a branch, applies changes, shows diff for review, and raises a PR on approval. Use when patterns have enough evidence to share upstream.
基于 SOC 职业分类
正在显示 SKILL.md
| name | write-runbook |
| description | Write an operational runbook for a service, deployment, or incident response procedure. |
| argument-hint | [service, procedure, or incident type] |
| user-invocable | true |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
Write a runbook for $ARGUMENTS using the mandatory structure below.
Core principle: This runbook will be used by someone who has never done this procedure before, at 2am, while stressed. Every decision must serve that reader. No assumed knowledge. No missing steps. No ambiguity.
Before writing, gather information:
Grep and GlobUse this exact structure. Every section is mandatory.
[Procedure name] — Runbook
| Field | Value |
|---|---|
| What this covers | [one sentence] |
| When to use | [trigger conditions — alert name, symptom, or scheduled occasion] |
| Business impact | [what breaks for users if this is not done; expected RTO/RPO if applicable] |
| Estimated duration | [time range for the full procedure] |
| Risk level | Low / Medium / High / Critical |
| Last tested | [date] |
| Owner | [team or person responsible for maintaining this runbook] |
A checklist of everything needed BEFORE starting. Be exhaustive:
- [ ] Access to [system] — how to get it: [link or instructions]
- [ ] CLI tool [name] installed — version [X]+ — install: `[command]`
- [ ] Environment variable [NAME] set — get it from: [location]
- [ ] VPN connected to [network] — connect: [instructions]
- [ ] Permissions: [specific role/group] in [system] — request via: [link]
- [ ] Communication channel open: [Slack channel / war room] — notify: [who]
Rules for prerequisites:
Before running the procedure, confirm the trigger is real and not transient. This section is mandatory:
- [ ] Confirm trigger: `[exact health-check or diagnostic command]` → expected output: `[what confirms the condition]`
- [ ] Wait and retry: if the signal could be transient (network blip, restart in progress), wait 60 seconds and re-run the check before proceeding
- [ ] Confirm not planned: check [maintenance calendar / change log] — do not proceed if a planned change is in flight
- [ ] Stop conditions: do NOT proceed if [explicit conditions, e.g. "the check passes after retry", "a planned failover is scheduled within the hour"]
The pre-check must include the exact command, the expected signal, and a retry-before-action rule for any condition that could resolve on its own.
Numbered steps. Each step MUST follow this format:
#### Step N: [what you're doing and why]
**Action:**
\`\`\`bash
[exact command to run — copy-pasteable, no placeholders without explanation]
\`\`\`
**Expected output:**
\`\`\`
[what you should see if this worked correctly]
\`\`\`
**If this fails:**
- Symptom: [what you might see instead]
- Likely cause: [why this happens]
- Fix: [what to do about it]
- If the fix doesn't work: [escalate to whom, or which step to go to]
**Checkpoint:** [how to confirm this step succeeded before moving on]
Rules for steps:
<placeholder> without explaining what to substitute and how to find the value. Use this pattern: export SERVICE_NAME=my-service # Replace with the actual service name from: kubectl get services⚠ WARNING: This step [modifies production data / causes downtime / is irreversible]. Double-check [what] before proceeding.After the procedure is complete, verify the system is healthy:
#### Verification checklist
- [ ] Service is responding: `curl -s https://[endpoint]/health | jq .status` → should return `"ok"`
- [ ] Logs are clean: `[log command]` → no errors in the last 5 minutes
- [ ] Metrics are normal: [dashboard link] → [what to look for]
- [ ] Dependent services unaffected: [how to check]
- [ ] Users can perform [core action]: [how to test]
Every verification check must include the exact command to run and the expected result.
If the procedure fails or causes issues, how to undo it. This section is not optional — every runbook needs a rollback plan.
#### Rollback procedure
**When to rollback:** [specific conditions that trigger a rollback decision]
**Rollback window:** [how long after the procedure can you still roll back?]
**Data implications:** [will rollback cause data loss? What data?]
1. [Rollback step with exact command]
Expected result: [what you should see]
2. [Next rollback step]
Expected result: [what you should see]
#### After rollback
- [ ] Verify rollback succeeded: [how]
- [ ] Notify: [who needs to know]
- [ ] Create incident ticket: [where, with what information]
If rollback could leave two systems both believing they're authoritative (split-brain — e.g. promoted replica plus recovered primary, two leaders in a cluster, two writers on a shared resource), the rollback section MUST include:
⚠ WARNING: do not [activate / promote / write to] both directiveCommon issues that arise during or after this procedure, even if not directly caused by the steps:
#### [Problem description]
**Symptom:** [what you see]
**Cause:** [why it happens]
**Solution:**
\`\`\`bash
[fix command]
\`\`\`
**Prevention:** [how to avoid this in the future]
Include at minimum:
| Condition | Escalate to | Contact | Expected response time |
|---|---|---|---|
| Procedure fails after troubleshooting | [team/person] | [PagerDuty service ID, Slack channel, or phone] | [time] |
| Data loss suspected (e.g. replication lag > [N] minutes at failover time) | [team/person] | [PagerDuty service ID, Slack channel, or phone] | Immediate |
| Customer impact detected | [team/person] | [PagerDuty service ID, Slack channel, or phone] | Immediate |
| Vendor / cloud provider issue | [vendor support team] | [support case URL or vendor hotline] | [time] |
| Unsure whether to proceed | [team/person] | [PagerDuty service ID, Slack channel, or phone] | [time] |
Rules for the escalation table:
database-oncall), Slack channel (e.g. #sre-incidents), or vendor support case URL. Not "the on-call team" or "Slack/phone".Before finalising, verify against every rule:
| Check | Requirement |
|---|---|
| Copy-paste test | Could someone paste every command and have it work? |
| Failure coverage | Does every step have a "what if this fails" section? |
| No assumed knowledge | Could a new team member follow this on their first week? |
| Rollback exists | Is there a complete rollback procedure? |
| Escalation contacts | Are real people or teams listed, with contact methods? |
| Timing estimates | Does the reader know how long things should take? |
| Warnings present | Are destructive or irreversible steps clearly marked? |
| Verification complete | Can the operator confirm success at the end? |
kubectl delete pod my-pod-name -n production is better than a bash one-liner that constructs the pod name dynamically.# UNTESTED — verify in staging first.