---
name: runbook-delete
description: Delete a registered runbook by name from .claude/runbooks.json
---

# Delete Runbook

You are removing a registered runbook from `.claude/runbooks.json`.

## Instructions

1. **Parse arguments**: `/runbook-delete <runbook-name>`
   - If no name provided, read `.claude/runbooks.json` and ask which runbook to delete

2. **Read** `.claude/runbooks.json` and find the named runbook
   - If not found, list available runbooks

3. **Confirm with the user** before deleting:
   ```
   Delete runbook "auto-commit"?
     Trigger: task_complete
     Mode: auto
     Actions:
       1. git add -A
       2. git commit -m "{{task_description}}"
       3. git push
   ```

4. **Remove the runbook** from the JSON object

5. **Write** the updated file back to `.claude/runbooks.json`

6. **Confirm deletion**:
   ```
   Runbook "auto-commit" deleted.
   ```

## Notes

- Always confirm before deleting — this cannot be undone
- If deleting the last runbook, keep the file with `{ "runbooks": {} }` rather than removing it
