Claude Code
Keep Anthropic's coding agent on track with plan mode, a short CLAUDE.md and a check that comes back pass or fail.
-
What Should Go in Your CLAUDE.md? Only what Claude Code can't work out by reading your repo: the exact commands that prove work is done, places where the code misleads, decisions that never made it into the code, and anything you've corrected twice. Level 3: Workflows
- 1Commands that prove the work is donetest, typecheck, lint
- 2Places where the code misleadsold patterns not to copy
- 3Decisions that aren't in the repodeploys, error helper
- 4Anything you've corrected twiceadd as it happens
-
How Do You Make Claude Code Check Its Own Work? Give it a command that comes back pass or fail, and put that command in your prompt or CLAUDE.md. Level 3: Workflows
- 1A line in your promptClaude decides
- 2/goal with a conditiona second model judges
- 3A Stop hook running your checkClaude Code enforces
- 4CI, and a person approving the mergeoutside the session
-
Should You Tell Claude Code to Explore Before It Edits? Usually not. Level 4: Multi-tool systemscost of a wrong guess →Read-only step firstplan mode or a subagentPlan modesee what it learned before editsLet it reada wrong guess is cheap to undoLet it readname the file and the symptomhow well you know this code →
-
How Do You Make Claude Code Plan Before It Edits? Use plan mode. Level 3: Workflows
- 1Enter plan mode
- 2Claude reads and writes a plan
- 3Edit it with Ctrl+G
- 4Pick an approval option
What changes when Claude can run things
Claude Code is Anthropic's coding agent. It reads your repository, edits files and runs commands, from a terminal, VS Code, JetBrains, the desktop app or the web. Anthropic's docs describe a loop of gathering context, taking action and verifying results, and they say a plain first prompt in a fresh session usually does the right thing with no setup. Two defaults catch people out. From v2.1.283, new terminal and VS Code sessions start in auto mode, where a classifier reviews risky actions instead of you, so press Shift+Tab if you want to approve each one. And an ANTHROPIC_API_KEY in your environment can move you from your plan to API billing, so check which one you're signed in with.
Match the problem to the fix
Anthropic's best-practices page sorts most bad sessions into four kinds, and each has its own fix. If Claude built the wrong thing or keeps rediscovering a fact, it's missing something the repo doesn't show, so put it in your prompt or CLAUDE.md. If it said it was done and wasn't, give it a check to run. If it did something that must never happen, use a hook or deny rule, because a written instruction can't guarantee it. If it got there but cost too much, change the model, effort or permission mode. The cards in this lesson cover the first two in depth, along with plan mode for reviewing the approach before any file changes.
What is Claude Code?
Claude Code is Anthropic's coding agent. It reads your repository, edits files and runs commands, and you can use it in a terminal, VS Code, JetBrains, the desktop app or a browser. You start it with the claude command inside a project.
Is Claude Code free?
No. The Free Claude plan doesn't include it. You need a paid plan, starting with Pro at $20 a month as checked on 4 November 2026, a Team or Enterprise seat, or API billing.
Does Claude Code ask before running commands?
Not by default on recent versions. From v2.1.283, interactive terminal and VS Code sessions start in auto mode, where a classifier reviews actions instead of you. Press Shift+Tab, or start with claude --permission-mode manual, to approve each action yourself.
What is plan mode in Claude Code?
Plan mode lets Claude read files, run commands to explore and write a plan while its edits stay blocked until you approve. Enter it with Shift+Tab, by starting a prompt with /plan, or with claude --permission-mode plan.
What is the difference between CLAUDE.md and a hook?
CLAUDE.md is context that the model reads and usually follows, but it can still decide a line doesn't apply. A hook is a command that Claude Code itself runs at a fixed point, so it happens every time. Use hooks for rules with no exceptions.