Free tool · Runs in your browser
Prompt generator: the four-block template
A good prompt answers four questions: what should come out, what does the model need to know, what must it not do, and what does a good result look like. Fill in the four blocks and the generator assembles them into one prompt you can paste into ChatGPT, Claude or Claude Code.
No AI writes your prompt here. The generator puts your own words into a structure that works, which is the part most prompts are missing.
Last checked 24 September 2026
One sentence with a result someone could check.
What the model cannot know: your setup, numbers, audience.
What must not happen, and any hard limits.
One concrete case and the answer you expect.
Your prompt
Your prompt appears here as you type.
Claude prompt generator
How Anthropic itself approaches prompts
Anthropic's own prompt generator is a metaprompt recipe in the Claude Cookbook, a notebook that drafts a first prompt for you. Its prompting guide then lists the techniques that improve one: clarity, examples, XML structuring, role prompting, thinking and prompt chaining. The four blocks cover the first two on every prompt, which is where most of the gain is.
| Technique in Anthropic's guide | Where it sits in the four blocks |
|---|---|
| Clarity | Goal and constraints: one checkable result, and what must not happen |
| Examples | The example block |
| Structure | The labelled blocks themselves; add XML tags inside a block for long material |
| Role prompting | A line at the start of the context block, when it helps |
| Verification targets (Claude Code docs) | The example block: an expected output Claude can check itself against |
Examples
Prompt examples for everyday jobs
Five prompts built with the generator, one per job people most often hand to ChatGPT or Claude. Copy one, then replace the details with yours.
Goal: A cover letter of at most 250 words for the job ad below that I can send today. Context: The job ad: [paste]. My CV: [paste]. I am moving from customer support into a junior operations role, and the ad asks for process documentation, which I have done for two years. Constraints: No phrases like "I am writing to apply" or "passionate". No claims that are not in my CV. Plain English, no bullet points. Example of a good result: The first sentence names the role and the one thing I have done that the ad asks for. The letter ends with one line on why this company, taken from the ad itself.
Goal: Tell me the three weakest points of the draft below, ranked by how much they would cost me with the reader. Context: The draft is a proposal to a client who has worked with us for a year. The reader is their managing director, who reads on a phone. Draft: [paste]. Constraints: No compliments and no summary of what is good. Each point in two sentences at most, with the exact passage it refers to. Example of a good result: "1. The price appears in paragraph four. A reader on a phone decides before that. Passage: '...'."
Goal: A reply to the customer email below that resolves the complaint in one message. Context: The order arrived six days late because of our warehouse, not the courier. We can offer free shipping on the next order or a 10 percent refund. Email: [paste]. Constraints: Do not blame the courier. No more than 120 words. Offer one option, not both. Example of a good result: Starts with the apology and the reason in one sentence, then the refund, then one sentence on what changes. No "we value your feedback".
Goal: Turn the notes below into a list of decisions and a list of tasks with an owner and a date. Context: Weekly team meeting, five people. The notes are unedited and in the order things were said: [paste]. Constraints: Only what was decided or assigned. If an owner or a date is missing, write "open" rather than guessing. Example of a good result: Decision: launch moves to 14 October. Task: update the pricing page, Anna, 10 October.
Goal: Add a newsletter sign-up form to the footer that stores the email address and shows a thank-you message. Context: Next.js App Router project with Tailwind. Emails go to the existing Supabase table newsletter_signups. The footer is src/components/Footer.tsx. Constraints: No new dependencies. Do not touch any other page. Validate the email in the browser and on the server. Example of a good result: Entering test@example.com shows "Thanks, you are on the list" and adds one row. Entering the same address twice adds no second row.
Before and after
Before and after: rebuilding a weak prompt
Most weak prompts are a goal with nothing else. The model fills the gaps with averages, which is why the answer reads like everyone else's.
Write me a LinkedIn post about our new product.
Goal: A LinkedIn post of at most 120 words that gets people who run small online shops to click the link to our new stock alert feature. Context: The feature sends a message when an item drops below a set stock level. Our readers are shop owners who have run out of stock during a sale at least once. Constraints: No emojis, no hashtags, no "excited to announce". One link at the end. Example of a good result: Opens with the moment a best seller sells out mid-campaign, then what the alert does, then the link.
Method
The four blocks in detail
Block 1
Goal
One sentence with a result someone could check: a length, an audience, an action. "A good email" cannot be checked, "a reply under 120 words that offers a refund" can.
Block 2
Context
Everything the model cannot know: your situation, your numbers, your reader, the material itself. This is usually the longest block.
Block 3
Constraints
What must not happen: phrases you never use, claims that are off limits, a word limit, a format. Constraints are where your standards live.
Block 4
Example
One concrete case with the answer you expect. It shows the model what good looks like and gives it something to check its own answer against.
Tools
ChatGPT, Claude and Claude Code: what changes
The four blocks work in all three. What changes is how much context you have to supply yourself.
| ChatGPT | Claude | Claude Code | |
|---|---|---|---|
| Context block | Paste the material in | Paste or attach; long material inside XML tags works well | Often short: it reads your project files itself |
| Constraints | State format and length | State format and length | Name files it must not touch and dependencies it must not add |
| Example | An expected output | An expected output | A test it can run: input and expected result |
Prompt optimizer
Using the generator to fix a prompt that does not work
Paste your existing prompt into the goal block and read what is left empty. An empty context block explains generic answers. An empty constraints block explains the phrases you keep deleting. An empty example block explains why you get something different each time.
Fill the missing block, run the prompt again and compare. It is slower than asking a model to rewrite your prompt, and it teaches you why the second version works.
How it works
The goal is one sentence with a result someone could check. The context is everything the model cannot know: your setup, your numbers, your audience. The constraints are what must not happen. The example is one concrete case with the answer you expect.
The example block matters most and is left out most often. It turns a vague request into something the model can test its own answer against.
This is the same structure we read aloud in our live build, where one prompt of this shape builds a working price calculator in a few minutes. Press "Fill in the example" to see that prompt.
Frequently asked
Does this prompt generator use AI?
No. It assembles the text you type into the four-block structure, in your browser. That is deliberate: the words that make a prompt work are the ones only you know, such as your numbers, your audience and your limits.
Does the structure work for ChatGPT and Claude alike?
Yes. Goal, context, constraints and example are not tied to one model. With Claude Code the context block usually gets shorter, because it reads your project files itself.
How long should a prompt be?
As long as the context needs and no longer. A clear goal and a concrete example do more than extra adjectives. If a block would be empty, leave it empty and the generator drops it.
What is Anthropic's prompt generator?
Anthropic publishes a metaprompt recipe in the Claude Cookbook, a notebook that drafts a first prompt for a task. Its prompting guide then recommends clarity, examples, structure, role prompting, thinking and prompt chaining to improve it.
Can I use this as a prompt optimizer?
Yes. Paste your existing prompt into the goal block and look at which blocks stay empty. The missing block usually explains what goes wrong: generic answers, unwanted phrases, or a different result every time.
What makes a good prompt for ChatGPT?
A checkable goal, the context the model cannot know, the constraints that reflect your standards, and one example of the result you expect. Most weak prompts have only the first.
More free tools
All free toolsFrom prompt to working product
In The Claude Code System you write prompts like this for your own project and ship the result, four weeks with weekly live sessions.
See the courseFor information only. The results are estimates and templates that may not fit your situation, and ENLIX accepts no liability for decisions based on them.