GuidesHow-to
How to Use Claude Code: A Practical Workflow (2026)
Install Claude Code, write CLAUDE.md, run a real ticket, and supervise the diff — plus pricing ($20 Pro, no free tier), Max, safety, and when not to use it.

Brand marks are the property of their respective owners
Claude Code is not autocomplete with a chat panel. It is an agent: it reads your repo, edits files, runs commands, fails tests, patches, and hands you a diff. If you treat it like GitHub Copilot line completion, you will underuse it and overspend. If you treat it like an unattended junior with production credentials, you will regret it.
This is a practical workflow — install, project memory, one real ticket, supervision, pricing shape, and when to walk away. Full product judgment lives in our Claude Code review. For the wider map, start with the complete AI coding guide and the coding hub ranking.
Pricing shape verified against Anthropic’s published plans as of 2026-08-05. Re-check claude.com/pricing the day you budget — multipliers and seat names move.
The short answer
- Pay first. There is no free Claude Code. Pro at $20/month (or ~$17 annual) is the floor; Max from ~$100/month is what daily heavy users often need.
- Put the repo under git on a feature branch with a clean working tree.
- Write
CLAUDE.mdbefore you judge the product — missing context is the usual “it is dumb” failure mode. - Describe one ticket the way you would for a colleague, with a way to check success (tests, reproduction, acceptance criteria).
- Read every diff before merge. Supervision is the real cost.
What Claude Code actually is
| Claude Code | Classic assistant (e.g. Copilot complete) | |
|---|---|---|
| Job | Finish a task | Finish a line / answer about open file |
| Scope | Whole repo + shell | Buffer and nearby context |
| Output | Multi-file edits, commands, commits | Suggestions you accept keystroke by keystroke |
| Failure mode | Confident wrong architecture or weakened tests | Annoying or wrong snippet |
| You | Reviewer of a PR-shaped change | Author of every keystroke |
Agents are the category where coding tools matured fastest. They are also the category where AI agents fail hardest when chains get long and unverifiable. Coding is still the best domain for agents because tests and compilers give a fast verdict.
Claude Code is Anthropic’s flagship in that agent column. OpenAI’s Codex product competes on the same job with a different packaging story — see OpenAI Codex vs Claude Code. Editor-native agent+Tab hybrids like Cursor sit beside it rather than fully replacing it.
Surfaces: terminal, IDE, desktop, browser
Same product, several doors:
- Terminal CLI — fullest control, pipes, scripting, CI. If you live in shell and git, start here.
- VS Code / JetBrains — agent in the editor you already use; settings and project memory still shared.
- Desktop / browser — useful when you want the agent without rearranging your whole setup on day one.
You do not need to master every surface. Pick one, run a real ticket, then add CLI automation if you care about CI later.
Install and auth follow Anthropic’s current docs (subscription login or API key). We will not paste a command that will be stale in six weeks — open the official Claude Code product page and use the install path for your OS. The workflow below is the same either way.
Pricing shape (the trap is usage, not $20)
| Route | List shape | What it means in practice |
|---|---|---|
| Free Claude | $0 chat | Does not include Claude Code |
| Pro | $20/mo (~$17 annual) | Realistic entry; Code included; shared usage with chat |
| Max | from ~$100/mo | Usage multipliers (e.g. 5× / 20× over Pro); daily agent users land here |
| Team seats | ~$25/seat/mo class | Code inclusion depends on seat type — check before buying the cheap seat |
| API | per token | Occasional / automated / CI without a personal seat |
Three traps we see constantly:
- “I already use free Claude.” Free chat ≠ Code. You will hit a wall at install/auth if you expect a free trial of the agent.
- Shared pool. A morning of agentic refactors is afternoon usage your writing does not get. Claude Code and Claude chat draw from the same budget on paid plans (rolling session windows plus weekly caps on paid tiers).
- $20 as “the price.” Steady individual use often fits Pro. All-day agents push Max. Comparing Claude Code to GitHub Copilot’s $10 unlimited-completions story without modelling agent burn is marketing, not budgeting.
If budget is the constraint, read best free AI coding tools — Claude Code is honestly not on that list. Cline and Devin Desktop are the free-path options; Replit covers browser environments. For the full Pro / Max / team / API decision frame, see Claude Code pricing.
CLAUDE.md: write this before your first real task
CLAUDE.md is project memory: conventions the agent should follow without you
retyping them. Put it at the repository root. Nested files work for monorepos
when different packages have different rules.
Minimum useful CLAUDE.md
# Project conventions
## Commands
- Install: npm ci
- Test: npm test
- Typecheck: npm run check
- Never run deploy or migrate without asking
## Style
- TypeScript strict; no any without a comment
- Prefer small pure functions over god services
- Tests live next to the module they cover
## Architecture
- HTTP handlers stay thin; business logic in src/lib
- Do not invent new top-level folders
## Do not
- Commit .env or secrets
- Weaken assertions to make tests pass
- Refactor unrelated files while fixing a bug
That is deliberately boring. Boring is the point. The file earns its keep when it stops the agent from:
- inventing a second test runner,
- “fixing” flaky tests by deleting them,
- reformatting half the monorepo because it preferred tabs.
Teams treat CLAUDE.md like onboarding docs for a new hire who reads very fast
and forgets nothing within the session. Update it when you correct the agent
twice for the same mistake.
Related pattern elsewhere: Codex-style tools use AGENTS.md; Cursor uses rules
and project docs. The idea is the same — write standards once. The coding
guide covers that habit in the “getting more out of whichever you pick” section
of the complete AI coding guide.
First real ticket (do not start with “build me an app”)
Pick work you have been avoiding: a flaky test, a dependency bump, a lint debt slice, a bug with a known reproduction. Avoid greenfield product vision and “rewrite the architecture.” Agents are best where success is checkable.
Workflow we actually use
- Branch.
git statusclean. Feature branch off main. No uncommitted experiments mixed in. - Context. Confirm
CLAUDE.mdexists. Mention the package or directory if the monorepo is large. - Ticket-shaped prompt. Bad: “Fix auth.” Good: “Users with expired sessions
get a 500 instead of a redirect to /login. Reproduce with the test in
auth.test.ts(or add one), fix the handler, leave unrelated files alone.” - Plan before flood. Let it propose a plan; reject wild scope. One concern per run beats a megadiff.
- Approve tools carefully. File edits and test commands: yes. Deploy,
production DB, or
git push --force: no. - Run the verification yourself. Even if it claims green, run the same command locally.
- Diff review. File by file. Search for deleted tests, loosened assertions, new dependencies, and “helpful” refactors outside the ticket.
- Commit as you. You own the commit message and the PR description.
If the first ticket is a mess, the fix is usually better specification or a
tighter CLAUDE.md — not a different model brand.
Prompt patterns that work
| Goal | Shape |
|---|---|
| Bug | Symptom → how to reproduce → where you suspect → what “done” looks like |
| Tests | “Add coverage for X; do not change production behaviour” |
| Refactor | “Extract Y without changing public API; keep tests green” |
| Chore | “Bump Z within current major; fix compile breaks only” |
Agents are only as good as the specification. That is the same skill as prompt engineering, applied to tickets instead of chat essays.
Supervision: non-negotiable
Claude Code writes to disk and runs shell. Permission prompts help; they do not replace judgment.
Minimum safe setup:
- Version control — if you cannot revert, you cannot safely experiment.
- Small blast radius — feature branch; never “just run it on main.”
- Secrets hygiene — no live keys in the tree the agent can read; use env loading the agent does not need to cat.
- Human merge gate — you read the diff; CI is necessary but not sufficient.
- Watch for test sabotage — the classic failure is making the suite pass by weakening it.
The cost nobody puts on the pricing page is review time. An agent that saves three hours and introduces one silent security bug is not a bargain. That is the same posture as the agents guide: short chains, checkable domains, human at the irreversible step.
If you need connectors into issue trackers, browsers, or internal APIs, understand Model Context Protocol first — what clients and servers are, and why tool access is a security boundary: What is MCP?.
When not to use Claude Code
Be honest with yourself:
- You only want Tab completion. Buy Copilot or use Cursor Tab. Claude Code is the wrong product shape.
- You will not review diffs. Then an agent is a liability amplifier.
- No git, no tests, no way to verify. You will get confident prose that looks like code.
- Procurement blocks third-party code processing. Settle that before you pay.
- You are learning to program. Agent speed outruns your ability to judge output. Use slower tools and free tiers while you build taste — see best free AI coding tools.
- You need a clickable product demo, not a repo agent. That is closer to Lovable or Replit, not Claude Code.
How it compares (pointers, not a full matrix)
| If you care about… | Look at |
|---|---|
| Strongest agent we have reviewed, accept paid floor | Claude Code — this page + review |
| Editor + Tab + agent in one app, free Hobby taste | Cursor — how to use Cursor |
| Unlimited completions, stay in current IDE | GitHub Copilot |
| Open extension, BYO keys, see token cost | Cline — Cline vs Claude Code |
| Already pay for ChatGPT | OpenAI Codex vs Claude Code |
| Claude Code vs editor hybrid | Claude Code vs Cursor |
| Copilot vs agent | GitHub Copilot vs Claude Code |
| Browser IDE / shareable env | Replit — Replit vs Cursor |
| Orchestrating multiple agents | Devin Desktop / Windsurf — Cursor vs Windsurf |
Plenty of developers run Copilot or Cursor Tab all day and open Claude Code for the hard multi-file ticket. That is a rational stack, not indecision.
A 30-minute onboarding plan
- Subscribe Pro (or set API billing with a hard spend cap).
- Install one surface only.
- Clone a throwaway or work branch of a real repo; confirm git is clean.
- Write a one-screen
CLAUDE.md. - Run one maintenance ticket end to end.
- Force yourself to reject at least one over-scoped plan.
- Merge only what you understand.
- Note remaining usage. If you are already in the red after one ticket, model Max or change how you work before standardising the team.
Do not evaluate Claude Code on a toy “todo app from scratch” prompt. That tests demo magic, not your job.
Habits that separate useful from chaotic
- One concern per session. Refactor or feature or docs — not all three.
- Prefer tests you already trust. Ask it to add tests before behaviour changes when coverage is thin.
- Reset context when the thread is muddy. Long confused sessions waste budget and produce worse diffs.
- Promote corrections into
CLAUDE.md. If you typed the same “don’t do X” twice, it belongs in the file. - Keep humans for architecture. Agents draft; you decide trade-offs you will live with for years.
Common failure modes (and the fix)
| What you see | Likely cause | Fix |
|---|---|---|
| Huge unrelated diff | Vague ticket + no “do not touch” list | Re-run with file allowlist and one concern |
| Tests green, prod broken | Weak or missing regression test | Write the failing test first; forbid assertion softening in CLAUDE.md |
| Budget gone by lunch | Shared pool + giant threads + retries | Fresh sessions, smaller tasks, consider Max only after measuring |
| “It ignored our style” | No CLAUDE.md or stale one | Encode the correction once in the file |
| Secret almost committed | Keys in tree or verbose debug logs | Remove secrets from the working copy before agent runs |
| Infinite fix loop | Flaky test or environment drift | Stabilise the suite offline; then re-engage the agent |
None of these mean Claude Code is useless. They mean the operator loop is part of the product. Teams that treat the tool as unsupervised CI learn that the hard way.
The short version
- Claude Code finishes tasks, not lines — buy and supervise accordingly.
- No free tier; Pro $20 is the floor; Max is common for daily agent use.
CLAUDE.md+ ticket-shaped prompts + tests beat clever one-off prompts.- Git + review are the product safety model; permission dialogs are not enough.
- Skip it when you need autocomplete, cannot review, or cannot send code to a vendor.
- Compare alternatives with our coding hub and the head-to-heads above rather than Twitter benchmarks.
Where to go next
- Claude Code review — full verdict, tiers, not-for list
- How to use Cursor AI — editor + agent workflow
- What is MCP? — tool connectors and risk
- Complete AI coding guide · Complete AI agents guide
- OpenAI Codex vs Claude Code · Claude Code vs Cursor · Best free AI coding tools · Best coding tools