Skip to content
SCALE MY VIBE CODE
← All posts

A Vibe Coder's Guide to Prompting

Everything you need to know about prompting as a vibe coder

Maab Saleem
  • vibe-coding
  • ai
  • tools

You can type “the signup thing is broken, fix it” into Claude Code and it will go find the signup flow, work out what “broken” probably means, and fix it.

No file paths, no context, not even a complete sentence.

Modern models are unusually good at extracting intent from a sloppy prompt. That’s why most of us have quietly stopped writing careful ones, and why it almost never seems to cost us anything.

The approach even has a name: lazy prompting. Type the bare minimum, look at what comes back, and add detail only if you have to.

It works, most of the time.

But every gap you leave in a prompt, the model fills for you.

Sometimes it fills one with an assumption you would have argued with, writes perfectly functional code on top of it, and reports back that the job is done.

And it is…done, just not the way it should have been.

Normally, reading the code would expose that mistake. But vibe coding often removes that safety net.

So here’s how to write prompts that leave less to interpretation.

Category 1 — Start With the Target, Not the Task

Let’s start with three of the most fundamental prompting principles.

Define “Done” Before You Describe the Task

A model optimizes for whatever outcome your prompt gives it.

So say what has to be true when it’s finished, for example:

  • The endpoint still responds in under 200ms.
  • The existing tests still pass.
  • The function signature doesn’t change.

Unstated constraints are exactly the ones that get violated.

Attach the “Why” to Every Constraint

A rule works better when the model knows why it matters. That context helps it apply the rule in other situations too.

The example in Anthropic’s docs is a good one.

“NEVER use ellipses” is weaker than “Your response will be read aloud by a text-to-speech engine, so never use ellipses since the text-to-speech engine will not know how to pronounce them.”

Same rule, but now the model knows what it’s protecting, so it also avoids the twenty other things that would confuse a speech engine.

Deliver the Spec Whole

Giving requirements one at a time may seem helpful, but it can make the model less accurate.

Researchers at Microsoft and Salesforce tested this by giving models the same instructions either all at once or across several messages. When the instructions were split across multiple turns, performance dropped by an average of 39%.

39%

average performance drop when identical instructions were delivered across multiple turns instead of one complete prompt

The reason is simple: the model starts making assumptions early. By the time you add another requirement, it may already be working from an earlier assumption.

So, when you can, give it the full set of requirements upfront.

Category 2 — Give It Something Concrete to Build Against

These four give the model something specific to work from, instead of leaving it to guess.

Hand It a Signature, a Type, or a File Skeleton

If you don’t tell the model what shape the code should take, it will pick one for you. At times, it may not be the right one.

So give it a starting point. A function signature, a type definition, or an empty file with // TODO comments where the logic should go.

Any of these turn an open question into a fill-in-the-blank exercise, which is what models are best at.

This also helps new code match the code you already have.

Describe Bugs as Symptom, Suspected Location, and What “Fixed” Looks Like

“The login is broken, fix it” tells the model to make the error go away. That is not the same as fixing what caused it.

Anthropic’s Claude Code docs suggest a better version. Instead of “fix the login bug”:

“users report that login fails after session timeout. check the auth flow in src/auth/, especially token refresh. write a failing test that reproduces the issue, then fix it”

They also recommend adding one specific sentence to any bug prompt: “address the root cause, don’t suppress the error.”

Without it, the model can technically succeed by wrapping the broken code in something that hides the error message.

Say What Must Not Change

Scope is the thing coding agents get wrong most often, usually because nobody told them where to stop.

The fix is simple. Name the things it is not allowed to touch.

“Fix the sitemap. Do not touch colors, copy, images, or animations.”

Ban the Slop by Name

Models have a few predictable bad habits, and you can rule them out before they happen.

Both OpenAI and Anthropic publish almost identical lists of them in their coding guides.

The ban list
  • Broad try/catch and "success-shaped fallbacks" that swallow the error instead of surfacing it

  • Hardcoded values that make the test suite pass without making the code correct

  • Defensive code guarding against scenarios that cannot actually happen

  • Helpers and abstractions invented for one-time operations or hypothetical future requirements

Anthropic suggests one line that covers most of this:

“The right amount of complexity is the minimum needed for the current task.”

Category 3 — Make It Think Before It Builds Something Big

These three matter most when the model is about to write a lot of code in one go.

Open With “Do Not Write Any Code Yet”

For large or complicated tasks, your first prompt shouldn’t ask for code at all. Ask for a plan instead, so you can check it before anything gets built.

This isn’t just a preference. Peer-reviewed research in ACM’s software engineering journal found that asking a model to plan first improved its success rate by up to 25.4% compared to writing code straight away.

It’s also cheap. Rejecting a plan you disagree with takes thirty seconds. Undoing a finished version of the wrong idea takes an afternoon.

Ask for Questions in the Imperative

“Any questions?” gets you “No, this is clear!” almost every time. It’s a yes or no question, and the model picks the agreeable answer.

“Ask me the questions you need answered before you start” gets you an actual list. That list is usually where you find the thing you forgot to mention.

You have to ask this way because models rarely admit when they’re confused.

A benchmark called HumanEvalComm deliberately made coding problems vague, incomplete, or self-contradictory, then checked what the models did about it.

Most of them just started writing code.

60%+

of responses to deliberately vague coding problems were code rather than questions. Success rates on those problems fell by 35–52%

Make It Restate the Problem First

Before the model starts, ask it to restate the problem in its own words and list any assumptions it is making.

This gives you a quick way to check whether it has understood the task correctly.

If something looks wrong, you can correct it before any code is written.

That is much easier than finding the same misunderstanding after the model has already built around it.

Category 4 — After the Code Exists

These three are for after the code is written.

Run the Critique as a Separate Prompt

A model that just wrote some code isn’t a good judge of it. It tends to agree with itself.

So review in a separate session. Start a fresh conversation, show it only the changes, and give it a role:

“review this as a staff engineer reviewing a junior developer’s pull request.”

One warning. Scope the review, or you’ll drown in suggestions.

Anthropic’s docs explain why: “A reviewer prompted to find gaps will usually report some, even when the work is sound, because that is what it was asked to do.”

So tell it what counts. “Report gaps that affect correctness or the stated requirements, not style preferences.”

Otherwise you’ll spend the afternoon implementing changes nobody needed.

Make the Model Write Its Own Guardrail

When the model does something wrong, don’t just correct it. Ask it to write the rule that would have stopped it.

claude code

> what should I add to your prompt so you won't do this again?

Use the rule in future prompts, especially if the model keeps making the same kind of mistake.

Over time, this can help you build a short list of useful guardrails based on the problems you actually run into.

After Two Failed Corrections, Start Over

Every failed attempt stays in the conversation.

By your third correction, the model is reading your new instruction alongside a detailed record of two wrong answers, and those wrong answers still influence what it does next.

Anthropic’s guidance is specific. After two failed corrections, clear the session and start again with a better prompt.

"A clean session with a better prompt almost always outperforms a long session with accumulated corrections."

The part people skip is carrying forward what didn’t work. Say it explicitly in the new prompt, or the fresh session will likely try the first wrong approach all over again.

We’ve written more about what to do when this keeps happening.

Category 5 — Keep the Prompt Itself Clean

These two help you write cleaner prompts.

Every Instruction Dilutes the Others

Rules aren’t free. Every rule you add competes for attention with the rest of them, and researchers have measured how much.

A 2025 benchmark called IFScale gave models up to 500 instructions at once and counted how many they followed.

Even the best models followed only 68% of them at that level, and they were noticeably better at the instructions that came first.

This is why Anthropic, Cursor, and OpenAI all give similar advice about rules files: cut them down.

Anthropic’s test for each line is “Would removing this cause Claude to make mistakes?” If not, delete it.

If you maintain one of these files, check out our CLAUDE.md guide.

Hunt for Contradictions

If two of your instructions disagree, the model may spend extra effort trying to reconcile them instead of simply choosing one.

OpenAI notes that contradictory instructions can hurt performance because when model may try to satisfy both at once.

For example, “Keep it minimal” and “make it production-ready” can pull in opposite directions. So can “don’t add any new libraries” when the task actually requires one.

Read through your rules file every so often and check that all of the instructions can realistically be followed together.

Category 6 — Stop Pushing the Model Harder

These two are about what happens when you lean on the model to get something right.

”Make No Mistakes” Is Not a Prompting Strategy

When the tool gets something wrong, the reflex is to raise the stakes on the retry.

  • 1st try

    "be very careful."

  • 3rd try

    "double-check everything."

  • 5th try

    "no mistakes this time."

Researchers at Wharton’s Generative AI Labs tested the stronger version of this.

They offered models tips and made threats across two hard benchmarks, and found that threatening or tipping a model “generally has no significant effect on benchmark performance.” (Sorry to everyone who has been promising Claude a bonus.)

Telling a model to try harder just adds words to your prompt. Spend that sentence on a real constraint instead.

Give It Permission to Fail

A model will almost always try to give you what you asked for, even when what you asked for isn’t possible.

Ask why a page is slow and you can get a rewrite instead of an answer. Ask for something the library doesn’t support and you can get code that looks right and quietly doesn’t work.

It isn’t being dishonest. Attempting the task is the only option it has, unless you give it another one.

So give it another one. For example:

“It’s OK if you don’t know, or if this isn’t possible.”

It’s better to find out early that something won’t work than after the model has already built around a bad assumption.

Wrapping Up

Lazy prompting is not a complete no-no.

For some trivial tasks, a quick prompt and a quick look at the result is exactly the right amount of effort. The trick is knowing which prompts deserve more than that.

In our experience, it’s the ones where there are several reasonable ways to interpret what you asked.

Write those ones carefully. Be as lazy as you like with the rest.