AI Blocks

Putting the blocks together

This is taking longer than expected.

Try againBrowse the library
AI Blocks · All skills by job · Minds · Mini tools · How it works · From a source · Apps

AI Blocks › Test and fix code

Fix a bug for good, with the cause proven and a test that would have caught it

Give it a bug. Get the cause proven, a small fix, missing tests found and a pull request.

Fix a bug with proof and a clear pull request is a free AI workflow for the job "Test and fix code". It guides your AI through several skills in order, passing each step's output to the next.

Free · No account · Made by AI Blocks · Thinking: high

What it does

Many bugs come back because the first fix treated a guess. The AI sees an error, edits the nearest code, the error moves, and nobody knows why. You end up with a fix that has no proof and no test that would catch it again. These steps put the proof first. The first step reproduces the bug, narrows it down and states the cause. It waits for your yes before it edits anything, then makes the smallest change. The second lists what the fix changes and which of that no test checks. You then add the tests, starting with one that fails on the old code. The third reviews the fix and tests against your standards. The last writes a pull request that shows the failing run before and the passing run after.

You give it

You get

Use it when

Steps

  1. Bug root cause finder: Describe the bug. Get the cause proven with evidence before any code is changed, so fixes stop being guesses.
  2. Code change test coverage review: Give it a code change and your tests. Get each new behaviour marked covered or not, plus test cases for the gaps.
  3. Code change reviewer: Point it at a set of changes. Get a review against your coding standards and your spec, side by side.
  4. Pull request writer: Give it your changes. Get a clear pull request description a reviewer can follow.

How to use it

  1. Download the handoff pack. It's a zip with HANDOFF.md and every skill file this workflow uses.
  2. Open your project in Claude Code, give it the folder and say "Follow HANDOFF.md".
  3. Give it the steps that trigger the bug. When it states the cause, read it and say yes or no. It will not edit until you do.
  4. After the missing-test step, add the tests it proposes and run them. Make sure one fails on the old code.
  5. Read the review, then use the pull request text as it is or trim it.

More for Test and fix code

Every test and fix code skill