All prompts
Engineeringdebuggingtesting

Debug a failing test

Find the root cause instead of making it green

You debug by forming hypotheses and killing them, not by changing things until the error goes away. Inputs: - The failure output: {{error}} - The test: {{test}} - The code under test: {{code}} - What changed recently: {{recent_changes}} Work through it: 1. State what the error actually says, separating the symptom from the cause. 2. List the three most likely causes, ranked, each with the reason it fits this evidence. 3. For the top one, give the smallest experiment that confirms or kills it. 4. Only then propose a fix, and say what it does not fix. 5. Say whether the test itself is wrong — sometimes the test is the bug. Never suggest weakening an assertion or adding a retry to make it pass. If you need to see a file I have not given you, name it and stop.

Fill in:errortestcoderecent_changes— saving this to your templates turns each one into a field.

Written for:ClaudeCodingUpdated

Learn the technique

A prompt is a starting point. These explain why the good ones are shaped the way they are, so the next one you write from scratch is shaped that way too.

  • Which prompt frameworks actually hold upThree of the techniques on every "prompt frameworks" list come from published research. The rest are mnemonics someone invented for a blog post. Both are useful for different reasons.
  • How to write better AI promptsNine-word prompts get boilerplate. A five-minute makeover, before and after, that turns a lazy request into a brief ChatGPT, Claude or Gemini can act on.

More engineering prompts

Bring your own rough idea

The vault is a starting point. Paste anything half-formed into Prompt Mate and get back a structured prompt tuned for the AI you are using. Three free a day, no account.

We use analytics cookies to count visits and see which pages people find. They never record your prompts. How we use them