Coding prompts
Prompts for reviewing, debugging, testing and explaining code. Copy one, fill in the blanks, and paste it into ChatGPT, Claude or any AI tool.
-
Code review prompt
Get a code review of a diff that ranks every finding by severity, points at the exact line, and suggests a fix for each problem it finds.
Coding
-
Debugging prompt for error messages and stack traces
Paste an error and the code around it to get the likely causes ranked, a quick way to confirm each one, and the smallest fix that makes it go away.
Coding
-
Git commit message prompt
Turn a staged diff into a clear git commit message with a short subject line and a body that explains why the change was made, not only what changed.
Coding
-
Prompt to explain unfamiliar code
Get a walkthrough of code you didn't write that covers what it does, how data moves through it, what's surprising, and where it's safe to change.
Coding
-
Prompt to write a SQL query from plain English
Describe the question you want answered and paste your schema to get a correct SQL query for your database, with each join and filter explained.
Coding
-
Prompt to write unit tests for existing code
Get unit tests for a function or class that cover the normal path, the edge cases and the failures, written for your test framework and ready to run.
Coding
-
Pull request description prompt
Write a pull request description from a diff and its issue, so reviewers know what changed, why, how it was tested and where to start reading.
Coding
-
Refactoring prompt to clean up messy code
Refactor a piece of code towards one goal you choose while keeping its behaviour the same, with each step explained and any risky change flagged.
Coding