The best ChatGPT and Claude prompts for developers give the model three things: the real code, one clear job, and a defined output format. That is the whole trick behind a useful coding GPT or AI software engineer session. "Review my code" gets you a polite summary. "Review this diff for bugs and security issues, list findings by severity with line numbers, do not rewrite the file" gets you something you can act on. Below are 30 prompts for developers organised into six groups: code review and quality, tests, refactoring and performance, documentation and PR descriptions, frontend, and backend and DevOps. They are language-agnostic with [language] placeholders, with a few Python and TypeScript versions where the specifics matter.

Code review, configured once
Yuri - Code Reviewer AI Skill
Yuri loads your review standards, severity scale and stack once, so every review follows the same rules instead of a fresh prompt each time.
$19
Get the skill →
How to use these prompts
Copy a prompt, replace the [brackets], and paste the code or diff right after it. Two habits make a big difference. First, always paste the actual artifact: the function, the stack trace, the diff, the schema. A description of the code is not the code. Second, say what you want back: a diff, a table, a numbered list, a file. Models default to prose; you rarely want prose.
If you are on Claude Code, the prompts still work as typed, but many of them are better stored as a slash command or a skill so you stop retyping them. There is a short section on that below, and a longer one in our guide to Claude Code skills.
Code review and quality (prompts 1 to 5)
Review prompts work best on a diff, not a full file. Ask for findings grouped by severity so you can skip the style notes when you are short on time.
Prompt 1: Senior review by severity
Review this [language] diff as a senior engineer. Group findings into: bugs, security, performance, maintainability, style. For each finding give the line reference, the problem in one sentence, and the fix. Do not rewrite the whole file. If you find nothing in a category, say so. Diff: [paste diff]
Prompt 2: Security-only pass
Check this [language] code for security issues only: injection, unsafe deserialisation, missing input validation, secrets in code, insecure defaults, and dependency risks. For each finding state the risk, how it could be exploited in one line, and the safer version. Code: [paste code]
Prompt 3: Explain the change to a reviewer
I am the author of this diff. Write the review notes I should attach so a reviewer understands it quickly: what changed, why, what to look at first, what is intentionally out of scope, and how I tested it. Keep it under 150 words. Diff: [paste diff]
Prompt 4: Find the latent bug
This [language] code works in the happy path but I suspect a bug in edge cases. Walk through it with these inputs: empty input, null or None, very large input, concurrent calls, and a failing dependency. For each, say what happens and whether that is correct. Code: [paste code]
Prompt 5: Python type and lint review
Review this Python module for typing and correctness. Add or fix type hints, flag anything mypy in strict mode would reject, point out mutable default arguments, bare excepts, and unclosed resources. Return the corrected module and a bullet list of what changed. Code: [paste code]
Tests (prompts 6 to 10)
Ask the model to list the cases before it writes the tests. It is much easier to spot a missing case in a five-line list than in 200 lines of test code.
Prompt 6: Unit tests with case list first
Write unit tests for this [language] function using [test framework]. Before the code, list every case you will cover: happy path, boundaries, error paths, and invalid input. Then write the tests. Use descriptive test names that read as sentences. Function: [paste code]
Prompt 7: Regression test from a bug
Here is a bug report and the fix. Write a regression test that fails on the old code and passes on the new code, using [test framework]. Name the test after the bug. Bug: [describe bug]. Fix diff: [paste diff]
Prompt 8: Tests before a risky change
I am about to change [what you are changing] in [file or module]. List the tests I should have in place before touching it, ranked by how likely each is to catch a break. Mark which ones already exist based on this test file: [paste test file]
Prompt 9: TypeScript integration test
Write an integration test in TypeScript using [Vitest or Jest] for this API handler. Mock only the external boundary ([database, HTTP client, queue]), not internal modules. Cover a successful call, a validation failure, and an upstream timeout. Handler: [paste code]
Prompt 10: Test review
Review these tests. Tell me which assertions are weak (asserting truthiness, snapshot-only, or testing the mock rather than the code), which cases are missing, and which tests are redundant. Suggest the three highest-value additions. Tests: [paste tests]
Refactoring and performance (prompts 11 to 15)
Refactoring prompts need a hard constraint: behaviour must not change. Say it explicitly, and ask for the changes as a list so you can review them one at a time.
Prompt 11: Behaviour-preserving refactor
Refactor this [language] code for readability without changing behaviour. Keep the public interface identical. List each change in one line with the reason before the code. Flag anything that looks like a bug but do not fix it silently, note it separately. Code: [paste code]
Prompt 12: Break up a long function
This function is too long. Split it into smaller functions with clear names, each doing one thing. Show the new structure as an outline first (function names and one-line purpose), then the code. Do not introduce new abstractions unless they are used at least twice. Code: [paste code]
Prompt 13: Find the performance problem
This [language] code is slow with [size of input]. Identify the likely bottleneck, estimate its complexity, and propose a fix. Explain the trade-off of the fix (memory, readability, correctness risk). Do not micro-optimise; find the big one. Code: [paste code]. Profile output if any: [paste]
Prompt 14: Python performance rewrite
Rewrite this Python function for performance. Prefer built-ins, comprehensions, generators and the standard library over hand-rolled loops. Keep the same signature and return type. Show the before and after, and describe how you would benchmark it with timeit. Code: [paste code]
Prompt 15: Remove duplication
Here are two or more pieces of code that look similar. Tell me whether they should share an implementation or stay separate (and why). If they should share one, write it and show how each call site changes. Code A: [paste]. Code B: [paste]
Documentation and PR descriptions (prompts 16 to 20)
Documentation is the work most often skipped. These prompts take ten seconds and produce something a new team member can actually use.
Prompt 16: PR description
Write a pull request description for this diff. Sections: Summary (two sentences), What changed (bullets), Why, How to test (steps), Risks and rollback. Plain language, no marketing tone. Do not invent context I have not given you. Diff: [paste diff]. Ticket: [ticket link or summary]
Prompt 17: Docstrings and comments
Add docstrings to every public function and class in this [language] file following [Google, NumPy, JSDoc, or your standard] style. Document parameters, return values, raised errors and one example each. Do not add comments that restate the code. File: [paste code]
Prompt 18: README for a module
Write a README section for this module: what it does, when to use it, a minimal working example, configuration options as a table, and common mistakes. Keep it under 300 words. Code: [paste code or public API]
Prompt 19: API endpoint docs
Generate reference documentation for this endpoint: method, path, auth requirement, request parameters with types and whether they are required, an example request, an example success response, and every error response with its cause. Source: [paste route or controller]
Prompt 20: Architecture decision record
Write an ADR for this decision. Sections: Context, Decision, Alternatives considered (with why each was rejected), Consequences. One page maximum. Decision: [describe]. Alternatives: [list]. Constraints: [list]
Frontend (prompts 21 to 25)
Frontend prompts should name the framework and the rendering model. "React" alone is not enough when the answer differs between a client component and a server component.
Prompt 21: Component review
Review this [React, Vue, Svelte] component for: unnecessary re-renders, state that should be derived, missing keys, effects that should be event handlers, and props that leak implementation detail. Give a fix for each. Component: [paste code]
Prompt 22: Accessibility pass
Audit this markup and component code for accessibility: semantic elements, labels, focus order, keyboard operability, colour contrast tokens, and ARIA misuse. List issues with the WCAG criterion each fails and the corrected code. Code: [paste code]
Prompt 23: TypeScript types for an API response
Here is a sample JSON response from [endpoint]. Write TypeScript types for it. Use discriminated unions where a field switches shape, mark optional fields correctly, and add a runtime validator with [Zod or your library] that matches the types. JSON: [paste sample]
Prompt 24: CSS layout debugging
This layout breaks at [viewport or condition]. Here is the HTML and CSS. Explain what is causing it in plain terms, then give the minimal CSS change to fix it. Prefer modern layout (grid, flex, container queries) over hacks. Code: [paste code]
Prompt 25: State management decision
I need to manage [describe state] in a [framework] app of [size]. Compare keeping it local, lifting it to context, and using [store library]. Recommend one for this case with reasons, and show the skeleton of the recommended approach.
Backend and DevOps (prompts 26 to 30)
Backend and infrastructure prompts benefit from stating the environment: the database, the runtime version, the cloud provider, and what must not go down.
Prompt 26: API design review
Review this API design for consistency and correctness: resource naming, HTTP methods and status codes, pagination, error format, idempotency of writes, and versioning. Return a table of issue, why it matters, and the fix. Spec or routes: [paste]
Prompt 27: Database query and schema review
Review this [database] schema and these queries. Flag missing indexes, N+1 patterns, nullable columns that should not be, and queries that will not scale past [rows]. Suggest a migration for each schema change. Schema: [paste]. Queries: [paste]
Prompt 28: Dockerfile hardening
Review this Dockerfile. Reduce image size, pin versions, use a non-root user, separate build and runtime stages, and make layer caching effective. Return the improved Dockerfile with a comment on each changed line. Dockerfile: [paste]
Prompt 29: CI pipeline debugging
This [GitHub Actions, GitLab CI, other] pipeline fails intermittently. Here is the config and a failing log. Identify the most likely cause, tell me how to confirm it, and give the fix. If it is a flaky test rather than the pipeline, say so. Config: [paste]. Log: [paste]
Prompt 30: Incident postmortem
Write a blameless postmortem from these notes. Sections: Summary, Impact, Timeline, Root cause, What went well, What went badly, Action items with owners. Keep it factual, no speculation beyond what the notes support. Notes: [paste incident notes]
Where these belong in Claude Code
If you use Claude Code, retyping prompt 1 every review is a waste. Claude Code gives you three places to store instructions, and each fits a different kind of prompt.
-
CLAUDE.md is for rules that should apply to every session in a repo: the language, the test framework, the style guide, "never commit secrets". Short, always on, no arguments.
-
Slash commands (files in
.claude/commands/) are for a repeatable task you trigger on demand: /review, /pr-description, /tests. Prompts 1, 6 and 16 are natural slash commands.
-
Skills are for full role behaviour: how a code reviewer thinks, what severity scale they use, how a QA engineer structures a test plan. A skill is a .md file with a workflow, standards and examples that the model loads when the task matches. See the Claude Code skills collection and our Claude skill examples for what a good one looks like.
The rule of thumb: if it is one line, put it in CLAUDE.md. If it is one prompt you run often, make it a slash command. If it is a role with judgement, make it a skill.
Task to prompt to skill
| Task |
Prompt above |
Skill that does it as a role |
| Code review on every PR |
1, 3, 4 |
Yuri - Code Reviewer ($19) |
| Security and dependency audit |
2, 28 |
Soren - Code Auditor ($19) |
| Test plans and test review |
6 to 10 |
Mira - QA Engineer ($19) |
| Refactors across the stack |
11 to 15 |
Max - Full Stack Developer ($19) |
| Docs, READMEs, ADRs |
17 to 20 |
Saoirse - Technical Writer ($19) |
| Frontend components and a11y |
21 to 25 |
Lena - Frontend Developer ($19) |
| API and database design |
26, 27 |
Niko - Backend Developer ($19) |
| Docker, CI, incidents |
28 to 30 |
Rami - DevOps Engineer ($19) |
| Autonomous review agent for a whole repo |
1, 2, 10 |
Albert - AI Code Review Agent ($39) |
If you want the prompts as a pack
Everything above is free to copy. If you would rather have a larger, organised set with variants per language and role, two options:
Tech & Dev Prompt Library ($9): a structured library of developer prompts for review, testing, debugging, docs and architecture, organised by task so you can find the right one in seconds. Part of the wider ChatGPT prompts catalogue.
Coding Agent Bundle - All 5 AI Coding Agents ($99): five coding agent skills in one purchase, covering review, build, test, backend and infrastructure, for teams that want the whole workflow configured rather than one role.
All skills are one-time purchases, delivered as a .md skill file with a README, and work in Claude (including Claude Code), ChatGPT as a custom GPT, Gemini as a Gem, and Copilot. There is a 30-day money-back guarantee, no questions asked.
Frequently asked questions
Do these prompts work the same in ChatGPT and Claude?
Yes. Every prompt here is plain text with no model-specific syntax. Claude tends to handle long pasted files and multi-step refactors well, ChatGPT is quick for isolated functions and small tests. The wording does not change; what changes is how much context you can paste in one go.
Should I paste my whole file or just the function?
Paste the smallest unit that contains the full problem. For a bug, that is the function plus the call site and the stack trace. For a review, it is the diff. For a refactor, the module. Pasting an entire repo without a question attached produces generic feedback.
What is the difference between a prompt and a skill?
A prompt is a one-off instruction you type each time. A skill is a .md file with your role, standards and workflow that the model loads once, so every answer already follows your conventions. Skills from KissMySkills work in Claude and Claude Code, as a ChatGPT custom GPT, a Gemini Gem, or in Copilot, and come with a 30-day money-back guarantee.
Are these Python prompts only?
No. Every prompt uses a [language] placeholder. A few examples name Python or TypeScript because those are the most common requests, but swap in Go, Rust, Java, C# or anything else and the structure holds.
Can I put these prompts in Claude Code directly?
Yes. Short, always-on rules belong in CLAUDE.md, repeatable tasks belong in a slash command under .claude/commands, and full role behaviour belongs in a skill. The section above on where prompts belong in Claude Code explains which is which.
The bottom line
Good prompts for developers are boring: real input, one job, a stated output. The 30 above cover the daily work of review, tests, refactoring, docs, frontend, backend and DevOps, and they work the same in ChatGPT and Claude. Use them as typed, or move the ones you run every day into a slash command or a skill so you stop retyping them.

Whole workflow, one purchase
Coding Agent Bundle - All 5 AI Coding Agents
Review, build, test, backend and DevOps agents that load your standards once and apply them on every task in Claude Code, ChatGPT, Gemini or Copilot.
$99
Get it now →
Browse all Claude Code skills at KissMySkills.