Home › IT ops & DevOps › Draft a runbook: how to do it with AI
Draft a runbook: how to do it with AI
Short answer: Copy the free runbook template (purpose, prerequisites, numbered steps, checks, rollback), paste in your rough notes, and ask ChatGPT or Claude to fill it in. Then test every command on a non-production system before anyone relies on it.
Template and prompt below.
From official vendor pages; selected tasks also include dated logged-out free-plan trials. Report an error.
Intermediate Risk: Medium 🛠️ IT ops & DevOps
Turn the steps in your head, an old wiki page or a chat thread into a clear runbook: purpose, prerequisites, numbered steps, checks and rollback. A good runbook lets someone else handle the task at 3am without calling you.
ChatGPT has the highest score on our published rubric (94/100) of the 4 tools listed for this task. Free plan has unlimited text chats; Plus adds projects, useful for keeping a set of runbooks in one place.
Quick verdict
For drafting a DevOps runbook, ChatGPT or Claude can turn rough notes into a checklist; you still validate every command on a non-prod system before you trust it.
Last verified .
Realistic alternatives
- ChatGPT (incl. Work & Codex) — Fast structured drafts from incident notes.
- Claude (incl. Claude Code) — Careful long-form runbooks from pasted docs.
- GitHub Copilot — If the runbook should live next to the repo in your IDE.
Worked example
Example prompt (illustrative — not a logged trial for this page):
Draft a runbook for [service] incident: [symptoms]. Sections: symptoms, immediate checks (read-only), mitigation steps with commands in fenced blocks, rollback, and escalation contacts as placeholders. Mark anything uncertain as NEED CONFIRM.
We have not published a dated ChatGPT/Gemini trial on this page yet. See how we try tools.
Limitations
- Models invent flags and paths — dry-run everything.
- A free “template” prompt is not a vendor-certified playbook.
- No dated trial is published on this page yet.
Privacy
Remove hostnames, IPs and secrets from logs before pasting into a consumer chat.
Who it’s for: Sysadmins, DevOps and SRE engineers, and IT managers building an on-call or helpdesk knowledge base.
Why medium risk: A runbook with a wrong step will be followed exactly, under pressure, by someone who trusts it.
Step by step
- Gather your raw material: notes, old docs, a chat thread or a meeting transcript.
- Remove passwords, keys and internal URLs that shouldn't be shared, and use placeholders.
- Ask for a runbook in a fixed template: purpose, when to use, prerequisites and access, steps, verification, rollback, escalation.
- Ask it to list anything missing or ambiguous as questions.
- Walk through the runbook yourself in a test environment, step by step.
- Have a colleague who didn't write it follow it once, then fix what confused them.
AI prompts to draft a runbook
Replace the [brackets] with your details. See all prompt examples
Turn these notes into a runbook with these sections: Purpose, When to use, Prerequisites and access needed, Steps (numbered, one action each), How to verify, Rollback, Escalation contacts (as placeholders). List anything unclear as questions at the end. [paste notes]
Write a blank, reusable runbook template for [type of task, e.g. restarting a service or rotating a certificate], with short guidance under each heading and one example step.
Review this runbook as a new on-call engineer. Where would you get stuck? Which steps assume access or knowledge not listed? Which steps change or delete something without a check first? [paste runbook]
Free DevOps runbook template (copy and paste)
A plain-text runbook skeleton you can paste into your wiki, repo or incident tool. Fill in the [brackets] yourself, or paste it into an AI assistant with the prompts above and your own notes, then test every command in a safe environment before you rely on it.
# Runbook: [service or task name] Owner: [team / on-call rota] Last reviewed: [date] Review every: [3 months] ## 1. When to use this runbook Trigger / alert: [alert name or symptom] Severity: [SEV1-SEV4] Expected time to fix: [minutes] ## 2. Impact Who or what is affected: [users, services, regions] How to confirm: [dashboard link, command or query] ## 3. Before you start Access needed: [roles, VPN, bastion host] Tools: [CLI, console, scripts with path] Tell: [channel or incident tool] that you are working on it ## 4. Diagnose 1. [Check]: [command] → expected: [output] 2. [Check]: [command] → expected: [output] 3. If [condition], go to step 5; otherwise escalate (section 7) ## 5. Fix 1. [Action]: [command] 2. [Action]: [command] Do NOT: [risky actions to avoid, e.g. restarting the primary database] ## 6. Verify and roll back Verify: [metric back to normal, health check, test request] Roll back if: [condition] → [rollback command or steps] ## 7. Escalate After [X] minutes or if [condition]: page [team / person role] via [tool] Vendor support: [link and contract or account ID] ## 8. After the incident - Write down the timeline and what you changed - File follow-up tickets: [link] - Update this runbook if any step was wrong or missing
Illustrative example
You paste
Notes: "cert expiring on web01, renew via certbot, restart nginx, check site, if broken restore old cert from /etc/ssl/backup"
A good answer looks like
Purpose: renew the TLS certificate on WEB01. Prerequisites: sudo on WEB01; certbot installed. Steps: 1. Back up the current cert to /etc/ssl/backup/<date>. 2. sudo certbot renew --dry-run. 3. If OK, sudo certbot renew. 4. sudo nginx -t, then reload nginx. Verify: the browser shows the new expiry date. Rollback: restore the backup, reload nginx. Question: who approves a reload in business hours?
Illustrative example written for this guide, not output captured from a specific tool.
Safe practice
- Run anything that changes systems in a test VM or lab tenant first, never straight on production.
- Use a least-privilege account: only the rights the task needs, not Domain Admin or Global Administrator.
- Never paste passwords, API keys, connection strings, tenant IDs with secrets, or client secrets into a chat. Use placeholders like <SECRET>.
- Read every command that modifies or deletes before you run it, and ask the AI to list those lines separately.
Which tool to pick, and why
- Claude (incl. Claude Code): Free plan includes Artifacts and Docs, so the runbook comes out as a document you can copy into your wiki. Free plan can do this Visit official website ↗
- ChatGPT (incl. Work & Codex): Free plan has unlimited text chats; Plus adds projects, useful for keeping a set of runbooks in one place. Free plan can do this Visit official website ↗
- Microsoft Copilot: With Microsoft 365 Copilot plans it works in Word and Teams, where many IT teams keep procedures. Free plan can do this Visit official website ↗
- Google Gemini: Free plan includes Canvas for editing the runbook side by side; Google AI Pro adds Gemini in Docs. Free plan can do this Visit official website ↗
Reasons come from the capabilities, free-plan details and prices we've checked on official pages (separate from any dated trial above). Sources: claude.com/pricing · chatgpt.com/pricing · www.microsoft.com/en-us/microsoft-copilot/for-individuals · gemini.google/subscriptions/
Common mistakes
- Publishing a runbook nobody has tested.
- Steps that combine several actions in one line.
- No rollback section.
- Leaving real passwords or tokens in the document.
Privacy tip
Keep secrets in your password manager or vault and reference them by name ("see vault entry WEB01-admin"), never inside the runbook or the chat.
Claude (incl. Claude Code) setting · ChatGPT (incl. Work & Codex) setting · Microsoft Copilot setting · Sources: privacy.claude.com/en/articles/12109829-how-do-i-change-my-model-improvement-privacy-settings · help.openai.com/en/articles/7730893-data-controls-in-chatgpt · support.microsoft.com/en-us/privacy/microsoft-copilot/privacy-controls
See also
- Write a standard operating procedure (SOP): a general SOP for non-IT processes
Related tasks
Sources: official vendor pricing and policy pages linked above, plus our ranking rubric and testing notes. Last verified .
Runbook questions
What should a DevOps runbook include?
Purpose and scope, prerequisites and the access needed, numbered steps with the exact commands, a check after each step, how to roll back, and who to escalate to.
Can AI write a runbook for me?
AI can turn notes, old wiki pages or chat threads into a clean draft quickly. It can’t know your environment, so someone who runs the system must test the steps and commands before the runbook is published.
See also: Best AI for DevOps & IT ops · Write a shell script with AI · Explain logs and errors · AI for DevOps · AI for sysadmins