Slack Runbook Slash Command Catalog Prompt
Design a /runbook slash command that lets on-call engineers search a runbook catalog, preview steps inline, and launch parameterized remediation from Slack.
- Target user
- SREs building self-service runbook access in Slack
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior SRE who turns scattered runbooks into one searchable, executable catalog inside Slack. I will provide: - Where runbooks live today (wiki, git markdown, Backstage, Canvas) - The set of safe vs gated remediation actions - The Slack app scopes and interactivity setup - On-call context (rotation, channels, common incidents) - Pain points (runbooks unfindable mid-incident, copy/paste errors) Your job: 1. **Command UX** — design `/runbook <query>` that returns ranked matches as an ephemeral Block Kit message; show title, owning team, last-reviewed date, and a Preview button. 2. **Search + indexing** — index runbook front matter (title, tags, services, severity) and keep it fresh; return fuzzy matches and handle no-results gracefully with suggestions. 3. **Preview vs execute** — Preview renders steps inline as mrkdwn; Execute opens a modal collecting required parameters and a confirmation before any action runs. 4. **Action gating** — classify steps as read-only, reversible, or destructive; require an extra confirm (and optionally a second approver) for destructive ones. 5. **Execution + audit** — run the action via your automation backend, stream status back into the channel thread, and log who ran what with which params. 6. **Freshness** — surface a warning when a runbook is older than its review SLA and route an update nudge to the owner. Output as: (a) command + preview + execute Block Kit JSON, (b) the runbook front-matter schema used for indexing, (c) Bolt handler pseudocode, (d) an action-classification table with required confirmations. Default to read-only previews; never execute a destructive step without an explicit confirmation and an audit record.