Coding Prompts
Prompts for code review, debugging, refactoring, tests, API and schema design, and documentation. They ask the AI for reasoning and checks, not just code, so you can trust and verify what it gives you.
- Code Review Assistant: Get expert code reviews for any programming language.
- Python Data Processing Script: Generate Python scripts for data processing tasks.
- Debugging Assistant: Work a bug down to root cause instead of guessing at fixes.
- Refactoring Plan: Plan a refactor in safe, reviewable steps.
- Unit Test Generator: Write tests that would actually catch a regression.
- API Design Review: Review an API surface for consistency, clarity and longevity.
- Database Schema Design: Design a schema that supports the queries the application makes.
- Code Documentation Writer: Document code so the next person understands why, not just what.
- Security Code Review: Review code for the vulnerability classes that actually cause breaches.
- Regex Builder and Explainer: Build a regular expression and explain exactly what it matches.
- Git Commit Message Writer: Write commit messages that explain the reasoning behind a change.
- Algorithm Explainer: Explain an algorithm clearly with complexity and trade-offs.
- CI Pipeline Configuration: Design a build pipeline that fails fast and deploys safely.
- Legacy Code Explainer: Understand unfamiliar code before changing it.
Best coding prompts, in full
The top 3 by score on the free Verbito Prompt Scorer.
Debugging Assistant (score 96/100)
You are a senior engineer who debugs by forming hypotheses and testing them. Help debug this problem: [INSERT ERROR OR BEHAVIOUR] in [INSERT LANGUAGE OR FRAMEWORK]. Context: [INSERT RELEVANT CODE] Work through: 1. Restate the symptom precisely, separating what is observed from what is assumed 2. What the code is actually doing, traced step by step through the failing path 3. Three hypotheses for the cause, ranked by likelihood with reasoning 4. For each, the cheapest test that would confirm or eliminate it 5. The most likely root cause, once narrowed 6. The fix, with the reasoning for this approach over alternatives 7. Why this was not caught earlier, and the test that would have caught it 8. Related places in the codebase with the same weakness Do not propose a fix before identifying a cause. If the information provided is insufficient to distinguish the hypotheses, say exactly which additional output is needed. Tone: methodical. Show the reasoning, not just the conclusion. Audience: the developer at the keyboard, who can run commands and report back. Keep each step under 80 words. Example step: "Hypothesis: the cache returns stale data. Test: run the request with Cache-Control: no-cache and compare the response."
Algorithm Explainer (score 95/100)
You are a computer science educator who explains without condescension. Explain [INSERT ALGORITHM OR CONCEPT] to someone who is [INSERT LEVEL]. Produce: 1. The problem it solves, and what people did before it 2. The core idea in two sentences, without jargon 3. A worked example with small concrete data, traced step by step 4. Pseudocode 5. A working implementation in [INSERT LANGUAGE], commented 6. Time and space complexity, with the reasoning rather than just the notation 7. Best, average and worst case, and what triggers the worst case 8. When to use it, and the alternatives that beat it in specific conditions 9. The mistake people most often make when implementing it 10. A question to check the reader has actually understood Use one analogy at most, and only if it survives scrutiny. A misleading analogy is worse than none. Tone: clear and respectful of the reader's intelligence.
Python Data Processing Script (score 90/100)
You are a Python expert specializing in data processing and automation. Write a complete, production-ready Python script for the following task: TASK: [DESCRIBE WHAT THE SCRIPT SHOULD DO] REQUIREMENTS: - Python 3.10+ - Input: [DESCRIBE INPUT DATA FORMAT] - Output: [DESCRIBE DESIRED OUTPUT] - Error handling for edge cases - Logging for debugging CODE STRUCTURE: 1. IMPORTS AND SETUP: - Standard library imports - Third-party libraries (with pip install commands as comments) - Logging configuration - Type hints throughout 2. CONFIGURATION: - Constants at the top - Configurable parameters - Input/output path handling 3. CORE FUNCTIONS: - main() function as entry point - Modular, single-responsibility functions - Docstrings for each function - Input validation - Error handling with try/except 4. DATA PROCESSING LOGIC: - Step-by-step implementation - Comments explaining complex logic - Performance considerations - Memory-efficient processing for large datasets 5. OUTPUT GENERATION: - Proper file writing with context managers - Output formatting (CSV/JSON/Excel/etc.) - Success/failure reporting 6. ERROR HANDLING: - Graceful error messages - Partial failure handling (continue on non-critical errors) - Exit codes 7. TESTING NOTES: - Example input/output in comments - Edge cases to consider - Performance benchmarks Include comments explaining WHY certain approaches were chosen, not just WHAT the code does. Audience: an analyst who can run Python but will not read the whole script. Keep the script under 150 lines, with a short usage example at the top in a comment.
How to use these prompts
- Copy the prompt that matches your task.
- Replace every [INSERT ...] part with your own details: the more specific, the better the answer.
- Paste it into ChatGPT, Claude or Gemini. To tailor it to your exact situation, describe your goal in the Verbito prompt generator instead.
Build a coding prompt for your task · The 100 best prompts in one kit
Frequently asked questions
- How do I use these coding prompts?
- Copy a prompt, replace the [INSERT ...] parts with your details and paste it into ChatGPT, Claude or Gemini. For a prompt built around your exact task, describe your goal in the Verbito prompt generator.
- Are these coding prompts free?
- Yes. Every prompt in the Verbito library is free to copy, no account needed. The Prompt Kit ($19 one-time) gathers the 100 highest-scoring prompts from all categories in one pack with a month of Verbito Pro.
- How good are these coding prompts?
- Each prompt is rated by the free Verbito Prompt Scorer on seven dimensions, from clarity to output format. The best coding prompt here scores 96/100. Paste your own prompt into the scorer to see what it is missing.