# What Is Vibe Coding? (And When It Works)

URL: https://www.devopsness.com/blog/what-is-vibe-coding
Author: Kiril Urbonas
Published: 2026-08-06
Updated: 2026-10-31
Categories: AI
Tags: AI, Vibe Coding, Coding Assistants, Productivity, Development

Summary: Vibe coding means describing what you want in plain language and letting an AI build it, accepting the code without reading every line.

---
# What Is Vibe Coding? (And When It Works)

Vibe coding is building software by describing what you want to an AI assistant in plain language and accepting the code it generates without reading it closely. You run the result, judge it by feel, and prompt the next change. It is great for prototypes and throwaway scripts, and reckless for anything you will ship or maintain.

> [!VERIFIED]
> Term origin against Andrej Karpathy's February 2025 post and Simon Willison's definition; package-hallucination figures against Spracklen et al. (arXiv 2406.10279); gitleaks, Semgrep CLI and PyPI JSON API usage against their official docs. Checked October 2026.

Karpathy described it as a mode where you "fully give in to the vibes" and "forget that the code even exists." The definition we use comes from Simon Willison: vibe coding is building software with an LLM *without reviewing the code it writes*. If you read the output, tested it and could explain it to a colleague, that is not vibe coding. It is software development that happened to use an AI.

That distinction is the whole point. Using an assistant to write a function you then read and edit is modern development. Vibe coding is the mode where you deliberately stop reading and trust the loop to converge, which is why it is powerful in some places and dangerous in others.

## The loop, concretely

1. **Prompt:** describe the outcome in plain language.
2. **Generate:** the assistant writes or edits the code.
3. **Run:** execute it and look at what happens.
4. **Describe the next change:** paste the error or say what is missing, and repeat.

A real session for a photo renamer looks like this:

> **You:** Write a Python script that renames every JPG in a folder to its EXIF capture date, like `2026-08-21_001.jpg`.
>
> **Assistant:** *(generates a script that reads EXIF data with a library)*
>
> **You:** It crashed on files with no EXIF data. Skip those and print a warning.
>
> **Assistant:** *(adds a try/except and a counter)*
>
> **You:** Good. Now handle PNG and HEIC too.

You never opened the library docs or checked the exception type. You described outcomes and the model closed the gap. For a script that sorts your own photos, that is a reasonable way to work.

## Where it genuinely shines

Vibe coding is at its best when a bug is cheap and the code has a short shelf life:

- **Prototypes and spikes:** testing whether an idea deserves real engineering.
- **Throwaway scripts:** one-off data cleanups and file renamers.
- **Demos and MVPs:** something to put in front of a stakeholder for a reaction.
- **Learning:** a working example of an unfamiliar API to poke at.
- **Hackathons:** the whole point is shipping something in 24 hours.

The common thread: nobody's data, money or safety is on the line, and you can delete the code without regret.

## How it fails, specifically

The failures are structural, not a matter of prompting harder:

- **Security holes:** SQL built by string concatenation, missing input validation, hardcoded credentials. They look fine and run fine. [Securing AI-generated code](/blog/securing-ai-generated-code) covers the patterns in depth.
- **Silent bugs:** the code returns something plausible and is quietly wrong, with no crash to tip you off.
- **Unmaintainable code:** duplicated logic and no mental model in your head, so the next feature costs more than a rewrite. We argue in [AI coding agents produce more code, not more software](/blog/ai-coding-agents-more-code-not-more-software) that this is the real bill.
- **Package hallucination:** a 2024 study of 576,000 generated code samples across 16 LLMs found hallucinated package names in at least 5.2% of outputs from commercial models and 21.7% from open-source ones, with 205,474 unique fake names. Anyone can register one of those names on PyPI or npm, so a made-up `import` becomes a supply-chain attack.

## A pre-merge gate for vibe-coded code

The moment vibe-coded work heads anywhere real, run checks that don't depend on you having read it. This script scans for committed secrets, runs Semgrep's project-tailored rules, confirms every dependency actually exists on PyPI, and runs the tests:

```
# scripts/vibe-check.sh
set -euo pipefail

gitleaks git -v .
semgrep scan --config auto --error .

grep -vE '^\s*(#|-|$)' requirements.txt | sed -E 's/[<>=!~ ;\[].*//' | while read -r pkg; do
  code=$(curl -s -o /dev/null -w '%{http_code}' "https://pypi.org/pypi/${pkg}/json")
  if [ "$code" != "200" ]; then echo "NOT ON PYPI: ${pkg}"; exit 1; fi
done

pytest -q
```

```
$ brew install gitleaks
$ pip install semgrep pytest
$ bash scripts/vibe-check.sh
```

Both scanners exit 1 when they find something (Semgrep only with `--error`), so the script stops at the first failure. PyPI's JSON endpoint returns 404 for a name that doesn't exist, which is exactly the signal for a hallucinated package. Existence is not safety, though: a squatter's package exists too, so read the project page of anything you didn't already know.

## The errors that give it away

| What you see | What it usually means | What to do |
|---|---|---|
| `ERROR: Could not find a version that satisfies the requirement <name> (from versions: none)` | The assistant invented a package, or got the name wrong | Find the real library; never `pip install` a guessed name |
| `npm error 404 Not Found - GET https://registry.npmjs.org/<name>` | Same problem on npm | Same fix; check the registry page before adding it |
| `NOT ON PYPI: <name>` from the script above | Dependency file lists a nonexistent package | Remove it and ask the assistant what it meant |
| A `leaks found` warning from gitleaks | A key or token is in the code or history | Rotate the secret first, then remove it from history |
| Semgrep findings such as SQL built from formatted strings | Injection-prone code that runs fine in a demo | Use parameterized queries; re-run with `--error` |

## Where this breaks

The gate catches known bad patterns, not wrong logic. Tests written by the same assistant that wrote the code tend to test what the code does rather than what it should do, so for anything with real users, someone still has to read the diff. Static scanners miss authorization bugs ("can user A read user B's invoice?"), which are among the most damaging flaws in quickly built apps. And agentic tools that run commands on your machine are a separate risk; run them in an isolated environment like the ones in [Docker cloud sandboxes for AI agent isolation](/blog/docker-cloud-sandboxes-ai-agent-isolation).

## Doing it responsibly

- **Review before merge.** This is the line between vibe coding and software development.
- **Write the tests yourself**, or at least read them. If you didn't write the logic, something you trust has to check it.
- **Keep pure vibe coding in the prototype lane.** That is using it correctly, not a limitation.
- **Graduate to [spec-driven development](/blog/spec-driven-development)** for anything you'll keep. A spec gives the assistant constraints and gives you something to check the output against.

## Questions people ask

### Who coined the term vibe coding?

Andrej Karpathy, the OpenAI co-founder and former Tesla AI lead, in a post on X in February 2025. He described a way of programming where you "fully give in to the vibes" and "forget that the code even exists," accepting the AI's changes without reading the diffs. The term spread fast through 2025 and became shorthand for prompt-driven building without review.

### What is the difference between vibe coding and AI-assisted coding?

Review. AI-assisted coding means the model drafts code that you read, test and understand before it ships, so you still own it. Vibe coding means accepting the output without reviewing it and judging only whether the app seems to work. The same tool can do both; what changes is whether a human understands the code that runs.

### Can you vibe code a production app?

You can build the first version that way, but you should not ship it unreviewed. Production code handles real users, data and money, so it needs someone who understands it, tests that check intended behavior, secret and dependency scanning, and an authorization review. Treat the vibe-coded version as a prototype, then rebuild or review it properly before launch.

## The call we'd make

Vibe coding is a real, useful mode, not a fad and not a fraud. It collapses the distance between an idea and a working thing, and for prototypes and throwaways that is a genuine superpower, so use it there without guilt. It is a starting mode, not a finishing one: the instant code stops being disposable, you read it, test it and own it. The engineers who get burned aren't the ones who vibe code; they're the ones who forget to stop. Pick a tool from our roundup of the [best AI coding assistants](/blog/best-ai-coding-assistants), run the gate above before every merge, and switch to a spec the moment the work gets real.

## Sources

- [Andrej Karpathy's original "vibe coding" post on X (February 2025)](https://x.com/karpathy/status/1886192184808149383)
- [Simon Willison: Not all AI-assisted programming is vibe coding](https://simonwillison.net/2025/Mar/19/vibe-coding/)
- [Spracklen et al.: We Have a Package for You! Package hallucinations by code-generating LLMs (arXiv)](https://arxiv.org/abs/2406.10279)
- [Semgrep CLI reference](https://docs.semgrep.dev/cli-reference)

