| name | write-debug |
| description | Systematic debugging and bug minimization using structured analysis from jeffbailey.us. Use when the user says /write:debug, needs to minimize a bug report, wants structured debugging help, or asks for systematic issue analysis. Triggers on "bug report", "minimize bug", "debug", "reproduce bug", "isolate issue". |
Bug Minimization
Apply structured debugging methodology to isolate, reproduce, and document bugs using the bug minimizer prompt from jeffbailey.us.
Available Prompts
| Prompt | Purpose | Slug |
|---|
| Bug Minimizer | Systematic debugging: isolate, reproduce, gather evidence, hypothesize, test | bug-minimizer |
Prompt Caching
All prompts are cached locally as markdown to avoid repeated network fetches.
Cache directory: ~/.claude/cache/writing-prompts/
To load a prompt (replace {slug} with the prompt slug from the table above):
- Check if
~/.claude/cache/writing-prompts/{slug}.md exists
- If it exists, read and use it
- If it does not exist, fetch and cache it:
mkdir -p ~/.claude/cache/writing-prompts && curl -s "https://jeffbailey.us/prompts/{slug}/raw.html" | pandoc -f html -t markdown --wrap=none -o ~/.claude/cache/writing-prompts/{slug}.md
- Read the newly cached file and use it
To refresh a cached prompt: delete the cached file and re-fetch using step 3.
Workflow
-
Receive the bug report -- The user provides a bug description, reproduction steps, or observed behavior.
-
Load the prompt -- Load the Bug Minimizer prompt (slug: bug-minimizer) using the caching steps above.
-
Gather variables -- If the loaded prompt contains template variables in the format {{variable_name|default="value"}}:
- Has a non-empty default: Present the default and let the user accept or override it.
- Has an empty default or no default: The user must provide a value. Show the HTML comment examples as suggestions to choose from.
Present all variables at once. Pre-fill any values already clear from the bug report.
-
Apply the prompt -- Substitute all gathered values, then follow the loaded prompt to systematically work through the debugging methodology: isolation, reproduction, evidence gathering, hypothesis formation, and testing.
-
Deliver the analysis -- Present a structured bug analysis with minimal reproduction case, root cause hypothesis, and recommended fix.
Reference
Debugging prompts are maintained at https://jeffbailey.us/prompts/