AgentSkillsCN

runbook-validator

使用此技能,可依据团队标准对事故应急手册进行验证。当被要求审阅、验证、检查或审计手册文件时,即可触发此技能。同时,在手册文件被创建或修改后,也会由写入后钩子自动触发。

SKILL.md
--- frontmatter
name: runbook-validator
description: Use this skill to validate incident runbooks against team standards. Triggers when asked to review, validate, check, or audit a runbook file. Also triggered automatically by the post-write hook when a runbook file is created or modified.

Runbook Validator

Overview

Validate incident runbooks against the team's required structure and formatting standards. Reports compliance issues and optionally auto-fixes them.

Instructions

When given a runbook file to validate:

Step 1: Read the File

Read the entire runbook markdown file.

Step 2: Check Required Sections

Every runbook MUST contain these sections. Report any that are missing:

SectionRequiredCheck
H1 TitleMust be the first line
Metadata blockSeverity, Last Updated, Owner, Review Cadence
SymptomsMust contain at least one bullet or paragraph
ImpactMust describe who/what is affected
Triage ChecklistMust contain checkbox items [ ]
MitigationMust contain actionable steps
ResolutionMust contain fix steps
EscalationMust contain at least one escalation path
Post-IncidentMust contain post-incident checklist
ReferencesMust contain at least one link

Step 3: Check Formatting Rules

RuleHow to Check
Commands in code blocksAny CLI command must be in a ` or ``` block
Checklists use checkboxesTriage, Mitigation, Resolution use [ ] not - or *
Severity is validMust be one of: SEV-1, SEV-2, SEV-3, SEV-4
No empty sectionsEvery section must have content
Terse toneFlag any sentences starting with "You might want to" or "Consider" — should be direct imperatives
Specific commandsFlag vague instructions like "check the pods" without a specific command

Step 4: Report Results

Output a validation report in this format:

markdown
## Runbook Validation Report

**File:** `<filename>`  
**Status:** ✅ PASS | ⚠️ WARNINGS | ❌ FAIL

### Missing Sections
- [ ] List any missing required sections

### Formatting Issues
- [ ] List any formatting violations

### Style Issues  
- [ ] List any tone/specificity problems

### Summary
X of Y required sections present. Z formatting issues found.

Step 5: Offer Fixes

If issues are found, offer to fix them automatically. For missing sections, generate placeholder content that follows the template. For formatting issues, apply the fix directly.

Severity of Findings

  • FAIL: Missing required sections, invalid severity level, no checklist items
  • WARNING: Vague commands, missing references, tone issues
  • PASS: All required sections present, formatting correct, commands specific