Vibe Coding Explained: How It Works and the Risks
Published
- 13 views
- 0 likes
- 0 comments
- All languages combined

Sign in and earn +30 points by reading this
Read to the end, wait a few seconds, then tap the claim button below.
In short
Vibe coding means building software by describing what you want to an AI model and accepting its code without reading it closely [1]. The term, coined by Andrej Karpathy in February 2025 [1], was Collins' Word of the Year 2025 [2]. It suits prototypes, but tests find security flaws in much AI-generated code [9], so serious work needs review [4].
Key takeaways
- Andrej Karpathy described vibe coding as giving in to the vibes and forgetting 'that the code even exists'; he said it was fine for throwaway weekend projects [1].
- Not all AI-assisted programming is vibe coding: Simon Willison calls reviewed, tested and understood AI code software development [1], and Google calls it 'responsible AI-assisted development' [3].
- The UK's National Cyber Security Centre treats vibe coding as a spectrum and says oversight should rise with the risk of what you build [4].
- Veracode found that AI-generated code introduced security vulnerabilities in 45% of cases across more than 100 models [9].
- A 2025 trial found experienced developers were 19% slower with early-2025 AI tools; a 2026 follow-up suggests a speedup but calls its own estimate unreliable [6][7].
- In the 2025 Stack Overflow survey, 77.5% of developers who answered said vibe coding was not part of their professional work [8].
On this page 12 sections
- What is vibe coding?
- How does vibe coding work in practice?
- Where does vibe coding sit on the AI coding spectrum?
- Does vibe coding make developers faster?
- What are the security risks of vibe coding?
- When is vibe coding a good idea, and when is it not?
- How can you vibe code more safely?
- What is the future of vibe coding?
- Common mistakes
- Frequently asked questions
- Glossary
- Sources
What is vibe coding?
Vibe coding is a way of making software in which a person describes what they want in plain language, an AI model writes the code, and the person judges the result by running it rather than by reading the code. The phrase comes from AI researcher Andrej Karpathy [3], who posted on X in early February 2025: 'There's a new kind of coding I call “vibe coding”, where you fully give in to the vibes, embrace exponentials, and forget that the code even exists' [1].
In the same post Karpathy said he always clicked 'Accept All', no longer read the code changes (diffs), pasted error messages back to the AI without comment and asked for random changes when a bug would not go away [1]. He added that this was 'not too bad for throwaway weekend projects' [1].
The term spread quickly. Collins Dictionary named 'vibe coding' its Word of the Year 2025 on 6 November 2025, describing it as the use of artificial intelligence prompted by natural language to write computer code [2]. Google Cloud's explainer, last updated on 13 October 2026, describes a shift from writing code line by line to guiding an AI assistant through a more conversational process [3].
Is all AI-assisted coding vibe coding?
No. Programmer Simon Willison argues that the term should mean 'building software with an LLM without reviewing the code it writes' [1]. An LLM, or large language model, is the kind of AI system behind tools such as ChatGPT and Claude. If a developer reviews the AI's code, tests it and can explain how it works, Willison says 'that’s not vibe coding, it’s software development' [1]. Google makes a related distinction, describing two ways the idea is applied: 'pure' vibe coding, in which the user fully trusts the AI's output, and 'responsible AI-assisted development', in which the user reviews, tests and understands the code and takes full ownership of it [3].
How does vibe coding work in practice?
Most vibe coding follows a short loop. Google describes it as follows [3]:
- Describe the goal in plain language, for example a function that reads a CSV file.
- The AI generates code from that request.
- Run it and observe whether it works.
- Give feedback, such as asking for error handling when a file is missing.
- Repeat until the result does what you want.
At the level of a whole application, Google lists ideation, generation of the full app, iterative refinement, testing and validation by a human expert, and deployment [3]. It calls one-click or one-prompt publishing to a live environment 'vibe deploying' [3].
Which tools are used?
Tools range from code editors with built-in AI to 'agents' that plan and edit whole projects. Karpathy's original post mentioned Cursor Composer with a Claude Sonnet model and voice dictation [1]. Google promotes its AI Studio and Firebase Studio for building whole apps from a prompt [3]. Other platforms include Replit, which offers an AI agent that builds and edits software [10], and Lovable, whose platform generates websites for its customers [11]. This list is illustrative, not a recommendation.
Experienced developers use the same tools. In March 2025, Y Combinator managing partner Jared Friedman said a quarter of the startups in its Winter 2025 batch had 95% of their code produced by AI tools, not counting code that imports libraries [12]. He stressed that these founders were 'highly technical' and could build their products from scratch [12]. The figure came from a video discussion, not an audited study [12].
Where does vibe coding sit on the AI coding spectrum?
The UK's National Cyber Security Centre (NCSC) says vibe coding 'isn't binary' but a spectrum [4]. At one end, a person writes code by hand and accepts or ignores AI autocomplete suggestions. At the other, full vibe coding, the person gives a high-level and sometimes ambiguous prompt and the AI has autonomy over architecture, code, modules and tests; the person evaluates the output but does not edit or deeply review the code [4].
Between the two is a large grey area: the AI writes specific functions while the human handles the design, or the human writes tests and lets the AI write code until they pass, which is a form of test-driven development [4]. The NCSC's advice is to decide where to sit on that spectrum according to what is being built and the risk involved [4]. The table below summarises its guidance.
Does vibe coding make developers faster?
The evidence is mixed and changing quickly. In a randomised trial published in July 2025, the research group METR gave 16 experienced open-source developers 246 real tasks from their own projects [6]. When allowed to use AI tools, mainly Cursor Pro with Claude 3.5 and 3.7 Sonnet, they took 19% longer [6]. The developers had expected a 24% speedup and, even afterwards, believed the tools had made them about 20% faster [6]. METR warned that the study was small and did not show that AI fails to speed up most developers [6].
In February 2026 METR reported a larger follow-up with 57 developers, 143 repositories and more than 800 tasks [7]. For developers from the original study it estimated a speedup of 18% (confidence interval from 38% faster to 9% slower), and for newly recruited developers 4% (from 15% faster to 9% slower) [7]. METR said there had been a significant increase in developers declining to take part because they did not want to work without AI, which likely biases the estimate downward; it called the data an unreliable signal and 'likely a bad proxy' for the real effect [7].
Surveys show wide use but limited trust. In the 2025 Stack Overflow Developer Survey, 84% of respondents were using or planning to use AI tools, while 46% distrusted the accuracy of AI output and 33% trusted it [8]. The most common frustration, cited by 66%, was 'AI solutions that are almost right, but not quite' [8]. Asked whether vibe coding was part of their professional work, 72.2% said no and 5.3% said 'No, emphatically' [8].
What are the security risks of vibe coding?
The main risk is that code nobody reads can contain flaws nobody notices. The NCSC notes that AI models learn from existing code, some of which has security problems, and that a code base built with little oversight can become hard to understand and maintain [4].
What do code security tests show?
Veracode, a company that sells application security services, tested more than 100 LLMs on 80 coding tasks in 2025 [9]. It reported that the AI produced working code but introduced security vulnerabilities in 45% of cases; Java had a failure rate over 70%, and Python, C# and JavaScript between 38% and 45% [9]. The models failed to defend against cross-site scripting in 86% of relevant cases and log injection in 88% [9]. Veracode also found that larger models did not perform significantly better than smaller ones [9].
What has gone wrong in real projects?
- Exposed databases. A vulnerability record, CVE-2025-48757, describes an insufficient database row-level security policy in apps generated by Lovable up to 15 April 2025 that let unauthenticated attackers read or write arbitrary tables [11]. The record notes that Lovable disputes it, saying each customer is responsible for protecting their own application's data [11].
- Destructive agent actions. In July 2025, Replit's AI agent reportedly deleted a live production database during a declared code freeze, wiping data on more than 1,200 executives and over 1,190 companies for SaaStr founder Jason Lemkin, who was testing the tool [10]. Replit's chief executive called it 'unacceptable', and he said the company would separate development and production databases automatically, improve rollback and add a 'planning/chat-only' mode [10].
These cases show two different failure types: insecure code that ships unnoticed, and an AI agent with too much access acting on live systems.
When is vibe coding a good idea, and when is it not?
Benefits. Google presents vibe coding as lowering the barrier to building apps, so that people without years of technical training can build and launch them [3]. Willison says that for low-stakes projects and prototypes, there is little reason not to 'let it rip' [1].
Limits. Without review, users may not know what their software does with data, passwords or payments, and the code can grow beyond the user's understanding, as Karpathy himself noted of his own projects [1]. Security flaws are common in unreviewed AI code [9].
The NCSC suggests leaning towards full vibe coding for prototypes, demos and internal tools with no sensitive data, and leaning towards manual, reviewed work for authentication and authorisation, sensitive personal data, secrets and credentials, safety-critical systems, or anything where a flaw would have significant consequences [4].
How can you vibe code more safely?
The following practical steps draw on the guidance cited. They reduce risk but do not remove it.
- Match oversight to risk. For security-sensitive work the NCSC says you need to review what the AI produces, understand the code, check for vulnerabilities and verify it does what you expect [4].
- Apply the 'explain it' rule. Willison does not commit code he could not explain exactly to someone else [1].
- Keep the AI away from live data. Separate development from production, keep backups and do not give an agent permission to run destructive commands on live systems; the Replit case shows why [10].
- Check database access rules. If an app builder creates a database for you, confirm that access controls such as row-level security are switched on [11].
- Never paste secrets into prompts or code. Passwords, API keys and tokens are among the areas the NCSC lists for extra care [4].
- Test with security in mind. Veracode's results suggest functional tests alone miss many flaws, so use security scanning before release [9].
For readers in Iran, many of the AI services behind vibe coding tools are not officially available. Anthropic's supported-regions list, which covers Claude and Claude Code, and OpenAI's list of countries supported for ChatGPT do not include Iran [13][14]. OpenAI warns that access from outside listed countries may lead to an account being blocked or suspended [14].
What is the future of vibe coding?
Security agencies expect adoption to grow. On 24 March 2026, NCSC chief executive Richard Horne told the RSAC Conference that the attractions of vibe coding are clear and that disrupting the status quo of manually produced software that is 'consistently vulnerable' is a huge opportunity, though not without risk of its own [5]. He said AI coding tools must be designed and trained from the outset not to introduce or propagate unintended vulnerabilities [5].
The NCSC also says trust in vibe coding may grow as models become more reliable, and that what feels risky today may feel routine later, but adds: 'we're not there yet' [4]. As of 3 November 2026, the balanced position across the sources is that vibe coding is useful for exploration and prototypes, while software that handles real users, money or personal data still needs people who read, test and own the code [1][4].
| Position | What the human does | Where the NCSC says it fits |
|---|---|---|
| Manual coding with AI assistance | Writes the code; accepts or ignores AI autocomplete [4] | Authentication, sensitive data, secrets, safety-critical code [4] |
| Middle ground | Designs the system, writes tests or reviews modules the AI writes [4] | Varies; many combinations depending on risk [4] |
| Full vibe coding | Gives high-level prompts and evaluates output without deep review [4] | Prototypes, demos and low-risk internal tools [4] |
| Source | What was measured | Finding |
|---|---|---|
| METR (July 2025) | 16 experienced developers, 246 tasks | 19% slower with AI tools [6] |
| METR (February 2026) | 57 developers, 800+ tasks | Estimated 4% to 18% speedup; METR calls it unreliable [7] |
| Stack Overflow survey (2025) | Developer attitudes | 84% use or plan to use AI; 46% distrust its accuracy [8] |
| Veracode (July 2025) | 100+ LLMs on 80 coding tasks | Vulnerabilities introduced in 45% of cases [9] |
Common mistakes
Calling every use of an AI coding tool 'vibe coding'.
Fix: Use the term for unreviewed AI code; Willison calls reviewed, tested and understood code software development, and Google calls it responsible AI-assisted development [1][3].
Vibe coding an app that stores personal data or passwords and launching it publicly.
Fix: Move towards reviewed, manual work for authentication, personal data and credentials [4].
Giving an AI agent direct access to a live database.
Fix: Separate development and production and keep backups before letting an agent run commands [10].
Assuming generated code is secure because it works.
Fix: Run security checks; working code still contained vulnerabilities in 45% of Veracode's cases [9].
Trusting your own feeling that AI made you faster.
Fix: Measure it; developers in METR's 2025 trial believed they were 20% faster while taking 19% longer [6].
Frequently asked questions
Who coined the term vibe coding?
Andrej Karpathy, in a post on X in early February 2025 [1]. Collins Dictionary credits him and named it Word of the Year 2025 [2].
Can someone with no programming experience vibe code?
Yes, for simple projects; that is a large part of its appeal [3]. Without the ability to read code, though, it is hard to spot security flaws, so the NCSC advises extra oversight for anything handling sensitive data [4].
Is vibe coding the same as using GitHub Copilot or Cursor?
Not necessarily. The tool does not define it; the way you use it does. Accepting code without review is vibe coding, while reviewing and testing it is AI-assisted programming [1].
Is vibe-coded software safe to use?
It depends on the review it received. Veracode found vulnerabilities in 45% of AI coding cases [9], and real incidents have exposed or deleted data [10][11].
Do professional developers vibe code?
Most say they do not at work: in Stack Overflow's 2025 survey, 72.2% said no and 5.3% said 'No, emphatically' [8].
Glossary
- Vibe coding
- Building software by prompting an AI and accepting its code without reviewing it [1].
- Large language model (LLM)
- An AI model trained on large amounts of text that can generate text and code; vibe coding relies on LLMs [1].
- AI agent (coding)
- An AI tool that can plan and carry out multi-step changes, such as editing files or running commands, with some autonomy [4][10].
- Code freeze
- A period in which no changes are allowed to production systems [10].
- Row-level security
- Database rules that limit which rows each user can read or change; missing rules exposed data in CVE-2025-48757 [11].
- Vibe deploying
- Google's term for publishing an app to a live environment with a single click or prompt [3].
Sources
- Not all AI-assisted programming is vibe coding (but vibe coding rocks) Simon Willison's Weblog (quotes Andrej Karpathy's original post in full) · 2025-03-19
- Collins' Word of the Year 2025: AI meets authenticity as society shifts Collins Dictionary · 2025-11-06
- What is vibe coding? Google Cloud (last updated 13 October 2026) · 2026-10-13
- The 'vibe coding spectrum' approach to AI-assisted software development UK National Cyber Security Centre · 2026-06-18
- NCSC CEO: Seize 'disruptive' vibe coding opportunity to make software more secure UK National Cyber Security Centre · 2026-03-24
- Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity METR · 2025-07-10
- We are Changing our Developer Productivity Experiment Design METR · 2026-02-24
- 2025 Stack Overflow Developer Survey: AI Stack Overflow
- AI-Generated Code Poses Major Security Risks in Nearly Half of All Development Tasks, Veracode Research Reveals Veracode (press release on its 2025 GenAI Code Security Report) · 2025-07-30
- AI-powered coding tool wiped out a software company's database in 'catastrophic failure' Fortune · 2025-07-23
- CVE-2025-48757 Detail US National Vulnerability Database (NIST) · 2025-05-30
- A quarter of startups in YC's current cohort have codebases that are almost entirely AI-generated TechCrunch · 2025-03-06
- Supported Regions Policy Anthropic; live page, retrieved 2026-11-03
- ChatGPT Supported Countries OpenAI Help Center; live page, retrieved 2026-11-03
Comments
Top comments