Vibe Coding
Common Vibe Coding Mistakes
Blind accepts, giant prompts, missing plans, leaked secrets, and shipping code you cannot explain.
The usual failure modes
| Mistake | What happens | Fix |
|---|---|---|
| Accept all | Hidden bugs, extra files | Read the diff; revert extras |
| One giant prompt | Half-finished everything | One goal, then the next |
| No plan | Wrong architecture | Plan-only prompt first |
| No tests | Looks right, is wrong | Write tests, then implement |
| Paste secrets | Keys in chat history | Fake values; gitignore .env |
| Thrash rewrite | Working code deleted | Debug the failing test |
| Skip reading code | You cannot maintain it | Explain-or-reject rule |
| Chat-only copy-paste | No diff, duplicate files, leaked secrets | Use an editor or CLI agent on the folder |
| Hop tools mid-slice | Two half-edits, no restore point | Finish or revert, then switch if you must |
Vague product, confident model
If you say "build a dashboard," the model will invent charts, users, and a database. That is not mind-reading. That is filling a vacuum. Specify the three screens or the three commands.
Context dumping
Attaching the entire monorepo "just in case" makes the model miss the file that matters. Attach the two files for the slice. Mention a third by name if needed.
Using vibe coding for the wrong job
- Do not ask it to generate attacks, malware, or credential stuffing. Refuse that work.
- Do not outsource production auth "because the prompt was long." Read every security change.
- Do not use it as a substitute for learning the language if you cannot read the output.
- Do not paste a chatbot dump into the repo because the agent editor felt slower. Use a tool that can apply a diff. See Tools.
How you recover during a session
When you notice a mistake, stop prompting. More chat on a dirty tree makes a worse tree.
1. git restore the files that went wrong (or reset to last good commit)
2. Write one failing test for the behavior you still want
3. Prompt: smallest fix only, do not touch other files
4. Review, pytest, commitTry it yourself
Match the mistake to the fix: you attached 40 files; the model missed notes.py and wrote a second storage module.
Show solution
Context dumping. Restore the extra module. Attach only notes.py and test_notes.py. Say “reuse the existing JSON helpers. Do not create a new format.”
Key takeaways
- Most failures are process, not “the model is dumb.”
- Tight scope and tests prevent the expensive mistakes.
- Revert is a skill. Use it early.
- Stop the session, restore, then send a smaller prompt.