Coding & Development Prompts (For VS Code & Claude Workflows)
Ready-to-paste prompts for getting better results out of AI coding assistants β Claude Code, GitHub Copilot, Cursor, or ChatGPT. Each prompt is a reusable template: swap in your file, error, or feature name and paste it directly into your assistant's chat.
16 prompts across 4 sections
Code Review & Refactoring
Prompts for getting a thorough second opinion on code before it ships.
Deep Code Review Prompt
Asks for a structured review covering bugs, edge cases, and readability.
Review the following code for correctness, edge cases, and readability. For each issue found, tell me: (1) the exact line or section, (2) why it's a problem with a concrete example input that would break it, and (3) a specific fix. Do not suggest purely stylistic changes unless they affect readability or correctness. Rank issues from most to least severe. [paste your code here]
Refactor for Readability
Focused rewrite pass without changing behavior.
Refactor the following code for readability and maintainability without changing its external behavior. Break up overly long functions, name variables clearly, remove dead code, and reduce duplication. After the refactored code, list exactly what you changed and why, so I can verify nothing changed in behavior. [paste your code here]
Performance Audit Prompt
Targets slow paths and unnecessary work.
Audit the following code for performance issues β unnecessary re-computation, N+1 queries, blocking operations, inefficient loops, or unneeded re-renders (if this is frontend code). For each issue, explain the actual cost (e.g. "O(nΒ²) with n = [x]") and give a concrete fix. Ignore micro-optimizations that wouldn't be measurable in practice. [paste your code here]
Security-Focused Review
Checks for common vulnerability classes before merging.
Review the following code specifically for security issues β injection risks, unsanitized input, auth/authorization gaps, secrets in code, unsafe deserialization, and unvalidated redirects. For each finding, state the concrete attack scenario (what input or request would exploit it) and the minimal fix. Skip anything that's only a theoretical concern with no realistic exploit path. [paste your code here]
Debugging & Error Fixing
Prompts for getting to the actual root cause instead of a surface-level patch.
Root Cause Analysis Prompt
Forces the assistant to explain why, not just patch the symptom.
I'm seeing this bug: [describe the observed behavior]. Here's the relevant code: [paste code]. Before suggesting a fix, explain the exact root cause β walk through the execution path that produces this behavior, step by step. Then give the minimal fix that addresses the root cause, not just the symptom.
Fix Failing Test Prompt
For when a test fails and it's unclear if the code or the test is wrong.
This test is failing: [paste the test and the failure output]. Here's the code under test: [paste code]. First tell me whether the test's expectation is correct or the implementation is wrong β don't assume the implementation is the problem. Then give the fix for whichever one is actually wrong, and explain your reasoning.
Explain This Stack Trace
Turns a wall of stack trace text into a plain explanation and fix.
Explain this stack trace / error message in plain terms: what is failing, in which function, and why. Then point to the most likely line in my code (based on the trace) that's the actual cause, and suggest a fix. [paste the full stack trace / error] Relevant code: [paste code]
Reproduce & Fix Bug Prompt
Asks for a minimal repro before jumping to a fix.
Here's a bug report: [describe the bug/steps to reproduce]. Here's the relevant code: [paste code]. First, write the smallest possible input or test case that reproduces this bug. Then explain why it happens, and give a fix. Finally, suggest a regression test I should add so this doesn't come back.
Documentation & Comments
Prompts for generating docs that stay accurate and useful, not just verbose.
Generate README Prompt
Produces a README structured for an actual first-time reader.
Write a README.md for this project based on the code below. Include: what the project does and who it's for, install/setup steps, a minimal usage example that actually runs, and a short section on project structure. Keep it concise β no filler sections like "Contributing" or "License" unless I ask for them. [paste key files or describe the project]
Docstring/JSDoc Generator Prompt
Adds accurate function-level docs without over-explaining the obvious.
Add docstrings/JSDoc comments to the following functions. Document parameters, return values, and thrown errors/edge cases β but skip documenting anything that's already obvious from the function and parameter names. Don't change the code itself, only add comments. [paste your code here]
API Documentation Prompt
Documents endpoints in a consistent, scannable format.
Document the following API endpoint(s): method, path, request parameters/body (with types and whether required), possible response codes, and an example request/response. Use a consistent format across all endpoints so they can be dropped straight into API docs. [paste route/controller code]
Explain Legacy Code Prompt
For understanding unfamiliar code before touching it.
I need to understand this code before I modify it. Explain: (1) what it does at a high level, (2) the overall control flow, (3) any non-obvious behavior or edge cases it handles, and (4) anything that looks risky or fragile if I change it. Don't rewrite the code, just explain it. [paste code]
VS Code & Claude Code Workflow
π₯ TrendingPrompts built around how AI coding assistants actually get used day to day.
Plan Before Code Prompt
Stops the assistant from jumping straight into edits on a non-trivial task.
Before writing any code, give me a short implementation plan for this task: [describe the feature/change]. List the files you'd need to touch, the order you'd make changes in, and any design decisions or trade-offs I should weigh in on first. Wait for my confirmation before writing the actual code.
Commit Message Generator Prompt
Consistent, conventional-commit-style messages from a diff.
Write a git commit message for the following diff. Use the format "type: short summary" on the first line (type = feat/fix/refactor/docs/chore/test), under 72 characters, followed by a blank line and 2-4 bullet points explaining what changed and why β not just what files changed. [paste git diff]
PR Description Prompt
Turns a diff into a reviewer-friendly pull request description.
Write a pull request description for the following diff, aimed at a reviewer who hasn't seen this code before. Include: a one-paragraph summary of what changed and why, a bullet list of the key changes, anything a reviewer should pay extra attention to, and how you tested it (or what tests are still needed). [paste git diff or describe the change]
New Feature Scaffolding Prompt
Asks for a minimal, working skeleton before filling in logic.
Scaffold a minimal, working starting point for this feature: [describe the feature]. Create the necessary files/functions with clear TODO comments for the parts that need real logic, but make sure what you write actually compiles/runs as-is. Match the existing project's conventions for file structure and naming β ask me if you're not sure what those are.