Prompt library

AI prompts for coding

Debugging, reviewing, explaining, and refactoring code.

What these prompts are for

Ask a model what is wrong with your code and it will always answer. The expensive part is not a wrong answer, it is a plausible one: you spend forty minutes proving it wrong, and for all forty you are not looking anywhere else.

These prompts are shaped against that. Ranked hypotheses with the cheapest discriminating check attached to each, review aimed at what production does rather than at what the diff says, and test cases for the input that returns the wrong answer without raising an error.