Appearance

Language

Mastering AI agents

What Is Vibe Coding? A Beginner's Guide, and Where It Breaks

Vibe coding means building software by describing what you want to an AI and accepting the code it writes without reading it. It's great for prototypes and personal projects, and it breaks on security, data and anything you later need to debug.

Kelvin Wang · · 7 min read

You describe the app, run it, say what’s wrong, and let the AI fix it, over and over, until it works. Andrej Karpathy coined the term in February 2025 and said it was fine for throwaway weekend projects. It’s a fast way for a beginner to get a working prototype or a personal website. It breaks down when the project handles real users’ data, logins or money, because nobody has checked what the code actually does.

Where the term came from

  1. 2025-02-02

    Andrej Karpathy names it.

    In a post on X, the former Tesla AI director described a new kind of coding where you give in to the vibes and forget the code exists, and added that it was not too bad for throwaway weekend projects [1].

  2. 2025-03-19

    Simon Willison draws the line.

    He defined vibe coding as building software with an LLM without reviewing the code it writes. If you review, test and can explain the code, he argued, that is ordinary software development that happens to use an AI [2].

  3. 2025-11-06

    Collins makes it Word of the Year.

    Collins Dictionary chose "vibe coding" as its 2025 Word of the Year [3].

Since then, people use the phrase loosely for any coding with AI help. The original meaning is narrower, and it’s the useful one: the defining feature is that you don’t read the code. It matters because almost every way vibe coding goes wrong comes down to code nobody looked at.

What a vibe coding session looks like

You don’t need to know a programming language. A typical loop:

  1. Describe the result. “Make a one-page personal website with my name, a short bio, three projects with links, and a dark mode toggle.”
  2. Let the AI build it. The tool creates the files, installs what it needs and starts a preview.
  3. Look at it and react. “The project cards are too close together on a phone. Make the bio shorter. Add my GitHub link to the footer.”
  4. Paste errors back. If something crashes, copy the error message into the chat and ask the AI to fix it.
  5. Repeat until you’re happy, then publish.

You judge the result by looking at it and clicking around. You never read the code.

Tools you can vibe code with

The tools fall into three groups. Which one fits depends on how much you want to touch your own computer and files.

TypeExamplesHow it worksGood for
Browser app buildersReplitYou chat in a web page; it builds and hosts a preview for youZero setup, fastest first result
AI code editorsCursor, VS Code with an AI extensionAn editor on your computer with an AI that edits your filesSeeing and owning every file
Terminal coding agentsClaude Code, Codex CLIAn agent in your terminal that reads, writes and runs commands in your projectLarger projects, scripted workflows

Each group can be used for careful AI-assisted development too. The tool doesn't decide whether you are vibe coding; whether you read the code does.

All of these change quickly, and pricing, free tiers and features shift every few months. Pick based on how you like to work, try the free tier, and switch if it doesn’t suit you.

Go deeper Claude Code vs Codex vs Grok Build in 2026: Which AI Coding Agent Fits You Each tool judged on the same points: who it suits, how you use it, price and limits. No winner picked.

What vibe coding is good at

  • Prototypes. Getting an idea on screen in an afternoon to see whether it’s worth building properly.
  • Personal tools. A script that renames your photos, a dashboard only you use, a calculator for your own budget. If it breaks, only you are affected.
  • Static websites. A personal site or portfolio with no logins and no database has very little that can go seriously wrong. The worst case is usually a broken layout.
  • Learning by example. Seeing working code for something you wanted to build is a fast way to learn what’s possible, even if you don’t understand every line yet.
  • Throwaway experiments. Trying a new library or API to see how it behaves.

What these have in common: low stakes. Nobody else’s data is involved, and a failure costs you some time.

Where vibe coding breaks

The problems start when the project stops being low stakes and nobody has read the code.

Security holes you can’t see

A page can look perfect and still let anyone read or change your database. The best-known case: in 2025 a researcher reported that many apps generated with the builder Lovable had database access rules (Row Level Security, in Supabase) that let anyone on the internet read or write their tables. It was filed as CVE-2025-48757. Lovable disputed the CVE, saying each customer is responsible for protecting their own app’s data 4. Either way, the apps worked fine in the browser, and the owners had no way to notice the hole without understanding the rules.

If your project has a database, learn the access rules before real users sign up. This is the part AI tools most often get wrong, and a working demo tells you nothing about it.

Go deeper Supabase RLS Tutorial: Policies, using vs with check, Testing How database access policies work and how to test that they actually block strangers.

Agents that act on real data

Coding agents can run commands, and commands can delete things. In July 2025, SaaStr founder Jason Lemkin reported that Replit’s AI agent deleted his production database during a declared code freeze, then initially told him a rollback wouldn’t work. He recovered the data himself. Replit’s CEO called it unacceptable and announced automatic separation of development and production databases and better rollbacks 5.

The fix is boring: keep a copy of your data, give the AI a test database instead of the real one, and don’t let any agent run destructive commands against production without you approving each one.

Leaked keys and passwords

An AI tool may paste an API key straight into your code to make something work. If that code goes to a public GitHub repository, the key is public. One of the first commits in this site’s own repository is a rule that keeps every .env file (where keys live, except a blank example template) out of git; the commit message says it’s there to prevent secret leaks. Add that rule before your first commit, and never paste a secret into a chat unless you’re sure where it ends up.

Code you can’t fix

When the AI gets stuck in a loop, fixing one bug and causing another, a vibe coder has no way out except asking again. The bigger the project grows, the more often this happens, and if you don’t know how the pieces fit together you can’t point the AI in the right direction. Writing down what the project should do before you start, and keeping that document in the project, gives both you and the AI something to check against.

Go deeper AI Coding Workflow: Write the Spec, Then the Plan (Templates) A short spec and a step-by-step plan that keep an AI agent from drifting.

Works on your machine, fails when deployed

A preview that runs locally can still fail when it’s built on a hosting service. This site hit exactly that in November 2026: the build failed on Cloudflare’s build servers on 5 of 7 pushes with EMFILE: too many open files. The cause was the bundler (Rollup) opening up to 1,000 files at once by default, more than the build server allows. The fix was one setting, maxParallelFileOps: 64, confirmed by reproducing the low limit locally, followed by a test so the setting can’t quietly disappear. An AI can help diagnose an error like that, but only if you can read the build log and tell it what happened.

How to vibe code without getting burned

You can keep most of the speed and avoid most of the damage with a few habits:

  • Use git from day one. Commit every time something works. When the AI breaks things, you can go back. Of all these habits, this one saves you most often.
  • Keep secrets out of the code. Store keys in a .env file, add .env to .gitignore, and check the repository before making it public.
  • Read the code that touches data, logins and money. You can vibe code a layout. You should understand, or have someone review, anything that decides who can see or change what.
  • Separate test and real. Test database for the AI, real database for users. Back up the real one.
  • Write a short spec first. A page describing what you’re building and what “done” means keeps both you and the AI on course.
  • Ask the AI to explain. “Explain what this file does in plain English” turns vibe coding into learning, and over time you’ll start catching mistakes yourself.

Should you try it?

If you’ve never written code and want a personal website, a small tool or a prototype, vibe coding is a reasonable way to start. The risk is low while there’s no database, no login and no other people’s data. Before you add any of those, slow down: learn what the code does in those parts, or get someone who knows to look at it.

Go deeper How to Build a Personal Website with AI in 2026 A step-by-step build of a real personal site with an AI coding tool, from an empty folder to a live domain.

Sources

  1. 1. Andrej Karpathy's post coining "vibe coding" · X · 2025-02-02
  2. 2. Not all AI-assisted programming is vibe coding (but vibe coding rocks) · Simon Willison · 2025-03-19
  3. 3. Collins' Word of the Year 2025 · Collins Dictionary · 2025-11-06
  4. 4. CVE-2025-48757 · NIST NVD · 2025-05-30
  5. 5. AI coding tool Replit wiped a database and called it a catastrophic failure · Fortune · 2025-07-23

About the author

Kelvin Wang

Electrical engineer building tools with AI agents, sharing hands-on notes on engineering and investing.

More about me