Vibe Coding

Table of content

Vibe coding is programming by describing what you want, not how to build it. You talk to an AI agent, it writes the code. Your job shifts from typing syntax to directing intent.

The mental shift

Traditional coding:

# You think about HOW
def parse_config(path):
    with open(path) as f:
        data = json.load(f)
    return Config(**data)

Vibe coding:

"Parse the config file at this path and return a Config object"
TraditionalVibe
Write syntaxDescribe intent
Debug line by lineReview and iterate
Know the APIKnow what you want
Hours of implementationMinutes of conversation

The workflow

Research → Plan → Implement → Validate
   ↓         ↓        ↓          ↓
Understand  Design   Execute   Verify
the problem before   in small  it works
            coding   batches

1. Research first

Before writing code, understand the landscape:

You: "I want to add OAuth login. What are the options
     for Next.js apps? Don't implement yet."

Claude: [explains options, tradeoffs, recommendations]

Use Plan Mode (Shift+Tab twice in Claude Code) to prevent premature implementation.

2. Plan before implementing

You: "Create a plan for adding Google OAuth.
     List the files we'll touch and the order."

Claude: [outputs structured plan]

Review the plan. Adjust before any code is written.

3. Implement in batches

You: "Implement step 1 from the plan."

Claude: [writes code, explains key decisions]

You: "Good. Now step 2."

Small batches = easier review = fewer mistakes.

4. Validate constantly

You: "Run the tests. If they fail, fix them."

Claude: [runs tests, iterates until green]

Key principles

Context is everything

Claude only knows what’s in context. Manage it:

DoDon’t
Keep CLAUDE.md under 500 linesDump entire codebase
Reference specific filesSay “you know the code”
Stay under 60% context windowLet context overflow

Your CLAUDE.md is your API

# CLAUDE.md

## Project
Next.js 14 app with Prisma, TypeScript strict mode.

## Commands
- `pnpm dev` - Start dev server
- `pnpm test` - Run tests
- `pnpm db:push` - Push schema changes

## Patterns
- Use server components by default
- Zod for all validation
- No relative imports deeper than ../

This file persists across sessions. Keep it current.

Iterate, don’t perfect

First pass won’t be perfect. Plan for iteration:

You: "This works but the error handling is weak.
     Add proper error boundaries and logging."

Claude: [improves code]

You: "Now add tests for the error cases."

Common mistakes

MistakeFix
Implementing before understandingResearch → Plan → Implement
One massive promptBreak into steps
Accepting first outputReview, iterate, verify
Ignoring context limitsCheck context usage, start fresh when needed
No CLAUDE.mdWrite one. Update it.
Skipping validationAlways run tests before moving on

Tools

ToolStrength
Claude CodeBest for complex projects, full codebase access
CursorIDE integration, inline edits
WindsurfVisual, beginner-friendly

Start with Claude Code. It has the deepest integration with your filesystem and terminal.

When vibe coding fails

Not everything should be vibe coded:

For these, use AI as a research assistant, not an implementer.


Next: Claude Code Setup Guide

Topics: ai-coding workflow claude-code