8 Prompts • Debugging • Refactoring • Testing. Prompts for code review, refactoring, tests and debugging.
Prompts for code review, refactoring, tests and debugging.
Act as a senior engineer reviewing the diff below. Focus on: correctness, edge cases, readability, performance, and security. For each issue: quote the line, explain, suggest a fix. Ignore style nits.
Explain what the code below does, step by step. Then list assumptions it makes about its inputs, and any silent failure modes.
Refactor the function below to reduce nesting and extract clearly-named helpers. Preserve behavior exactly. Return the new code and a short note of what changed.
Add strict TypeScript types to the code below. No `any`. Prefer discriminated unions where meaningful. Return the fully typed version and list any behavior you had to infer.
Write table-driven tests for the function below using {{framework}}. Cover happy path, boundary values, invalid input, and one realistic real-world case per branch.Given the bug report below, write the smallest failing test that reproduces it. Then propose the minimal fix.
Here is an error and the surrounding code. First, list the 3 most likely root causes ranked by likelihood. Then tell me exactly what to log or check to distinguish between them.
The code below is slow on inputs of size {{n}}. Identify the dominant cost, propose two optimizations, and show the expected Big-O before/after.Yes. The prompts are model-agnostic — ChatGPT, Claude, Gemini, Mistral, local models. Some are tuned to a specific model's strengths.
Yes — download the PDF or copy all and share. There are no restrictions.
Copy it, replace the {{placeholders}} with your details, and add any extra constraints (tone, length, audience) at the end.
100 battle-tested ChatGPT prompts.
50 Claude prompts for writing and analysis.
Stunning Midjourney prompts and modifiers.
AI prompts for marketers and growth teams.