How to use Claude Code like you've used it for a year

hoangnnguyen1 pts0 comments

Claude Code Guide: How to use Claude Code like you’ve used it for a year – Codeaholicguy

Skip to content

codeaholicguy

AI, ai-devkit, Software Engineering

05/20/202605/20/2026

8 Minutes

Most Claude Code tutorials stop at "install it and start chatting". That gets you maybe 20% of what the tool does. The other 80% comes from understanding how context, modes, subagents, and hooks<br>fit together. It’s the stuff that’s technically in the docs but reads as marketing until you’ve burned a few thousand tokens learning it the hard way.

This is what I’d tell a teammate on day one if I had ten minutes. Patterns that change how fast you actually ship, and a few that will save you from yourself.

What Claude Code is, briefly

Claude Code is Anthropic‘s CLI agent. You run claude in a terminal, and it can read files, run shell commands, edit code, and call tools. There are extensions for VS Code and a desktop app. The CLI is where the interesting features live.

The mental model that matters: it’s a junior engineer who usually forgets things. Vague input gets vague output. Specific input (file paths, constraints, what you’ve ruled out, what "done" looks like) gets results you don’t have to redo.

Context and cache mechanics

This is probably the biggest lever on cost and latency, and almost nobody who hasn’t used the API understands it.

The prompt cache has a 5-minute TTL. When you send a message, Anthropic caches the prefix of your conversation. If your next message comes within 5 minutes, the cached prefix is essentially free. If you step away for a meeting and come back 20 minutes later, the entire conversation is re-read from scratch, uncached. Slower, more expensive.

Practical implication: if you’re about to step away, finish your turn at a clean boundary. Don’t leave a half-finished plan dangling. The next reply will replay the whole thing.

There’s an extended 1-hour cache too, but it’s opt-in. Default is 5 minutes.

/compact accepts instructions

Plain /compact summarizes your conversation and replaces the full history with the summary. It’s lossy, and the default summarization will often drop the wrong things. Better:

/compact preserve the auth refactor decisions and the failing test output, drop the file listings

You’re telling Claude what matters before it summarizes. Use it before context gets tight, not after.

/clear isn’t /compact

/clear wipes the conversation entirely. Use it when switching topics. Starting a new task with a clean slate keeps later prompts fast and prevents earlier wrong turns from biasing the answer. /compact summarizes. /clear resets.

Context drifts

If Claude went down a wrong path and you corrected it, that wrong path is still in the conversation, still affecting what it pattern-matches on. For non-trivial pivots, /clear and restart with what you learned. Hoping it "remembers the correction" gets unreliable past a certain point.

Resuming sessions

claude --resume lists your past sessions in the current project and lets you pick one up. Each session is stored as a .jsonl file under ~/.claude/projects/. Useful when coming back to a stalled task with full history intact.

Modes: plan, edit, accept-edits

Shift+Tab cycles between modes in an active session.

Plan mode is read-only. It can read files, grep, run safe shell commands, but it can’t write or edit. This is the mode you want for anything you don’t fully understand yet. It forces investigation before code gets touched. When the plan looks right, Shift+Tab back to edit mode and execute.

People underuse plan mode because muscle memory says "just ask and let it do it". That works for trivial changes. For anything load-bearing, ten minutes in plan mode saves an hour of unwinding bad edits.

Accept-edits mode auto-accepts file edits without prompting per change. Good for refactors where you’ll review the full diff at the end anyway. Pair it with frequent git diff checks. You get the speed of unattended editing without losing the ability to catch a bad change before it compounds.

Thinking budgets

Claude Code supports keyword-triggered extended thinking. The keywords escalate:

think is a small budget

think hard is larger

think harder is larger still

ultrathink is the maximum

Use these for architectural decisions, hard debugging, or anything where Claude gave you a confidently wrong answer on a subtle question. Don’t use them for simple tasks, such as "rename this variable". You’re paying for thinking tokens that don’t change the outcome. Some tasks fail without thinking. Most don’t need it. You learn the difference by trying a hard task without it and seeing where it breaks.

Subagents protect your main context

The Agent tool spawns a subagent that works in isolation. It has its own context window. When it finishes, you get a summary back, not the full transcript.

This matters because some operations bloat your main context badly. A large grep across the repo. Reading several files to find one piece of...

claude code context minutes gets plan

Related Articles