A practical guide to Claude Code — the terminal agent that reads your files, runs your commands, and works through problems while you watch, redirect, or step away. Most of what follows is something you can try as you read, not just take my word for.
Claude's context holds the entire conversation — every message, every file it reads, every command's output. It fills fast, and model performance degrades as it fills. Most best practices[1] exist to protect it. Try it: feed the window, watch it forget, then reset.
Plenty of room. Claude follows instructions precisely and reasons clearly.
Naming a file is cheaper and sharper than pasting its contents — and pulling in the right screenshot, URL, or log often does more than a paragraph of explanation. These are the ways to load context deliberately. Tap any to expand.
@ and a path (with autocomplete) to pull a specific file — or a whole folder — into context. The precise way to add exactly what Claude needs and nothing more.$@src/auth/token.ts walk me through the refresh flow$read https://example.com/rfc-42 and list the open questions$cat error.log | claude -p "what is the root cause?"$claude --add-dir ../shared-lib # or /add-dir mid-session@ keeps the window lean so Claude stays sharp longer — which is the whole point of the context section above.Claude stops when work looks done. Without a check it can run, "looks done" is the only signal — and you become the verification loop. Hand it a pass/fail and it iterates on its own. Tap a card to turn a vague ask into a verifiable one.
"implement a function that validates email addresses"
write a validateEmail function. test cases: user@example.com → true, "invalid" → false, user@.com → false. run the tests after implementing.
"make the dashboard look better"
[paste screenshot] implement this design. take a screenshot of the result and compare to the original. list the differences and fix them.
"the build is failing"
the build fails with this error: [paste]. fix it and verify the build succeeds. address the root cause — don't suppress the error.
Letting Claude jump straight to code can solve the wrong problem. Separate research from execution. Click through the four phases.
Enter plan mode. Claude reads files and answers questions without making any changes.
Claude infers intent but can't read your mind. Reference files, name constraints, point to patterns. Flip the switch to see vague prompts sharpen.
Switch any time with /model, check the current one with /status or your status line, and dial reasoning depth with /effort. Pick a model to see what it's for.
Fast and capable for the bulk of implementation. The efficient default for writing and editing code once the plan is clear.
The recommended default. Balances speed and depth; higher levels can make the model overthink routine work.
Need one deep think without changing your setting? Drop "ultrathink" into a single prompt. Want planning on Opus and execution on Sonnet automatically? Use opusplan.
Output styles change how Claude responds. Beyond the default, there's a mode that explains its reasoning, and a Learning mode that hands you small, strategic pieces to write yourself via TODO(human) markers. Flip between them:
Set it in /config → Output style (saved to .claude/settings.local.json), or add "outputStyle": "Learning" to settings. Changes take effect after /clear or a new session.
A handful of configuration steps make Claude Code dramatically more effective — see the memory docs[9] for the CLAUDE.md details. Expand each to see how.
/init to generate a starter, then prune ruthlessly. Ask of every line: "would removing this cause a mistake?" Bloated files get ignored.npm run lint, and sandboxing gives OS-level isolation so Claude can roam within boundaries.gh and Claude opens PRs, reads issues, and posts comments natively. It also learns unknown tools — try "use foo-cli --help to learn it, then solve X."claude mcp add to wire in Notion, Figma, your database, or monitoring. Claude can then implement features straight from issue trackers, query data, and pull designs into the work.A skill is a SKILL.md file with a description and instructions. Its body loads only when used, so long reference material costs almost nothing until you need it. Claude invokes a skill automatically when it's relevant, or you can trigger it with /skill-name. Pair them with subagents[10] for heavier, isolated work.
# ~/.claude/skills/summarize-changes/SKILL.md --- description: Summarize uncommitted changes and flag anything risky. Use when the user asks what changed or wants a commit message. --- ## Current changes !`git diff HEAD` ## Instructions Summarize the diff in 2-3 bullets, then list risks (missing error handling, hardcoded values, stale tests).
Personal skills live in ~/.claude/skills/ (all projects); project skills in .claude/skills/ (this repo). List what's available with /skills.
Bundled, prompt-based skills ship with Claude Code — type / to see them:
SKILL.md is portable across Claude Code, Codex, Gemini CLI and 30+ other agents. Anything you write or download in this format travels with you.npx skills init once per project, then:$npx skills add <repo-url> --skill <name>$/plugin marketplace add anthropics/claude-plugins-officialThe best results come from tight feedback loops — correct early, manage context aggressively, and rewind freely. These are your steering controls.
Claude Code scales horizontally — parallel sessions, non-interactive runs, and fan-out patterns. A fresh context reviews better than the one that wrote the code, so split the writer from the reviewer.
# Fan out across files — loop one Claude per task for file in $(cat files.txt); do claude -p "Migrate $file from React to Vue. Return OK or FAIL." \ --allowedTools "Edit,Bash(git commit *)" done
Same agents, different cockpit. Two are worth singling out — running Claude Code straight from the desktop app, and orchestrating a whole fleet in Cmux. Tap any surface to expand.
$git worktree add ../feat-oauthcmux claude-teams runs Claude Code's agent-teams mode as native splits with full sidebar metadata — no manual tmux plumbing.$cmux claude-teamsEvery one of these traces back to a cluttered context window. Tap to reveal the fix.
Distilled from "How Anthropic teams use Claude Code"[2] — interviews with power users across engineering, data, security, marketing, design, and legal. These are the patterns that don't show up in feature docs.
Across every team, the move is the same: treat Claude Code as an autonomous-but-supervised collaborator. Give it a clean state and a way to verify, let it run, and when it drifts — restart from a sharper prompt rather than wrestle the wrong approach into shape.
/rewind and start fresh. Power users report that restarting from a better prompt usually beats wrestling a wrong approach into shape. — Data Science & MLShift+Tab) and let Claude loop on write → test → iterate. Core business logic → drive it synchronously with detailed prompts and real-time review. Building this intuition is the single highest-leverage skill. — Product DevelopmentCLAUDE.md. Your docs compound with use, and the next run starts sharper — a continuous-improvement loop. — Data InfrastructurePick a team to see their standout use case, a top tip, and the impact.
Diagnosed a downed Kubernetes cluster from dashboard screenshots, then ran the exact fix — no networking specialist required.
Write detailed CLAUDE.md files, and use MCP servers (not raw CLI) when data is sensitive.
In a session, type / to see every command, or /help for the basics. This is the shortlist you'll actually reach for — filter by keyword or category.
Full reference in the built-in commands docs[6] and the interactive-mode docs[7].
These patterns aren't set in stone — they're starting points. Sometimes you should let context accumulate. Sometimes skip the plan. Sometimes a vague prompt is exactly right. Pay attention to what works — and when you're ready for more, start from the overview[8].
Over time you'll develop an intuition no guide can capture.
Claude Code is Anthropic's terminal-based AI coding agent. It reads your files, runs your commands, and works through problems while you watch, redirect, or step away — all from the command line.
CLAUDE.md is a memory file Claude Code loads at the start of every session. Putting your project's conventions, commands, and constraints there means you set up context once and benefit from it in every conversation.
Give Claude a way to verify its own work — tests, scripts, or screenshots. Claude often produces plausible-looking code that quietly fails on edge cases, so if you can't verify a change, don't ship it.
A skill is a SKILL.md file with a description and instructions. Its body only loads when it's needed, so skills give Claude reusable, on-demand expertise without permanently filling the context window.
Match the model to the task. Reach for the most capable model on hard, ambiguous problems, and use a faster, lighter model for routine or well-scoped work to save time and context.
Yes. Beyond a single session you can run subagents and multiple Claude instances in parallel to divide a problem, explore alternatives, or work through independent tasks at once.