Coding Prompts for ChatGPT, Claude and Copilot: Ten That Ship, and the Rules Behind Them
Most lists of ChatGPT prompts for coding are templates with brackets and no evidence they were run. This page starts from what OpenAI, Anthropic and GitHub say in their own prompting documentation, reduces it to five things every coding prompt needs, gives you ten prompts that carry all five, and shows what a library of 121 prompts built to that spec looks like when you count it.
Updated

What do the vendors say a coding prompt needs?
Five things, and the three guides agree more than their fans do. Anthropic's prompting best practices: “Claude responds well to clear, explicit instructions. Being specific about your desired output can help enhance results.” OpenAI's prompt engineering guide on structure: “Markdown headers and lists can be helpful to mark distinct sections of a prompt, and to communicate hierarchy”, and on examples: “Include a handful of input/output examples in the prompt.” GitHub's prompt engineering for Copilot Chat lists eight rules, starting with “Start general, then get specific” and “Avoid ambiguity”. Read on 26 September 2026, they reduce to this:
| OpenAI | Anthropic | GitHub Copilot | |
|---|---|---|---|
| Context: stack, files, data | A Context section in the developer message; “constrain the model's response to a specific set of resources” | “Add context to improve performance” | “Indicate relevant code”: open the files it should read |
| An explicit deliverable | Identity then Instructions, in that order | “Be clear and direct”; ask for action, not suggestions | “Start general, then get specific” |
| Boundaries: what not to touch | Instructions section | Overeagerness and file-creation sections for agentic coding | “Break complex tasks into simpler tasks” |
| Cases and examples | “Provide a diverse range of possible inputs with the desired outputs” | “Use examples effectively” | “Give examples” |
| Verification | Test changes with unit tests and validate patches | “Ask Claude to self-check”; never remove or edit tests to pass | “Experiment and iterate” |
The one line worth memorising is Anthropic's, because it names the failure everyone has seen: “It is unacceptable to remove or edit tests because this could lead to missing or buggy functionality.” Two of the ten prompts below carry it.
What does a library built to that spec look like?
Ours has 121 base prompts, every one with the same section skeleton, and the site counts them at build time rather than quoting a number written once. The most common sections across the library, by how many prompts carry each:
| Category | prompts |
|---|---|
| Core Features | 121 |
| Build Order | 121 |
| Safe-Guard Instructions | 121 |
| Before Building | 121 |
| Screens & States | 36 |
| Verification | 20 |
| Repository Rules | 18 |
Counted from the H2 headings of every base prompt in the library at build time on 26 September 2026.
Length follows structure: the median base prompt is 288 words, the shortest 244 and the longest 369. The last section every prompt ends with is the fifth part of the table above, turned into a habit: a line that asks the model to ask before building. When we ran three of them, that line produced two and four clarifying questions before any code, which is the cheapest verification there is. The prompting guide walks the skeleton section by section, and the prompt library has all 121 with their channel.
Ten coding prompts that carry all five parts
Written for a chat with ChatGPT or Claude, or for Copilot Chat with the relevant files open. Replace the brackets; do not delete the lines you think are obvious, they are the ones the model skips.
Context: [stack, e.g. Next.js 15 app router, Supabase auth, Tailwind]. The relevant files are [paths].
Build: [one feature in one sentence].
Must: [2 to 4 behaviours, numbered].
Must not: touch [files or behaviours to leave alone].
States: empty, loading, error and success for every new screen.
Output: the diff per file, then one paragraph on what you assumed.
Before writing code, ask me anything you need to know about [the user or the data].Context: [stack]. Symptom: [exact error or behaviour, copied]. Expected: [what should happen].
Already tried: [list, so you do not repeat them].
Constraints: do not change [policies, schemas, public APIs].
Do this in order: name the most likely cause and the evidence for it; propose the smallest change that tests that cause; only then write the fix.
If you need a file I have not shown, name it instead of guessing its contents.Refactor [file or module] to [goal: smaller functions, remove duplication, extract a hook].
Behaviour must be identical: same inputs, same outputs, same side effects.
Keep the public interface and every existing test unchanged; if a test must change, stop and tell me why.
Output: the new code, then a list of every behavioural difference you could not avoid (expected: none).Review this diff as a senior engineer on this codebase: [paste diff].
Report only findings that would change a decision, ordered by severity: correctness, security (secrets, auth, injection), data loss, performance, then style.
For each: file and line, what breaks, a concrete input that triggers it, the fix.
Do not restate what the code does. If you find nothing above style, say so in one line.Before implementing [feature], write the tests for it in [framework] covering: the happy path, each validation failure, the empty case, and one concurrency or ordering case if any state is shared.
Use the existing test conventions in [path]. Do not mock what you can run.
Then implement until the tests pass. Never edit or delete a test to make it pass; if a test is wrong, tell me and stop.Explain [file] to an engineer who knows [language] but not this codebase.
In order: what it is for in one sentence; the data it reads and writes; the entry points and who calls them; the two places most likely to break when changed.
Under 300 words. Quote line numbers, not paraphrases, for anything non-obvious.Write a migration for [change] against this schema: [paste or path].
Every new table enables row-level security in the same migration and gets policies that compare auth.uid() with an owner or membership column. Never "using (true)" on user data.
Then write two verification queries: one as the owner (expects rows) and one as a different user (expects zero).
Output: the migration file, the two queries, and one paragraph on what could go wrong on existing rows.Integrate [API] for [purpose]. The key lives in an environment variable on the server and never reaches a client bundle.
Handle, in this order, before any happy-path UI: missing key, network timeout, 4xx from the provider, 5xx from the provider, rate limit with retry-after.
Log the provider's request id on every failure. Output: the server handler, the client call, and the error states the UI shows for each case.We are moving [from X to Y]. Do not write code yet.
List every file that must change, grouped by risk: mechanical (find and replace), behavioural (semantics differ), and unknown (needs a test to find out).
Propose the order that keeps the app deployable after every step. Name the step where a rollback stops being cheap.
Then wait for my go before the first step.I am about to ask you to [vague task]. Before you do it, rewrite my request as a prompt with: the context you would need, the exact deliverable, what must not change, the states or cases to cover, and the questions you would ask me first.
Show me that prompt. I will answer the questions, then you run it.Which of these have been run, and what happened?
Prompts 1, 5 and 7 are the pattern behind three library prompts we ran in a personal Lovable workspace, reading the credits page before and after. Lovable's own rule for the loop that follows is worth quoting: “The single most important habit: one change per prompt, verify in the preview, then move on”, from its guide to building a product.
| Date | Questions asked first | Credits | Result | |
|---|---|---|---|---|
| Landing page + email opt-in | 2026-07-31 | 0 | 1.8 | One round, all five priority features, inline success state, Cloud enabled |
| Empty states and skeletons | 2026-09-26 | 2 | 9.5 | Asked 2 questions, built a /states gallery and a task list, verified slow load, failure and retry |
| SaaS MVP with user auth | 2026-09-26 | 4 | 10.4 | Asked 4 questions, enabled Cloud, self-tested sign-up and invites, roles checked in the database |
The prompt examples page shows the screenshots; the idea-to-app guide puts the runs in the whole path from brief to first users. What we have not done is run the ten prompts above through ChatGPT, Claude and Copilot side by side on the same repository. That is a benchmark, it needs a fixed codebase and paid seats on all three, and until it exists this page claims structure, not scores.
Where should a good prompt live after you write it?
Not in a chat window. Each tool has a place for instructions it reads without you pasting them, and the prompts above sort into them by how often they run:
| Put it in | Because | |
|---|---|---|
| Conventions that hold in every chat (parts of prompts 1, 7, 8) | Cursor rules | A .mdc file attached by glob or always; three copyable files in the guide. |
| A repeatable procedure (prompts 3, 4, 5, 9) | a Claude Code skill | Invoked by name, runs inside the conversation. |
| A job whose output you do not want to read twice (prompts 4, 6) | a Claude Code subagent | Own context window; only the report returns. One measured run in the guide. |
| A builder's standing brief (prompts 1, 10) | Lovable project knowledge | Read on every message; the answers to prompt 10 are what goes there. |
The prompt text is the same in all four places. What changes is how it gets in front of the model, and how much of your attention it costs each time.
Sources
All checked on 26 September 2026. Library statistics are computed from src/data/prompts.ts at build time; run data is in src/data/runs.ts.
Frequently asked
What are the best ChatGPT prompts for coding?↓
Do these prompts work in Claude and Copilot as well as ChatGPT?↓
How long should a coding prompt be?↓
Why do most prompt lists not show output?↓
Should the prompt tell the model not to change tests?↓
Where should a good prompt live after you have written it?↓
Related reading
- how to write prompts for Lovable
The skeleton, section by section, with before-and-after pairs.
- Cursor rules
Where the conventions in these prompts belong.
- Claude Code commands and skills
A repeatable prompt as a slash command.
- Claude Code subagents
Review and explain jobs in their own context window.
- three prompts and what they built
Screenshots and credits from the runs.
- idea to app
Where a build prompt sits in the whole path.
- the prompt library
101 prompts built on the same skeleton, by channel.
- backend prompts for roles, jobs and RLS
The long form of prompt 7.
- add an API to a Lovable app
The long form of prompt 8.
- advanced prompting: Skills, goals and chains
Meta-prompting and chains on the builder side.
- Cursor vs Claude Code
The two tools these prompts route to.
- the CLAUDE.md file
Standing rules versus per-task prompts.
- Claude Code prompts
The long form: repository rules, verification, channel.
- Cursor prompts
The long form for Cursor's Agent, rule file named.
- cursorrules examples
Rules by framework, glob-scoped.
- AI coding tools
The tools these prompts run in, priced.
- vibe coding prompts
The builder-side prompts, channel included.
Written by

Marco Kohns
Founder of ProtoBites - Venture Growth Studio
Growth PM at a Silicon Valley scale-up (a16z and General Catalyst backed), ex-Techstars where he consulted 13 early-stage startups, Reforge-trained. Every prompt on this site comes out of shipping ProtoBites' own portfolio products.