writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
runbook-generatorWrite or review operational runbooks for deployment, rollback, incidents, recovery, and maintenance using concrete commands and verification evidence.
Independent GitHub snapshot · Automated classification · Original documentation governs
Create operator-ready procedures from evidence. Never invent commands, account names, URLs, thresholds, rollback behavior, or escalation contacts.
Collect before writing:
If any production-critical input is unavailable, mark it TBD — owner required
instead of supplying a plausible value.
Inspect likely sources:
rg --files -g 'Dockerfile*' -g 'docker-compose*.yml' -g 'compose*.yaml'
rg --files -g '.github/workflows/*.yml' -g 'terraform/**' -g 'k8s/**'
rg --files -g 'vercel.json' -g 'fly.toml' -g 'render.yaml'
rg -n "DATABASE_URL|migrate|rollback|health|readiness|liveness" .
Read the actual scripts and provider configuration before quoting a command. Confirm current CLI syntax against official documentation when the platform may have changed.
Classify every step:
| Class | Meaning | Required handling |
|---|---|---|
| Read-only | Observes state | Safe to rehearse with non-secret fixtures |
| Reversible | Changes state with a proven undo | State precondition and rollback |
| Destructive | Deletes, truncates, resets, rotates, or revokes | Explicit approval and backup evidence |
| Irreversible | Cannot restore exact prior state | Separate break-glass procedure |
Never present destructive database reset, force push, bucket deletion, secret revocation, or irreversible migration as a routine rollback.
In particular, commands such as prisma migrate reset, DROP, TRUNCATE,
kubectl delete, terraform destroy, and git push --force require a
destructive-operation warning and must not appear as the default production
path.
Use this structure:
# <Procedure name>
## Scope and owner
- Service:
- Environments:
- Primary owner:
- Escalation:
- Last rehearsed:
## Preconditions
- Required access:
- Change ticket or incident:
- Backup / restore evidence:
- Maintenance window:
- Known-good version:
## Stop conditions
- Abort when:
- Escalate when:
## Procedure
### Step 1 — <read-only preflight>
Command:
Expected evidence:
Failure action:
## Verification
- User-visible signal:
- Service health:
- Data integrity:
- Error and saturation signals:
## Rollback or recovery
- Trigger:
- Application rollback:
- Data recovery:
- Verification:
## Evidence record
- Operator:
- Start/end time:
- Commands executed:
- Links to logs, deploys, backups, and incident:
For every mutating step:
Prefer commands that expose a plan or preview:
terraform plan -out=tfplan
kubectl diff -f k8s/
helm diff upgrade <release> <chart>
Do not hide failures with || true, broad exception handling, or unbounded
retry loops.
Treat application rollback and data rollback as separate operations.
If a migration is irreversible, say so and define forward recovery.
Start with containment and evidence preservation:
Avoid commands that destroy forensic evidence before it is captured.
Validate runbooks outside production:
A runbook is not production-ready until its highest-risk recovery path has been rehearsed or explicitly marked untested.
Link each operational assumption to its source file or official document. Re-review when any of these change:
Return:
TBD items and ownersDo not claim a runbook is safe merely because commands are syntactically valid. Safety requires scoped authority, recoverability, and observed verification.