Justin McKelvey

Justin McKelvey

Fractional CTO · 15 years, 50+ products shipped

AI Tools 7 min read

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.

  1. 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.
  2. 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.
  3. 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.
  4. Commit. Small commits are your undo button. When something goes sideways at step two of the next task, you want to be one git revert from 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.

And if the work you want to hand off is long, tedious, and something you'd rather not supervise at all, that's a different loop with a different tool — see how to use Codex.

One operational thing that catches people out: Claude Code doesn't have its own allowance. It draws on the same session budget as claude.ai and the desktop app, and sustained agentic sessions are the reason the weekly cap exists at all. If your limits keep evaporating on days you barely chatted, Claude's usage limits explains both meters.

Once the daily loop feels natural, the next lever is skills — the saved procedures Claude Code loads when a task calls for them, so you stop re-explaining how your project does things. The setup is a folder and one markdown file; I walked through it in how to use Claude Skills.

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 →

Free Resource Justin McKelvey

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

Vercel vs Netlify in 2026: Netlify Meters Usage, Vercel Meters People, and Only One Free Plan Allows a Business

Vercel charges $20 per developer and gives you generous usage. Netlify charges $20 flat for unlimited developers and gives you 3,000 credits to spend. Vercel's free plan bans commercial use; Netlify's free plan just runs out. Which one you want depends on whether your constraint is people or traffic — and on whether you're shipping Next.js.

7 min

Is Render Free? The 15-Minute Sleep, the 30-Day Database Clock, and the robots.txt Nobody Mentions (2026)

Yes — Render has a genuinely free tier with no time limit and no card. It is also engineered to be unusable for a business: services sleep after 15 idle minutes, the free Postgres deletes itself after 30 days, and while your site is asleep it serves Google a disallow-all robots.txt. What free covers, what it quietly costs, and when to pay the $7.

7 min

How to Vibe Code in 2026: The 7-Step Method I Hand Founders Before They Need a Rescue

Pick one tool, write one page before you prompt, build one feature at a time, and put a hard gate in front of payments and personal data. The seven steps I give founders, the three beginner mistakes that cause most of my rescue work, and the project ideas actually worth building first.

8 min

Is Vercel Free? What the Hobby Plan Covers, and the Clause That Ends It (2026)

Yes — Vercel's Hobby plan is free, generous, and permanent. The meter isn't bandwidth, it's a sentence in the fair-use policy: personal, non-commercial use only. The moment your app makes anyone money, you're on Pro at $20 a seat. What free covers, what pauses it, and when to leave.

5 min
Justin McKelvey, Fractional CTO and AI consultant in Austin, TX

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

If this was useful, here are two ways I can help: