Quick Answer
Vibe coding with Claude Code is a choice, not a default: Claude Code is a coding agent, not a way of coding. Using it becomes vibe coding when you accept what it writes without reading it, which is how Andrej Karpathy described the term in February 2025. To vibe code with Claude Code without shipping a mess, plan before it edits, keep your rules in CLAUDE.md, choose a permission mode on purpose, let a hook run your tests when it stops, commit often, and run /security-review and a scanner before you deploy.
Is Claude Code Vibe Coding?
Karpathy coined the term in a post on X in February 2025. He described coding where you "fully give in to the vibes, embrace exponentials, and forget that the code even exists". In the same post he said he accepted every change without reading the diffs, and that this was fine for throwaway weekend projects.
So the answer depends on how you use the tool. If Claude Code writes code you never read, run or test, you are vibe coding. If you plan the change, read the diff and make the agent prove the code works, you are not. Same tool, very different risk.
The default matters here. Since version 2.1.283, Claude Code starts interactive sessions in auto mode, where a separate classifier model reviews most actions instead of you and blocks only what looks risky (permission modes). Its job is to stop actions such as a force push or a production deploy. To know whether your login route checks the right user, you still have to read the code or test it.
Install Claude Code and Start a Project
You need a Claude subscription (Pro, Max, Team or Enterprise), a Claude Console account, or access through a supported cloud provider, according to Anthropic's quickstart (checked on 24 October 2026). Install it from a terminal:
# macOS, Linux and WSL
curl -fsSL https://claude.ai/install.sh | bash
# Windows PowerShell
irm https://claude.ai/install.ps1 | iex
# Open a new terminal, confirm the install, then start it in your project
claude --version
cd your-project
claude
Claude Code asks you to log in the first time. On native Windows, Anthropic recommends installing Git for Windows so Claude Code can use its Bash tool.
In a new project, run /init first. Claude analyses your codebase and writes a starting CLAUDE.md with the build commands, test instructions and conventions it finds. If the file already exists, /init suggests improvements instead of overwriting it.
Plan Before It Writes Code
Plan mode is the most useful habit for a founder. In plan mode, Claude reads files, runs shell commands to explore and writes a plan, but it does not edit your source until you approve. There are three ways in: press Shift+Tab until the status bar shows plan mode, start one prompt with /plan, or launch with claude --permission-mode plan.
Press Ctrl+G to open the plan in your text editor and change it before Claude starts. When the plan is ready you can approve it and let Claude work, approve it but review each edit yourself, or keep planning.
/plan Add Stripe checkout. First read how we handle users and sessions.
List every file you will change.
Anthropic's best practices recommend four phases: explore, plan, implement, commit. They also say to skip the plan when you could describe the change in one sentence, such as fixing a typo. Plan anything that touches sign-in, payments or your database.
Give It Project Memory With CLAUDE.md
Every session starts with a fresh context window. CLAUDE.md carries your project knowledge across sessions: a markdown file Claude reads at the start of every session. Keep it at ./CLAUDE.md or ./.claude/CLAUDE.md and commit it, so the rules travel with the repository. Run /memory to edit it later.
Anthropic's memory guide asks for instructions concrete enough to verify, a target of under 200 lines per file, and a new line whenever Claude makes the same mistake twice. A short example:
# Commands
- Start: npm run dev
- Type check: npx tsc --noEmit
- Tests: npm test
# Rules
- Never write API keys in code. Read them from environment variables.
- Every API route checks that the signed-in user owns the record it returns.
- Ask before adding a new package.
- Run the type check and tests before you say a task is done.
Know its limit. The same guide says Claude treats these files as "context, not enforced configuration". A rule there raises the odds; it guarantees nothing.
Choose a Permission Mode on Purpose
Permission modes decide what Claude can do without asking. Press Shift+Tab to cycle them, or pass --permission-mode at start.
| Mode | Runs without asking | Anthropic's suggested use |
|---|---|---|
Manual (config value default) | Reads only | Reviewing every action, sensitive work |
acceptEdits | Reads, file edits and common file commands such as mkdir, mv and cp | Iterating on code you are reviewing |
plan | Reads, plus commands a classifier approves where auto mode is available | Exploring a codebase before changing it |
auto | Everything, with background safety checks by a classifier model | Long tasks, fewer prompts |
bypassPermissions | Everything | Isolated containers and VMs only |
Source: Claude Code permission modes, checked on 24 October 2026.
The one flag to avoid on your own machine is the one that turns all checks off. Anthropic says bypass mode offers no protection against prompt injection or unintended actions.
# BAD: every action runs without a prompt, on your own laptop
claude --dangerously-skip-permissions
# GOOD: start in plan mode, approve the plan, then review the diff
claude --permission-mode plan
Then add deny rules, which block in every mode. Auto mode's defaults allow reading .env and pushing to any branch of the repository you are working in, including the default branch. Two rules in .claude/settings.json keep your secrets out of Claude's file tools and keep shipping your decision:
{
"permissions": {
"deny": [
"Read(./.env)",
"Bash(git push *)"
]
}
}
Both are guard rails, not locks. Per the permissions docs, the Read rule does not stop a script that opens files itself, and git -C . push slips past the push rule.
Make It Check Its Own Work With Hooks
Hooks are shell commands Claude Code runs at fixed points in a session. Unlike CLAUDE.md, they run every time. For vibe coding, the most useful one is a Stop hook, which fires when Claude finishes responding. If your script exits with code 2, Claude does not stop: it receives your error message as the reason to keep working (hooks reference).
Add the hook to .claude/settings.json, which you can commit so every session gets the same gate:
{
"hooks": {
"Stop": [
{
"hooks": [
{ "type": "command", "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/check.sh" }
]
}
]
}
}
#!/bin/bash
# .claude/hooks/check.sh
INPUT=$(cat)
if [ "$(echo "$INPUT" | jq -r '.stop_hook_active')" = "true" ]; then
exit 0
fi
if ! OUT=$( (npx tsc --noEmit && npm test --silent) 2>&1 ); then
echo "Type check or tests failed. Fix them before you finish:" >&2
echo "$OUT" | tail -n 30 >&2
exit 2
fi
The first check is the loop guard from Anthropic's hooks guide. stop_hook_active is true when Claude is already continuing because of a Stop hook, so the script allows one fix attempt and then lets Claude stop. Install jq, run chmod +x .claude/hooks/check.sh, and check the result with /hooks. Our guide to making Claude Code check its own code adds a lint hook and the Cursor version.
One warning: project hooks run commands on your machine from a file anyone can commit. Malicious npm packages reported in June 2026 wrote their own entries into .claude/settings.json (see the Claude Code settings attack). Read that file in any repository you clone before you open it in Claude Code.
Commit Often, Then Check Before You Deploy
Claude Code handles git in plain English: ask it to commit your changes with a descriptive message. Commit after every step that works. You can /rewind Claude's own edits to a checkpoint, but Anthropic's checkpointing docs say checkpoints are not a replacement for version control, and a file changed only by Bash commands is not tracked.
Before you deploy, run these checks, all listed in the commands reference:
/diffshows what changed in your working tree, including Claude's edits. Read it./code-reviewchecks the current diff for correctness bugs./security-reviewanalyses the changes on your branch for risks such as injection, auth issues and data exposure. It compares your branch with origin's default branch, so it needs anoriginremote. Our breakdown of what Claude Code's security review catches covers what it skips, including outdated libraries.- Deterministic scans for what a diff review cannot see: secrets anywhere in your git history, and known vulnerabilities in your dependencies.
# Secrets anywhere in the git history
gitleaks git -v .
# Exit with an error on high or critical dependency vulnerabilities
npm audit --audit-level=high
Sources: Gitleaks and npm audit.
Tools like VibeDoctor's Vibe Check (vibedoctor.io) automatically scan your repository and your live site with 149+ checks, and flag leaked secrets, dependency CVEs, imports of packages that do not exist, missing security headers and SSL problems, with specific file paths and line numbers for code findings. Claude Code can also call it over MCP while it works, as our guides to the Claude Code connector and connecting your editor describe. Free to sign up.
FAQ
Which Claude model is best for vibe coding?
Anthropic's model configuration docs describe Sonnet for daily coding tasks, Opus for complex reasoning and Haiku for simple tasks. On Pro, Max, Team, Enterprise and the Anthropic API, Claude Code defaults to Opus 5.5 (checked on 24 October 2026).
Is Claude Code vibe coding?
Only if you use it that way. Karpathy's definition is accepting the AI's changes without reading the diffs. Claude Code can work like that, but plan mode, Manual mode, hooks and /security-review let you review and test what it writes before you ship.
Do I need to know how to code to use Claude Code?
Not to start. You describe changes in plain English, and Anthropic's quickstart links a terminal guide for first-time users. To ship safely, read the diffs or let checks such as a Stop hook test them for you.
Which permission mode should a beginner use?
Use plan mode to explore and plan, and Manual mode for sign-in, payments and database changes, so you approve each edit. Never use bypassPermissions or --dangerously-skip-permissions outside an isolated container or VM.
Does CLAUDE.md make Claude follow my rules?
It makes it more likely, not certain. Anthropic's docs say Claude treats CLAUDE.md as context, not enforced configuration. For anything that must happen every time, such as running the tests before Claude finishes, use a hook.
Does /security-review replace a security scan?
No. It reviews the diff between your branch and origin's default branch. It does not check your dependencies against a vulnerability database or look at secrets already in your git history, so pair it with Gitleaks, npm audit or a scanner.