8 original prompts for the coding tasks developers do daily — review, debugging, documentation, refactoring, testing. Copy, fill in the brackets, and use in ChatGPT, Claude or Gemini.
Code Review Checklist
Review this code: [paste code]. Check for: logic errors, edge cases not handled, naming clarity, unnecessary complexity, and potential security issues. List findings by severity (critical / minor / style), and explain why each one matters, not just what to change.
Bug Diagnosis Assistant
I am seeing this error/behavior: [describe the bug]. Here is the relevant code: [paste code]. List the 3 most likely causes ranked by probability, and for each one, tell me exactly what to check or log to confirm or rule it out.
Function Documentation Writer
Write documentation for this function: [paste function]. Include: a one-line summary, parameter descriptions with types, return value description, and one edge case worth noting. Match the docstring style of [language, e.g. Python/JSDoc/PHPDoc].
Refactor for Readability
Refactor this code for readability without changing its behavior: [paste code]. Explain each change and why it improves readability. Do not introduce new dependencies or change the function signature unless necessary — flag if you think a signature change would genuinely help.
Unit Test Generator
Write unit tests for this function: [paste function] using [testing framework, e.g. Jest/PHPUnit/pytest]. Cover: the normal/happy path, at least 2 edge cases, and one invalid-input case. Explain what each test verifies in a one-line comment.
SQL Query Explainer
Explain what this SQL query does in plain English, step by step: [paste query]. Then flag any parts that look inefficient (missing indexes, unnecessary subqueries, N+1 patterns) or potentially risky (missing WHERE clause on UPDATE/DELETE).
API Error Handling Reviewer
Review this API integration code: [paste code]. Check whether it handles: network failures, timeout, non-200 responses, malformed response bodies, and rate limiting. For anything missing, suggest the specific handling code needed.
Code-to-Plain-English Explainer
Explain what this code does in plain English, as if explaining to a product manager with no coding background: [paste code]. Avoid technical jargon where possible, and describe the business logic/outcome, not the implementation mechanics.
Using the programming prompts on one pull request
Code-to-Plain-English Explainer
Paste an unfamiliar function to understand what it does before changing it.
Refactor for Readability
Ask for a clearer version that keeps behaviour identical.
Unit Test Generator
Generate tests for the original behaviour, then run them against the refactor.
Code Review Checklist
Run the checklist prompt on the final diff before opening the PR.
Function Documentation Writer
Add docstrings for the functions you touched.
Tests come before trust: AI suggestions are only accepted once the tests pass.
Rules for AI help with code
No secrets in prompts
Remove API keys, passwords and customer data before pasting code.
Verify with tests
Treat AI output as a suggestion until tests prove it.
Check licences
Be careful with large generated blocks that may mirror existing code.
Guides and tools before you decide
Frequently asked questions
Should I trust AI-generated code review/bug diagnosis completely?
Which AI model is best for these prompts?
Can you build custom AI developer tools for our engineering team?
Do these prompts work with any programming language?
Related Resources
Need a Custom AI Solution?
If your team could use AI-assisted code review, automated testing, or internal developer tools, we build those systems.
