◀ All posts

WEBSITES

Vibe coding, done right? Plan, memory, and tests instead of guesswork

Mateusz Bobrowski · · 8 min read

Vibe coding, done right? Plan, memory, and tests instead of guesswork

Vibe coding is tempting because it works from the very first prompt. You write a sentence, the agent replies with code, and the site is almost there. The problem comes later, when you ask for something you didn’t describe. The agent guesses, and you pay for every guess.

How many tokens are you burning on guesswork? Most people don’t track it until they see the bill or find a bug that has to be rewritten from scratch. In this post, I’ll share four habits that help with both problems. At the end, I’ll explain where I picked them up.

Talk first, code later

Before you open an agent, talk through the idea in a regular chat. The goal isn’t to get the model to write code. It’s to turn your rough thoughts into a specification the agent can follow without guessing.

A good specification covers four things:

  • what should work when the job is done,
  • what data goes in and what comes out,
  • what the agent must not change (language, framework, existing files),
  • how you’ll check that everything works.

Then you give the finished text to an agent, such as Claude Code. The agent doesn’t have to guess what you mean and can get straight to work. Guides to Claude Code offer similar advice: preparing a detailed prompt in another model beforehand can save tokens used by planning mode. Source: dsebastien.net, Claude Code Tips and Best Practices

One thing to keep in mind: chatting also uses up your quota. So keep the planning short and focused.

Memory files instead of repeating yourself

The agent doesn’t remember previous sessions. Every new chat starts from scratch unless you give it some context. That’s why, before a bigger build, you should prepare a few Markdown files the agent can refer back to:

  • CLAUDE.md with the project rules, settled decisions, and directory structure,
  • spec.md with the feature specification,
  • decyzje.md with what you’ve already agreed on and why,
  • a list of variables and screens, so the same thing doesn’t end up with three different names.

Keep the files small. CLAUDE.md is loaded in every session, so every unnecessary sentence costs you each time. One guide says a file between 50 and 200 lines works well for a project. Source: cc.bruniaux.com, CLAUDE.md Best Practices You don’t have to update it after every step. Just pause every so often and write down what’s been decided so far.

Long conversations can hurt, too. The more unnecessary text there is in the context, the easier it is for the model to lose the thread. When you finish a stage, start a new session and refer back to the files.

Skills that cut down on chatter and code

Claude Code has skills that change how the agent works. Two are worth knowing about, with a caveat.

Caveman makes the agent respond briefly and skip the preamble. Its author reports up to 75% savings in output tokens. An independent tester measured 15 to 25% in practice. Code, commands, and error messages stay the same, so the savings come from the text you read, not the code itself. Source: pasqualepillitteri.it, Claude Code Caveman Mode

Ponytail tells the agent to write as little code as possible to complete the task. Its author claimed a 54% reduction in code. In a test of 80 tasks conducted by JetBrains, the measured reduction was 15%, with costs about 10% lower. The savings showed up where the agent tended to overbuild. Source: blog.jetbrains.com, Ponytail Skill for Claude Code

A skill won’t fix a poorly described task. If the prompt is unclear, the skill will only make the wrong answer shorter.

Pricing: API, subscription, and limits

There are two ways to pay for models. It’s worth knowing about both before you start working.

The first is the API. You pay for the tokens you use. According to a pricing comparison, OpenAI’s latest model, GPT-6 Astra, costs $10 per million input tokens and $50 per million output tokens. The bill grows with the work, and every long session with a large context is charged again. Source: cloudprice.net, GPT Astra

The second is a subscription with limits. You pay a fixed monthly price and get a usage allowance for each five-hour period and for each week. For example:

  • ChatGPT: the Plus plan costs $20 per month. According to OpenAI Help, Plus includes an estimated 5 to 45 messages for GPT-6 Astra every five hours. Source: help.openai.com, Managing usage with GPT-6 Astra
  • Claude: the Pro, Max 5x, and Max 20x plans have a five-hour limit and a weekly limit shared by chat and Claude Code. According to pricing comparisons, Pro costs $20, Max 5x costs $100, and Max 20x costs $200 per month. You can check your usage with the /usage command. Source: morphllm.com, Claude Code usage limits
  • Cursor: the $20 Pro plan includes a $20 credit pool, which you use based on model costs. Once you run through it, additional usage is billed if you enable that option. Source: jetadmin.io, Cursor pricing explained
  • Gemini in Antigravity: the base limit resets every five hours, up to the weekly limit. Google raised these limits twice in May 2026, but users still report running out sooner than expected. Source: 9to5google.com, Google has tripled Gemini usage limits

Limits change often, so check the provider's current terms before you buy. A subscription gives you a predictable cost and a large pool, but it will stop you when the pool runs out. With the API, there’s no weekly pool, but you pay for every token.

I work with a subscription. I don’t think the API alone is a good choice for intensive coding. There’s a tradeoff: you can hit the limit halfway through a big task. So before a major phase, check how much you have left and plan the work to fit within the window.

Testing before release

Code generated in a few seconds isn’t ready to ship. Before you show anything to users, run through this simple checklist:

  1. Smoke test: does the app start, and do the main flows work?
  2. Logic test: are the results correct for several cases, including edge cases such as an empty field or a very large number?
  3. Code review: are there duplicated sections, unused variables, or places that could be simplified?
  4. Security review: are there any passwords or API keys in the code? Does the admin panel require a login, and is user input validated?

A bug found before release costs you a moment. A bug found by a user costs you their trust.

Basics worth knowing, even if you’re not a professional developer

You don’t have to be a developer to build websites with AI. But you do need to know what a website runs on so you can spot when something’s wrong.

  • Hosting and server: where the site actually runs and who has access to it.
  • Domain and HTTPS certificate: why the browser warns you about a site without encryption.
  • Security headers: instructions sent by the server to the browser, such as which script sources are allowed or whether the site can be embedded in another site's frame.
  • Firewall: a rule that determines what traffic reaches the server, such as allowing only HTTPS through selected ports.
  • Secrets: passwords, API keys, and tokens. Don’t store them in your code or in publicly accessible files.

These topics aren’t difficult. But ignoring them can be costly. A site with an admin panel that doesn’t protect its files could be taken over before you notice the problem.

Where AI still falls short

AI already replaces less experienced and mid-level developers on many tasks. But it won’t replace someone who’s worked with code for years and knows how to judge whether a solution is good. That person can find a shortcut, fit into one line what an agent spreads across a dozen files, and set up a server faster than someone who’s just learning.

So I treat vibe coding as a way of working, not a substitute for knowledge. The more you understand, the better you can guide an agent and the fewer tokens you waste going in circles.

How I know: AnyServ

These principles aren’t just theory. I learned them while working on my site, anyserve.eu. It was supposed to be a single app, but it ended up as a collection of free tools. There are now 28 to 30 of them, and the number keeps growing.

I tested every tool several times, and not just with Claude and Cursor. Perplexity, Gemini, Grok, and DeepSeek checked them too. The goal was to avoid misleading users.

The unit converter, one of my first calculators, taught me the most. Errors showed up when changing units. I’d enter centimeters, then switch to millimeters or kilometers, but the previous value would remain in the calculation. The result was absurd: 1 kilometer came out as 0,1 meters. When I switched to mass, 1 kilogram came out as 0,23 decagrams. Those errors had to be fixed by hand.

Later runs caught them. Different agents checked the site independently, and I ran a smoke test. I also caught this bug myself. The takeaway is simple: don’t trust AI blindly. Run the tests yourself and check the results before they reach users.

Frequently asked questions

Will vibe coding replace developers?

It already replaces less experienced and mid-level developers on many tasks. Someone with years of experience still brings something an agent can’t do on its own: the judgment to know whether a solution is good, and shortcuts that don’t come from a prompt.

Is it worth planning with a cheaper model?

Yes, because preparing a spec in chat saves tokens in the agent. But remember, the conversation also uses up your limit, so keep the planning brief.

Is the API cheaper than a subscription?

It depends on how much work you do. With the API, you pay for each token, while a subscription has a fixed cost and a usage limit. The author of this post uses a subscription and doesn’t think the API alone is a good choice for intensive coding.

How many lines should a CLAUDE.md file have?

According to one of the project guides, 50 to 200 lines works well. The file is loaded at the start of every session, so the shorter and more up to date it is, the fewer tokens it uses.

Are the caveman and ponytail skills safe for code?

Caveman changes the style of the responses, while the code stays the same. Ponytail reduces the amount of code, so you still need to test changes before releasing them, just like any other code.

Keep reading