#AI#Vibe Coding

Vibe Coding in Practice: Shipping Efficiently with Claude Code

Vibe Coding is not "letting AI write whatever it wants"; it is a new paradigm for driving engineering through natural language. Learn the mental-model shift, Claude Code's spec → plan → iterate workflow, context management, and which tasks suit vibe coding or require human oversight, turning AI coding from a "toy" into real productivity.

Key Points

  • Topic Focus: AI、Vibe Coding
  • Suitable for: indie hackers, full-stack engineers, AI application developers
  • Core value: quickly understand background, practical paths, common pitfalls, and engineering advice
Author @admin·Published July 26, 2026·Updated July 26, 2026

Ever since Andrej Karpathy popularized the term "Vibe Coding," it has been the subject of constant debate. Supporters say, "I built an app in one afternoon," while critics say, "AI-generated code is a complete mess." Both are right. The difference comes down to one thing: Do you treat AI as a code-typing machine, or as a junior engineer who needs to be managed?

1. Shift Your Mental Model: Describe Intent, Not Instructions

Traditional coding means, "I write out exactly how to perform every step." Vibe Coding means, "I describe what I want and the constraints, then let AI propose an approach and implement it."

This may sound lazy, but it actually demands greater engineering maturity:

  • You must know exactly what you want. Vague requirements produce vague AI output.
  • You must be able to understand and validate AI-generated code. Committing it without reading it is like handing production to someone who never looks at the code.
  • You must know how to break down tasks. Split "build an online store" into small steps that can be validated independently; otherwise, AI will lose control inside one enormous context.

In other words, Vibe Coding shifts a programmer's work from "typing" to "reading, judging, decomposing, and validating." The former is automated, while the latter becomes even more valuable.

2. Claude Code's spec → plan → iterate Workflow

The biggest difference between Claude Code (and similar agentic tools) and Copilot-style completion is that it is a stateful Agent capable of multi-step operations. The key to using it well is a stable workflow:

1. Write the spec first. Before starting, put the requirements, constraints, and boundaries in a short SPEC.md, or explain them clearly in the conversation. Include what to implement, what not to implement, key constraints such as performance and compatibility, and acceptance criteria. The clearer the spec, the less freedom AI has to improvise.

2. Ask it to plan first. Do not immediately ask it to write code. Start by asking, "How do you plan to implement this, and what are the steps?" A solid plan lets you catch problems before it starts, which is far cheaper than discarding a finished implementation. This is exactly what Claude Code's plan mode is for.

3. Iterate in small steps. Work through the plan one step at a time. At each step, inspect the diff, run the tests, and confirm the result before moving on. Never ask it to "write the entire project in one shot." As the context grows, quality inevitably declines.

4. Use tools so it can validate its own work. Have it run tsc / lint / test itself and feed any errors back into its own correction loop. An Agent can read error messages and correct itself much faster than you can relay those errors.

3. Context Is the Critical Constraint in Vibe Coding

Agent quality ≈ the quality of the context you provide. Follow these principles:

  • Provide the right context, not more context. Clearly provide the relevant files, constraints, and examples. That is better than saying, "Here is the entire repository; take a look." Irrelevant code is noise that dilutes attention.
  • CLAUDE.md / AGENTS.md serve as project-level long-term memory. Put project conventions there, including the framework, directory structure, naming rules, and prohibited practices. They will load automatically in every session. The return on investment from this document is extremely high.
  • Clear the context promptly. After a long task has been running for a while, the early conversation becomes noise. Start a new session when necessary and carry over the key conclusions, or have the Agent summarize them.
  • Use tools to read instead of pasting. Have the Agent use grep/read to find what it needs. That is better than manually pasting hundreds of lines because it finds the right content without polluting the context.

4. What Tasks Suit Vibe Coding, and What Tasks Do Not

Suitable:

  • CRUD / scaffolding / boilerplate with clear inputs and outputs. This is pure grunt work, which AI does best.
  • Changes with test guardrails. AI makes the change, tests provide the safety net, and the feedback loop is clear.
  • Exploratory prototypes. They enable fast experimentation and will be discarded anyway.
  • Writing tests, documentation, and migration scripts. These are tasks that should be done but are easy to put off, making them ideal for AI.

Unsuitable, or requiring intensive oversight:

  • Core business logic / algorithms. One wrong line can affect the entire system, so a person must review it line by line.
  • Security-sensitive code (authentication, encryption, payments, SQL concatenation). AI occasionally introduces vulnerabilities, so it cannot be trusted blindly.
  • Performance-critical paths. AI tends to write a version that "works," not necessarily the "fastest" version.
  • Unfamiliar domains. If you cannot understand the code, you cannot validate it, which means losing control.

The criterion is simple: If this code goes wrong, can I spot the problem at a glance? If yes, vibe; if not, slow down.

5. Acceptance Checklist

Run every AI-generated change through this minimum checklist:

  1. Read the entire diff. Do not merge just because "it looks like it works."
  2. Run tests and type checks, ideally letting the Agent run and fix them itself.
  3. Edge cases: null values, concurrency, and error paths. These are what AI most often misses.
  4. Security: input validation, authorization, and injection.
  5. Do not let it casually "refactor" things you never asked it to touch. AI tends to over-edit, so enforce the scope strictly.

Summary

The real barrier to Vibe Coding is not "whether you know how to use AI," but whether you have engineering discipline. AI lowers the barrier to "writing code" almost to zero, making previously implicit abilities such as understanding code, decomposing problems, and validating rigorously the dividing line between high and low efficiency.

Treat AI like a junior engineer: give it a clear spec, ask it to plan first, iterate in small steps, and validate every diff. The more you act like a good tech lead, the more AI can perform like a capable core contributor.

Related

Related Content