prod-runbook
Skill2 starsChanged 58 days agoMITView on GitHub
Write a production runbook (a block of shell commands someone will paste into a production server) that stops on the first error and cannot run a destructive step after a failure.
In this repository13 other files it gives its agents.
- agents-mdSkill
- audit-ticketSkill
- releaseSkill
- review-agent-promptSkill
- check-live-docsSkill
- human-writingSkill
- prove-itSkill
- real-or-nothingSkill
- scope-disciplineSkill
- self-explaining-codeSkill
- side-effect-guardsSkill
- api-standardsSkill
- browser-holds-no-tokenSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Preconditions first: Check the server, the database, the versions and the row counts you expect before changing anything.
- Very specific: line 40
No secrets in the block: Read them from the environment or the service's own env (docker exec <container> printenv VAR), never paste them.
- Distinctive: line 41
Leave nothing behind: Prefer shell variables and temp tables over temp files and scratch databases.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Production runbook
The person running this will paste the whole block into a production shell at once, probably under time pressure. Write it so that pasting it is safe.
Shape
(
set -euo pipefail
echo "1/4 check preconditions"
<read-only checks that fail loudly if the state is not what you expect>
echo "2/4 back up"
<backup to a named, timestamped location>
echo "3/4 change"
<the change>
echo "4/4 verify"
<read-only checks that prove the change worked>
<destructive cleanup, only here, only after verify passed>
)Rules
- Fail fast. Everything runs inside
( set -euo pipefail; ... )so the first failing command stops the block and nothing after it runs. - Destructive steps last, inside the block. Dropping a table, schema or database, deleting files, removing containers: only after the verify step, in the same block. Never as a separate trailing command, which would run even when the change failed.
- Preconditions first. Check the server, the database, the versions and the row counts you expect before changing anything. Abort if they are not right.
- Back up before changing data, and print where the backup went.
- Read-only verify. Show counts, versions and health checks after the change so the person can see it worked.
- No secrets in the block. Read them from the environment or the service's own env (
docker exec <container> printenv VAR), never paste them. - Leave nothing behind. Prefer shell variables and temp tables over temp files and scratch databases. If a temp file is unavoidable, remove it inside the block.
- Number the steps and echo them, so the person can tell where it stopped.
Before handing it over
- Rehearse it locally against a copy of the real schema. Production often has types, extensions or data the local setup lacks.
- Point out which line is destructive and what the rollback is.
- Say what the person should see if it worked.
Why
A migration step failed in a pasted runbook. The cleanup after it was a separate command, so it still ran and dropped a schema, deleting minutes of live billing data. Inside a fail-fast block, it would have stopped at the failure.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

