Demystifying Vibe Coding

Introduction

A highly counterintuitive aspect of vibe coding is that the real challenge is rarely its feasibility or actual difficulty; rather, it is the imagined psychological barrier that you are incapable of handling the task.

  • Simply looking at an IDE like Visual Studio Code (VS Code) can make you want to take a U-turn.
  • However, this is merely a perceived barrier rather than a genuine hardship.
  • In fact, you will likely get the hang of it after just a few tries.

Visual Studio Code



The Explorer View

The first tab of the IDE displays the folder layout of your current project. What you see here is a typical Next.js structure.

  • You will notice hidden or auto-generated directories such as .next, node_modules, and out. These are generated automatically when you run npm install and npm run build, and they are typically excluded from being synced to GitHub repositories via the .gitignore file.
  • Clicking on any file in this view reveals the underlying code and logic.



Source Control

Source Control

This is arguably the most critical and time-saving stop when you do not fully understand the code and are "vibe coding" using agentic AI tools like Claude or Gemini.

Before you even begin coding, ensure you have a GitHub account and have created a repository. You can then use natural language commands (via your AI assistant) or the terminal to set the remote origin URL to your repository. Every change made by the AI agent will be reflected here:

  • Red lines indicate code that has been deleted.
  • Green lines indicate code that has been added.

Once you feel a new feature is well-written, you create a commit. Think of a commit as saving your progress at a specific checkpoint. If needed, you can easily revert back to this checkpoint by discarding staged or unstaged changes.

NOTE: AI agents sometimes misunderstand your intention. They might rewrite code in the wrong direction or introduce changes that completely fracture your app's functionality. Committing frequently prevents you from losing progress.

When you are ready to call it a day, you can sync your changes to your GitHub repository by clicking the Sync button or running the terminal command git push. If anything goes wrong with a newly deployed version, you can still revert the pushed and synced commits back to a stable state. This is your ultimate game-saver.



Terminal Commands

Once you are satisfied with the code, you need to test the app to verify if the AI's changes are correct. You typically run npm run dev (or npm.cmd run dev on certain Windows setups in VS Code) to spin up the local development server. Once the app is running, copy the local host URL (usually http://localhost:3000) into an incognito browser window to preview your changes.

When you are finished previewing, press Ctrl + C in the terminal to terminate the process, followed by Y if prompted.

The terminal is also where you execute essential Node/npm commands, such as:

  • npm install - Installs project dependencies.
  • npm outdated - Checks for outdated packages.
  • npm update - Updates packages to their latest safe versions.
  • npm audit - Scans the project for security vulnerabilities.
  • Professional Linting & Type-Checking: Running npx tsc --noEmit checks for TypeScript errors, while npx biome check --write lints and formats your code.



Natural Language Commands

In VS Code, you can install extensions to access AI features.

  • For instance, GitHub Copilot offers a free tier with a limited quota when you sign in with your GitHub account.

Another excellent tool is Antigravity.

  • In its newly released v2, it acts as a fully natural language chatting platform where you can spin up a new project or select an existing one and simply feed it ideas and commands.
  • You can choose from a variety of LLMs. A great starting point is a fast model like Gemini 3.5 Flash (Low) for quick tasks, or a heavy-duty reasoning model like Claude 4.6 Opus (with Thinking enabled) for complex logic and large-scale architecutral changes.

Antigravity Model

Best Practices for Prompting:

  • Step-by-Step Execution: Give your instructions sentence by sentence rather than asking for a massive, complex solution all at once. This allows you to commit your progress at different milestones instead of trying to fix a massive breakdown later without knowing which change broke the app.
  • Monitor Changes: Once the AI completes a task, immediately check the Source Control tab to see exactly which files were modified.

Unsurprisingly, the free quota runs out fast when you are making serious app improvements.

  • To monitor your remaining AI usage, you can navigate to the extension's Settings icon (typically found in the bottom left of the chat pane) and click Models.
  • Quotas usually refresh every 7 days, which can feel like a very long wait when you are in the middle of a project.
  • Keep in mind that Gemini quotas are often pooled and shared across the entire tier - regardless of whether you are using Gemini Pro or Gemini Flash - and are typically grouped by low, medium and high-resource usage limits.



The Dependency Trap

Every website, no matter how complex the underlying meta-framework, ultimately compiles down to three fundamental primitives: HTML, CSS, and JavaScript.

When vibe coding with AI agents, it is incredibly easy to fall into the "dependency trap". If you ask an agent to handle data management, security, or basic validation, its default instinct is often to spam your project with heavy, hyped third-party libraries.

  • It might automatically install zod for simple form validation, dompurify for basic text rendering, or a wrapper for IndexedDB for local data storage.
  • Furthermore, because Tailwind CSS is highly favored by AI, the agent might completely ignore standard styling methods - but that does not make utilizing a traditional global.css file a foul choice.

Before blindly accepting these automated code modifications, look at your actual requirements instead of being dazzled by big-name dependencies.



Summary

While the core philosophy of vibe coding is to use pure, natural language commands to build a functional app, it is incredibly difficult to keep an application functional and secure if you never look under the hood - especially as your app's architecture grows more complex.

Once you are ready to deploy your app to the world, you can connect your hosting provider - such as Vercel, Cloudflare Pages, or Firebase App Hosting - directly to your GitHub repository for continuous deployment.

  • If you encounter a build error, simply copy and paste the build log back into your AI chat for troubleshooting.
  • Keep in mind that different hosting platforms require distinct configurations. For example, Cloudflare Pages relies on a wrangler.toml file, while Firebase App Hosting utilizes a hosting.yaml configuration to manage environment settings, alongside a standard next.config.js file to handle security headers.

Comments