Choose by the output you need to make

ChatGPT Prompts for Developers

Software developers using ChatGPT for review, tests, documentation, debugging, and learning.

Where ChatGPT helps this role

  • Turn rough notes into a reviewable asset for a code reviewer, teammate, maintainer, or future self.
  • Convert a recurring developers workflow into a reusable prompt sequence.
  • Ask ChatGPT for clarifying questions before committing to tone, format, or evidence.
  • Create a quick version for routine work and a deeper version for high-stakes work.
  • Review an existing answer against privacy, accuracy, and role-specific constraints.
  • Rewrite output for a different audience without changing the underlying facts.
  • Build a checklist that makes the human review faster and less subjective.

Main Risks

  • AI-assisted code must be reviewed, tested, and adapted to the actual codebase.
  • A broad prompt can hide missing source material, so developers should name the exact evidence before asking for output.
  • Over-polished wording can make weak assumptions look finished; every page links the prompt to a review step.
  • Copying the same prompt across tasks weakens results because developers need different inputs for planning, review, outreach, and explanation work.

Recommended Workflow

  1. Pick the task page that matches the decision, not just the closest job title.
  2. Prepare the source notes, audience, constraints, and forbidden assumptions before copying a prompt.
  3. Run the prompt once for structure, then run a review prompt against facts, tone, and missing context.
  4. Save the final prompt with the human review checklist so the workflow can be reused without becoming automatic.

Choose the first task by situation

Start with Debug an issue when the user has source notes but does not yet know the right output structure, then move to Review code or Write unit tests only after the audience and review owner are clear.

Choose by situation

  • Choose Debug an issue when the main problem is shaping raw context into something a code reviewer, teammate, maintainer, or future self can inspect.
  • Choose Review code when the user already has a first version and needs the next artifact in the same developers loop.
  • Choose Write unit tests when the risk is quality control, review consistency, or a clearer handoff to another person.
  • Open the role guide when the user cannot name the task yet and needs to decide whether to create, revise, review, or sanitize context first.

Avoid starting with

  • Do not start from a broad role prompt when the user already knows the concrete task.
  • Do not start from a writing prompt when the missing piece is source material or reviewer approval.
  • Do not reuse a developers prompt across unrelated tasks without changing inputs, constraints, and review checks.

Developers pages are organized by the decision a person is trying to make, not by a long list of clever prompt phrases. The role page should help the user pick the first useful task, then the task page should carry the details: source material, variable fill, example, stronger prompt, and human review boundary.

Pick the workflow by decision

Debug an issue

Use when the next decision is the shape, review path, or reuse rule for a debugging plan.

Debug an issue needs error message, reproduction steps, recent changes, environment, and expected behavior; its review lens is debugging plan quality, reproduction steps and error evidence, and codebase verification, not a generic writing pass.

Review code

Use when the next decision is the shape, review path, or reuse rule for a code review checklist.

Review code needs diff summary, affected files, risk areas, tests, and intended behavior; its review lens is code review checklist quality, behavior risk and diff hotspots, and codebase verification, not a generic writing pass.

Write unit tests

Use when the next decision is the shape, review path, or reuse rule for unit test cases.

Write unit tests needs function behavior, edge cases, inputs, outputs, and existing test style; its review lens is unit test cases quality, edge cases and assertions, and codebase verification, not a generic writing pass.

Write documentation

Use when the next decision is the shape, review path, or reuse rule for developer documentation.

Write documentation needs feature behavior, audience, setup steps, examples, and known limitations; its review lens is developer documentation quality, reader task and setup path, and codebase verification, not a generic writing pass.

Plan refactoring

Use when the next decision is the shape, review path, or reuse rule for a refactoring plan.

Plan refactoring needs current code shape, pain points, behavior to preserve, tests, and migration risk; its review lens is refactoring plan quality, behavior preservation and coupling removal, and codebase verification, not a generic writing pass.

Sketch API integration

Use when the next decision is the shape, review path, or reuse rule for an API integration plan.

Sketch API integration needs API docs, auth model, endpoints, data shape, errors, and rate limits; its review lens is API integration plan quality, auth flow and endpoint contract, and codebase verification, not a generic writing pass.

Explain regex

Use when the next decision is the shape, review path, or reuse rule for a plain-language regex explanation.

Explain regex needs target pattern, sample matches, sample non-matches, escaping rules, and test cases; its review lens is plain-language regex explanation quality, pattern tokens and sample matches, and codebase verification, not a generic writing pass.

Build learning roadmaps

Use when the next decision is the shape, review path, or reuse rule for a learning roadmap.

Build learning roadmaps needs current skill level, target outcome, time budget, projects, and feedback loop; its review lens is learning roadmap quality, skill baseline and project ladder, and codebase verification, not a generic writing pass.

Open a prompt workbench

Review-first run

Debug an Issue: work from codebase note where the next person

A practical debug an issue workflow for developers, with variable prompts, a messy-note example, quality checks, and next-step links. debug an issue treats debug log with reproduction and hypothesis rows as the asset to check, not as decorative output.

Turn error message, reproduction steps, recent changes, environment, and expected behavior into a debugging plan for a code reviewer, teammate, maintainer, or future self.

Bring first
Need likely causes, questions to ask, reproduction plan, and commands to verify. Do not suggest random rewrites. In debug an issue, the rough note has to lead because role-level advice would flatten the situation. A reviewer needs those notes kept separate from assumptions. Carry the debug an issue note into a debugging plan. For debug an issue, paste the source as bullets, constraints, and audience notes so the model has enough shape for a technical checklist with hypotheses, steps, risks, and verification commands.
Reject if
Restart the prompt if it adds citations, policies, credentials, or outcomes outside the source notes.

Ready-to-run path

Review Code: keep review checklist mapped to changed files sourced

Turn rough review code notes into a code review checklist; use the prompt, sample input, rejection rules, and review checklist together. review code review starts at the moment where code reviews can stay broad instead of naming file-level risks and test questions.

Turn diff summary, affected files, risk areas, tests, and intended behavior into a code review checklist for a code reviewer, teammate, maintainer, or future self.

Bring first
Need review checklist for security, redirects, edge cases, tests, naming, and rollback risk. Include questions for reviewer. Examples for review code help only when they keep the source note visible while shaping review checklist mapped to changed files. The response should leave the source trail easy to inspect. In review code, the supplied note becomes the base for a code review checklist. A usable review code input includes what is known, what is uncertain, and what the reviewer must verify.
Reject if
Send it back for revision if it skips examples that sound plausible but cannot be tied back to the user's source.

Ready-to-run path

Write Unit Tests: make test case table with edge conditions reviewable

Developers get a unit tests run sheet with real input, source checks, answer repair, and a handoff path for a code reviewer, teammate, maintainer, or future self. unit tests gives the user a concrete test case table with edge conditions to inspect, not just wording to polish.

Turn function behavior, edge cases, inputs, outputs, and existing test style into unit test cases for a code reviewer, teammate, maintainer, or future self.

Bring first
Need test cases, names, assertions, and edge cases. Existing tests use Vitest. Avoid testing implementation details. Phrase shopping in write unit tests fails because the note should become test case table with edge conditions. The user's note should stay readable after the answer is organized. This write unit tests run should turn that note into unit test cases. For write unit tests, paste the source as bullets, constraints, and audience notes so the model has enough shape for a technical checklist with hypotheses, steps, risks, and verification commands.
Reject if
Reject the answer if it invents facts, numbers, policy claims, citations, credentials, or examples that were not in the notes.

Review-first run

Write Documentation: keep doc outline with example and limitation blocks sourced

Turn rough documentation notes into developer documentation; use the prompt, sample input, rejection rules, and review checklist together. documentation review starts at the moment where documentation can describe the happy path while examples and limitations stay thin.

Turn feature behavior, audience, setup steps, examples, and known limitations into developer documentation for a code reviewer, teammate, maintainer, or future self.

Bring first
Need overview, setup steps, retry timing, example payload, error cases, limitations, and support troubleshooting notes. Examples for write documentation help only when they keep the source note visible while shaping doc outline with example and limitation blocks. The response should leave the source trail easy to inspect. In write documentation, the supplied note becomes the base for developer documentation. A usable write documentation input includes what is known, what is uncertain, and what the reviewer must verify.
Reject if
Send it back for revision if it skips examples that sound plausible but cannot be tied back to the user's source.

Ready-to-run path

Plan Refactoring: work from engineering workflow where context, tests, and

Use this page when refactoring needs current code shape, pain points, behavior to preserve, tests, and migration risk, a clear output shape, and a review pass before sharing with a code reviewer, teammate, maintainer, or future self. refactoring treats refactor plan with behavior-preservation checks as the asset to check, not as decorative output.

Turn current code shape, pain points, behavior to preserve, tests, and migration risk into a refactoring plan for a code reviewer, teammate, maintainer, or future self.

Bring first
Need refactor plan, preserved behavior, test coverage, file moves, migration steps, risks, and verification commands. In plan refactoring, the rough note has to lead because role-level advice would flatten the situation. A working result should keep source, limit, and reviewer together. Carry the plan refactoring note into a refactoring plan. For plan refactoring, paste the source as bullets, constraints, and audience notes so the model has enough shape for a technical checklist with hypotheses, steps, risks, and verification commands.
Reject if
Restart the prompt if it adds citations, policies, credentials, or outcomes outside the source notes.

Ready-to-run path

Sketch API Integration: check auth flow and endpoint contract

A focused prompt path for developers: gather context, create an API integration plan, repair weak answers, and save only the reusable parts. api integration needs a human pass that can replace polished filler with source-backed lines inside an API integration plan before the answer is reused.

Turn API docs, auth model, endpoints, data shape, errors, and rate limits into an API integration plan for a code reviewer, teammate, maintainer, or future self.

Bring first
Need integration plan from docs, endpoints, auth flow, data mapping, error handling, webhook validation, and tests. Developers need more than broad ChatGPT advice here; the answer has to work against the actual note and reviewer. A safer first pass should expose the factual base. a code reviewer, teammate, maintainer, or future self should still see the note while an API integration plan is being built. Sketch API Integration works better when the context is in named fields, because each variable can be checked before copying.
Reject if
Stop before sharing if it cannot show proof, numbers, or authority that the user did not provide.

Review-first run

Explain Regex: check pattern tokens and sample matches

A focused prompt path for developers: gather context, create a plain-language regex explanation, repair weak answers, and save only the reusable parts. regex needs a human pass that can replace polished filler with source-backed lines inside a plain-language regex explanation before the answer is reused.

Turn target pattern, sample matches, sample non-matches, escaping rules, and test cases into a plain-language regex explanation for a code reviewer, teammate, maintainer, or future self.

Bring first
Need regex explanation, pattern, sample matches, sample non-matches, edge cases, and test cases. Avoid catastrophic backtracking. Developers need more than broad ChatGPT advice here; the answer has to work against the actual note and reviewer. A safer first pass should expose the factual base. a code reviewer, teammate, maintainer, or future self should still see the note while a plain-language regex explanation is being built. Explain Regex works better when the context is in named fields, because each variable can be checked before copying.
Reject if
Stop before sharing if it cannot show proof, numbers, or authority that the user did not provide.

Ready-to-run path

Build Learning Roadmaps: prep code reviewer, teammate, maintainer, or future handoff

A prompt workbench for learning roadmaps, covering current skill level, target outcome, time budget, projects, and feedback loop, a sequenced plan with stages, owners, timing, and decision checkpoints, review checks, and follow-up fixes. learning roadmaps examples stay close to an engineering workflow where context, tests, and reproducibility matter, so the prompt has a real work setting.

Turn current skill level, target outcome, time budget, projects, and feedback loop into a learning roadmap for a code reviewer, teammate, maintainer, or future self.

Bring first
Need weekly plan, projects, reading, practice tasks, checkpoints, feedback sources, and what to skip. 5 hours per week. roadmap with practice project and feedback loop would be weak without the source details, so the evidence has to stay attached. A reviewable answer should keep the original constraint in the open. Developers should use the note as the base for a learning roadmap. Before developers run this, separate facts, preferences, and limits so the finished answer does not hide assumptions.
Reject if
Do not use the answer if it hides unsupported claims about actual error output, code behavior, and passing verification or treats uncertainty as fact.