Justin McKelvey
Fractional CTO · 15 years, 50+ products shipped
How to Use Claude Code (2026): The Working Loop, Not the Install Guide
Quick Answer
To use Claude Code well: run it from your project root, describe the outcome rather than the code, make it write a plan before it edits anything, then review the diff like a junior developer's pull request. Repeat in small, committed increments. The CLI is free; you pay for the model behind it — $20/month on Claude Pro, $100–$200 on Max, or roughly $5–$300/month if you bill through the API by workload. The four-step loop and the three habits that actually change output quality are below.
TL;DR: Installing It Is Not the Skill
Every guide to Claude Code stops at the point where it starts mattering. Install, log in, type something, marvel. Fine — if you need that part, I wrote it separately as the Claude Code setup guide. This is the other half: what you do on day forty, when the novelty has worn off and you're deciding whether this thing is a multiplier or a very confident intern who occasionally rewrites your auth layer for fun.
The difference between those two outcomes is almost never the model. It's four habits, and they're all about what happens before it writes anything.
The Loop: Plan, Execute, Verify, Commit
This is the whole method. Everything else is decoration.
- Plan. Before it edits a single file, make it tell you what it intends to change and why. Read that plan properly. This is the single highest-leverage thirty seconds in the entire workflow, because a wrong plan executed perfectly is still wrong, and you'll find out forty files later.
- Execute one scoped change. Not "refactor the billing system." One thing, with a boundary you could describe out loud. Scope is the variable you control, and it's the one that predicts success.
- Verify it runs. Tests, the actual page, the actual command — something that fails loudly if the change is wrong. "It looks right" is not verification, and agentic tools are extremely good at producing code that looks right.
-
Commit. Small commits are your undo button. When something goes sideways at step two of the next task, you want to be one
git revertfrom safety, not archaeology.
Most people run this loop as one giant step and then wonder why the output needs an afternoon of cleanup.
Habit One: Describe Outcomes, Not Code
"Add a `status` column and update the three places that read it" is a worse prompt than "orders need to show whether they've been fulfilled, and the dashboard should be able to filter on it." The second version lets it find the three places — including the one you forgot.
This inverts the instinct most developers have, which is to specify precisely because precision has always meant control. Here, over-specifying the implementation hands it your blind spots and asks it to build around them.
Habit Two: Keep CLAUDE.md Short and Real
CLAUDE.md in your repo root is read automatically at the start of every session. It is the closest thing to a permanent fix for repeated mistakes: write the rule once, stop repeating yourself forever.
What earns a line in it:
- The commands that run your tests and your dev server, exactly as typed.
- Conventions you actually enforce in review — not aspirational ones.
- The traps. The thing that broke production once. The library that behaves differently than the docs say. This is the highest-value section and almost nobody writes it.
What ruins it: length. A 400-line CLAUDE.md buries the six rules that matter under ninety that don't, and the model has no way to know which is which. Mine gets pruned roughly as often as it gets appended to.
Habit Three: Spend Context Deliberately
Here's the failure mode nobody warns you about. Session quality degrades over time — not because the model gets worse, but because the context window fills with everything it has read and run. By hour two the useful signal is a thin layer on top of a pile of stale file dumps and command output.
Three habits fix it, and none of them are a setting:
- One session per task. Finish, commit, start fresh. Sessions are cheap; confused sessions are not.
- Don't let it read what it doesn't need. "Look at the whole codebase and tell me what's wrong" spends your entire budget on reconnaissance.
- Paste the excerpt, not the log. Forty lines of stack trace beats four thousand lines of output every time.
Treat context as a budget you are actively spending. That single reframe fixes more output-quality complaints than any prompt-engineering trick.
Habit Four: Review It Like a Junior's PR
Not like a search result you skim. Like code a competent, fast, slightly overconfident junior wrote at 2am — because functionally, that's what it is. Read the diff. Ask why for anything you don't recognise. Be specifically suspicious of the parts you'd have found tedious to write yourself, because that is exactly where you're inclined not to look.
This is also the honest answer to the question underneath most AI-coding anxiety: the risk isn't that it writes bad code, it's that it writes plausible code into a codebase nobody is reading closely anymore. If that already describes your situation — a working app whose internals nobody can vouch for — start with the vibe coding security checklist, which is a twenty-point self-audit rather than a sales page. And if you can already tell the answer is bad, that's what telling whether code is AI-generated is for.
Automatic Mode: When to Let It Off the Leash
The speed everyone talks about comes from letting it run commands and edit files without approving each step. That's real, and it's worth having. The rule I use is simple: automatic mode is safe in exact proportion to how easily you can undo the result.
So: branch first, clean tree, tests that fail loudly — then let it work. Never on main, never against production data, never where "undo" means "restore from backup." The permission model is not the safety net. Git is.
What It Costs to Run Daily
The CLI is free. What you pay for is the model behind it: usage billed through the API runs roughly $5–$300 per month depending on workload, or it comes included with Claude Pro at $20/month and Max at $100–$200/month. For daily use on one codebase, a subscription is almost always cheaper and, more importantly, predictable — API billing has a way of surprising people in the second week. The full breakdown, including the auto-reload trap, is in Claude Code pricing.
Whether it's worth that at all is a separate question with a separate answer: is Claude Code worth it.
Where Claude Code Stops Being the Right Tool
Being honest about the ceiling is what makes the rest of this credible.
It is excellent at work with a clear boundary and a fast feedback loop — a feature, a refactor, a test suite, a migration you can run and roll back. It is weak where the feedback loop is slow or absent: architecture decisions whose cost shows up in six months, anything requiring taste about your specific users, and any change where "did it work?" can't be answered in under a minute.
If you want to stay in one file and steer line by line, an editor-native tool fits better — that's the real difference in Claude Code vs Cursor, and the wider field is in Claude Code alternatives. Picking the right model for the job is its own decision: which Claude model to use.
The Micro-Action
Before you close this tab: open your project, create a CLAUDE.md if you don't have one, and write only the traps section — the three things that have burned you in this codebase. Not conventions, not aspirations. Traps. Then start your next session and watch it avoid one of them unprompted. That moment is when the tool stops being a demo and starts being infrastructure.
Next step Get the free repo audit →
What your AI stack actually costs
Prices changed 3x this year. The always-current cost sheet: sticker price vs what heavy use actually costs for Cursor, Claude, Replit, Lovable, Bolt & more.
Frequently Asked Questions
- How do you use Claude Code?
- Open it in the root of your project, describe the outcome you want rather than the code you want, make it produce a plan before it touches a file, then review the diff the way you'd review a junior developer's pull request. The loop is: plan, execute one scoped change, verify it actually runs, commit. People who skip the plan step and the verify step get the worst results and blame the tool.
- What is CLAUDE.md and do I need one?
- CLAUDE.md is a file in your repository that Claude Code reads automatically at the start of every session — your project's standing instructions. You need one, and it should be short. Commands to run tests, the conventions you actually enforce, and the handful of traps that have burned you before. A 400-line CLAUDE.md is worse than a 40-line one, because the rules that matter get buried among the rules that don't.
- How much does Claude Code cost?
- The CLI itself is free. You pay for the model behind it: usage billed through the API runs roughly $5-$300 per month depending on workload, or it's included with a Claude Pro subscription at $20/month and Max at $100-$200/month. For most people using it daily on one codebase, a subscription tier is cheaper and far more predictable than API billing.
- Why does Claude Code give worse answers as the session goes on?
- Because the context window fills up. Every file it reads, every command it runs, and every long output stays in the conversation, and the useful signal gets diluted. The fix is habit, not settings: start a fresh session per task, don't ask it to read files it doesn't need, and paste the relevant excerpt rather than the whole log. Treat context like a budget you're spending, because that is exactly what it is.
- Should I let Claude Code run commands and edit files automatically?
- For reversible work in a git repository with a clean tree, yes — that's where the speed comes from. For anything that touches production, deletes data, or pushes to a remote, no. The practical rule is that automatic mode is safe in proportion to how easily you can undo the result, so branch first and let it work, rather than granting broad permissions on your main line.
- Is Claude Code better than Cursor?
- They're different shapes rather than different quality tiers. Claude Code is a terminal agent that works well when you want it to plan, run commands, and change several files at once. Cursor is an editor and it wins when you want to stay in the file you're looking at and steer line by line. Plenty of people run both and switch based on the task rather than picking a side.
More on Vibe Code Rescue
How to Tell If Code Is AI-Generated: A CTO's Field Guide (2026)
There is no reliable detector for AI-generated code — the tools that claim otherwise are guessing. But after auditing dozens of AI-built codebases, I can usually call it in ten minutes, because AI code has tells: over-commented obviousness, hallucinated APIs, five different naming conventions, and tests that assert nothing. Here are the nine tells, and what to do if your codebase has them.
OpenClaw Review (2026): What the Most-Starred Repo on GitHub Actually Does
OpenClaw is a free, open-source AI agent you text like a colleague — and it can genuinely run files, messages, browsers, and code on your machine. My honest review: what it does well, where it bites, what it costs to run, and who should (and shouldn't) install it in 2026.
Is OpenClaw Safe? What I'd Check Before Giving an AI Agent the Keys (2026)
OpenClaw is the most-starred repo on GitHub and it runs with real authority over your files, messages, and credentials. Safe? Out of the box, no — four CVEs, a browser-based hijack technique, and a skill marketplace that has shipped malware say otherwise. Here's the honest risk read and the checklist I'd run before letting it near a business machine.
Is Codex Free? What Actually Costs Money (2026)
The Codex CLI is genuinely free — open source, no license, no trial clock. The compute behind it is not. Here's what free actually covers, when a $20 ChatGPT Plus subscription is all you need, and the workloads that push you toward the $200 tier or a metered API bill.
Written by
Justin McKelvey
Fractional CTO & AI consultant in Austin, TX. 15 years building software, 50+ products shipped, $53M+ in client revenue generated. I help $1M–$50M founders ship production software and automate operations with AI — without hiring a full-time executive team.
Work with me