PromptHive
Menu

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.

Claude Code logos

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

  1. 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.
  2. Put the repo under git on a feature branch with a clean working tree.
  3. Write CLAUDE.md before you judge the product — missing context is the usual “it is dumb” failure mode.
  4. Describe one ticket the way you would for a colleague, with a way to check success (tests, reproduction, acceptance criteria).
  5. Read every diff before merge. Supervision is the real cost.

What Claude Code actually is

Claude CodeClassic assistant (e.g. Copilot complete)
JobFinish a taskFinish a line / answer about open file
ScopeWhole repo + shellBuffer and nearby context
OutputMulti-file edits, commands, commitsSuggestions you accept keystroke by keystroke
Failure modeConfident wrong architecture or weakened testsAnnoying or wrong snippet
YouReviewer of a PR-shaped changeAuthor 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)

RouteList shapeWhat it means in practice
Free Claude$0 chatDoes not include Claude Code
Pro$20/mo (~$17 annual)Realistic entry; Code included; shared usage with chat
Maxfrom ~$100/moUsage multipliers (e.g. 5× / 20× over Pro); daily agent users land here
Team seats~$25/seat/mo classCode inclusion depends on seat type — check before buying the cheap seat
APIper tokenOccasional / automated / CI without a personal seat

Three traps we see constantly:

  1. “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.
  2. 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).
  3. $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

  1. Branch. git status clean. Feature branch off main. No uncommitted experiments mixed in.
  2. Context. Confirm CLAUDE.md exists. Mention the package or directory if the monorepo is large.
  3. 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.”
  4. Plan before flood. Let it propose a plan; reject wild scope. One concern per run beats a megadiff.
  5. Approve tools carefully. File edits and test commands: yes. Deploy, production DB, or git push --force: no.
  6. Run the verification yourself. Even if it claims green, run the same command locally.
  7. Diff review. File by file. Search for deleted tests, loosened assertions, new dependencies, and “helpful” refactors outside the ticket.
  8. 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

GoalShape
BugSymptom → 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:

  1. Version control — if you cannot revert, you cannot safely experiment.
  2. Small blast radius — feature branch; never “just run it on main.”
  3. Secrets hygiene — no live keys in the tree the agent can read; use env loading the agent does not need to cat.
  4. Human merge gate — you read the diff; CI is necessary but not sufficient.
  5. 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 floorClaude Code — this page + review
Editor + Tab + agent in one app, free Hobby tasteCursorhow to use Cursor
Unlimited completions, stay in current IDEGitHub Copilot
Open extension, BYO keys, see token costClineCline vs Claude Code
Already pay for ChatGPTOpenAI Codex vs Claude Code
Claude Code vs editor hybridClaude Code vs Cursor
Copilot vs agentGitHub Copilot vs Claude Code
Browser IDE / shareable envReplitReplit vs Cursor
Orchestrating multiple agentsDevin Desktop / WindsurfCursor 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

  1. Subscribe Pro (or set API billing with a hard spend cap).
  2. Install one surface only.
  3. Clone a throwaway or work branch of a real repo; confirm git is clean.
  4. Write a one-screen CLAUDE.md.
  5. Run one maintenance ticket end to end.
  6. Force yourself to reject at least one over-scoped plan.
  7. Merge only what you understand.
  8. 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 seeLikely causeFix
Huge unrelated diffVague ticket + no “do not touch” listRe-run with file allowlist and one concern
Tests green, prod brokenWeak or missing regression testWrite the failing test first; forbid assertion softening in CLAUDE.md
Budget gone by lunchShared pool + giant threads + retriesFresh sessions, smaller tasks, consider Max only after measuring
“It ignored our style”No CLAUDE.md or stale oneEncode the correction once in the file
Secret almost committedKeys in tree or verbose debug logsRemove secrets from the working copy before agent runs
Infinite fix loopFlaky test or environment driftStabilise 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

  1. Claude Code finishes tasks, not lines — buy and supervise accordingly.
  2. No free tier; Pro $20 is the floor; Max is common for daily agent use.
  3. CLAUDE.md + ticket-shaped prompts + tests beat clever one-off prompts.
  4. Git + review are the product safety model; permission dialogs are not enough.
  5. Skip it when you need autocomplete, cannot review, or cannot send code to a vendor.
  6. Compare alternatives with our coding hub and the head-to-heads above rather than Twitter benchmarks.

Where to go next

Frequently asked questions

Is Claude Code free?
No. Anthropic’s free Claude plan covers chat only and explicitly excludes Claude Code. The realistic entry point is Claude Pro at $20/month ($17/month billed annually), or an Anthropic API account billed per token.
Do I have to use the terminal?
No. Claude Code runs in the terminal, VS Code, JetBrains IDEs, a desktop app and the browser on the same engine and settings. The terminal is the fullest surface for scripting and CI, but it is not required for day-one work.
What is CLAUDE.md?
A markdown file at the project root (and optionally in nested folders) that every session reads first. Put test commands, style rules, architecture decisions and the mistakes a new contributor would make. One file replaces re-explaining the repo in every prompt.
How much does heavy use actually cost?
Pro covers steady individual use, but agentic sessions burn the shared usage pool far faster than chat. Developers who run it most of the day commonly move to Max (from about $100/month, sold as usage multipliers over Pro). Budget for Pro and reassess after two heavy weeks.
Is it safe to let Claude Code run commands?
It asks before risky actions, but the real safeguards are yours: a git repo with a clean working tree, a feature branch, no secrets in the tree, and a human reading every multi-file diff before merge. Treat it as a fast colleague, not an autopilot.
Claude Code vs Cursor — which should I learn first?
Learn Claude Code if you want the strongest agent-first workflow and accept a paid floor with no free Code tier. Learn Cursor if you want editor Tab completion plus an agent in one VS Code-like app, with a free Hobby taste. Many teams use both. See Claude Code vs Cursor for the head-to-head.
When should I not use Claude Code?
Skip it for pure autocomplete, for codebases you cannot put under version control, for regulated environments that forbid third-party code processing, and for beginners who need to learn to evaluate code before generating it at agent speed.