Claude Code Complete Guide: Setup, CLAUDE.md, and Daily Use
Everything you need to know about Claude Code: installation, CLAUDE.md setup, slash commands, voice mode, and best practices from daily production use
Claude Code Complete Guide: Setup, CLAUDE.md, and Daily Use
Claude Code is an agentic coding assistant that runs in your terminal. It reads your codebase, edits files, and executes commands. This guide covers installation, CLAUDE.md setup, slash commands, voice mode, context management, and the best practices that matter for daily production use.
Quick Summary
Claude Code isn't autocomplete. It's a terminal agent that reads your project, writes code across files, and ships changes. Set it up with a lean CLAUDE.md, learn /compact vs /clear, and give it verification criteria. Voice mode just launched in March 2026.
Table of Contents
- What is Claude Code? Agentic coding vs autocomplete
- How to install Claude Code: macOS, Linux, and Windows
- CLAUDE.md setup: the file that defines every session
- Claude Code slash commands: built-in, bundled skills, and custom
- Claude Code voice mode: how to enable it and what it does
- Context management: /compact vs /clear and when each one is right
- Claude Code best practices: what daily production use teaches you
- Claude Code: what to do next
- Key Terms
- FAQ
What is Claude Code? Agentic coding vs autocomplete
Claude Code is Anthropic's agentic coding assistant. It doesn't autocomplete the line you're typing. It reads your entire codebase, writes code across multiple files, runs commands, and ships changes autonomously.
That distinction changes how you work with it.
Most coding tools sit between you and the editor. Claude Code sits between you and the whole project. You describe what you want. It figures out what to touch.
It's available in the terminal, VS Code, other IDEs, a desktop app, and a browser. The terminal is the native environment. That's where it's fastest and most capable.
Claude Code launched in February 2025 and reached general availability in May 2025. By November 2025, it had reportedly hit $1B in annualized revenue. It's not a prototype.
Claude Code vs Cursor vs Copilot
There's a real category difference here, not just a feature gap.
GitHub Copilot completes code you're already writing. It's reactive and line-by-line. Cursor is an IDE fork that adds AI to an editing experience. Claude Code is an agent. It reasons about your project and takes action.
One developer at Builder.io abandoned Cursor after being a power user and switched entirely to Claude Code. The workflow shift is that significant.
A full three-way comparison is outside the scope of this guide. The short version: Copilot is mature for autocomplete. Cursor is polished for an AI-native IDE. Claude Code is the tool if you want an agent that does the work.
How to install Claude Code: macOS, Linux, and Windows
On macOS or Linux, one command handles installation. On Windows, use PowerShell or WSL. The VS Code extension adds inline diffs and conversation history.
macOS and Linux
curl -fsSL https://claude.ai/install.sh | bashNative install auto-updates in the background. If you install via Homebrew instead, you're responsible for running updates yourself. Anthropic recommends the native install for this reason.
Windows
Two options. PowerShell:
irm https://claude.ai/install.ps1 | iexOr WSL with the Linux command above. Windows also requires Git for Windows for some operations.
WinGet is available but doesn't auto-update. Same trade-off as Homebrew.
VS Code extension
The VS Code extension gives you inline diffs, @-mentions for files and symbols, and plan review before execution. It keeps conversation history in a panel. Install it from the VS Code marketplace by searching "Claude Code."
First run: logging in and running claude
After installing, open a terminal, navigate to your project directory, and run:
claudeYou'll be prompted to authenticate with your Anthropic account. Claude Code requires a Claude subscription. Once authenticated, you're in an interactive session. Claude can now read your files, run commands, and get to work.
CLAUDE.md setup: the file that defines every session
CLAUDE.md is the only file that goes into every Claude Code conversation automatically. Claude is stateless. Every session starts from zero. CLAUDE.md is how you give it a standing briefing on your project and your stack.
Most users skip it entirely. Others cram too much in and wonder why Claude ignores half of it.
Both problems are common. Both are fixable.
The WHAT/WHY/HOW framework
HumanLayer's investigation into CLAUDE.md (they used an API proxy to inspect Claude's actual system prompt) gives a useful three-part framework:
- WHAT: The stack and structure. What language, what framework, what's the folder layout, what are the entry points.
- WHY: The purpose of the project. Not a marketing description. A one-paragraph orientation so Claude understands the domain.
- HOW: How to work on the project. Where to run tests, how to build, what linter runs on save, any workflow conventions.
That's it. Three sections, each one practical.
Claude receives CLAUDE.md with a system reminder that says it may ignore content it judges as irrelevant. This isn't Claude being disobedient. It's context triage. The longer and more cluttered your CLAUDE.md, the more it trims.
What to leave out of CLAUDE.md
Leave out anything task-specific. If an instruction only applies to one type of work, it doesn't belong in CLAUDE.md. It'll get ignored when it's not relevant, and it bloats the file.
Leave out anything you can pass in the session prompt. Overfilling CLAUDE.md reduces Claude's attention to the file overall. A lean file that Claude always reads beats a fat one it skims.
Leave out things that change often. CLAUDE.md is a standing brief, not a changelog.
Example CLAUDE.md structure
# Project: [Name]
## What this is
[One paragraph describing what the project does and for whom]
## Stack
- Language: TypeScript (Node 20)
- Framework: Next.js 14 (App Router)
- Database: PostgreSQL via Drizzle ORM
- Testing: Vitest + Testing Library
## Structure
- /app: Next.js routes and page components
- /lib: shared utilities and server actions
- /components: UI components
- /db: Drizzle schema and migrations
## How to work on this project
- Run tests: `npm test`
- Dev server: `npm run dev`
- Lint: `npm run lint` (runs on pre-commit)
- Database: schema changes go in /db/migrations, generate with `npm run db:migrate`
## Conventions
- Prefer server actions over API routes for form handling
- All database queries go through /lib/db.ts, not raw Drizzle callsThat's a complete CLAUDE.md. It fits on one screen. Claude reads all of it.
Claude Code slash commands: built-in, bundled skills, and custom
Claude Code ships with slash commands that control the session. Clear context, compact history, check costs, toggle voice. Beyond the built-ins, there's a skills system for creating your own commands or using the bundled ones.
Built-in slash commands
These are available in every Claude Code session:
| Command | What it does |
|---|---|
/compact | Condenses conversation history into a summary, keeping the session alive while freeing context |
/clear | Erases the conversation but preserves project memory; use when switching tasks |
/memory | Opens CLAUDE.md for editing |
/voice | Toggles voice mode on or off |
/help | Lists available commands |
/agents | Shows active sub-agents if any are running |
/review | Triggers a code review of recent changes |
/permissions | Shows what tools and permissions Claude has |
/cost | Shows the cost of the current session |
/status | Shows context usage, token count, and session state |
/status is worth running regularly. Watching your context fill up before it gets critical is one of the simplest habits that improves your sessions.
Custom skills: building your own slash commands
Custom commands used to live in .claude/commands/ as markdown files. That system has been merged into skills, which live in .claude/skills/. Both paths create slash commands you can invoke during sessions.
A skill is a markdown file with a name and a description in the frontmatter, followed by instructions. Example:
---
name: pr-summary
description: Write a concise summary of current staged changes for a pull request
---
Look at the staged changes in the current repo. Write a PR description with:
- A one-line summary in the title
- A bullet list of the main changes grouped by area
- Any migration or deployment notes if relevant
Keep it factual. No marketing language.Save that as .claude/skills/pr-summary.md and /pr-summary becomes available in your session.
Claude Code's creator has recommended using slash commands for every "inner loop" workflow you repeat daily. Start with the tasks you type the same prompt for every day.
Bundled skills: /simplify, /batch, /debug
Claude Code ships with three bundled skills:
/simplify: Reviews changed files by spawning three parallel review agents. They focus on code reuse, quality, and efficiency. Aggregates findings and applies fixes. Good for a final pass before opening a PR.
/batch: Orchestrates large-scale parallel changes using git worktrees. Handles 5 to 30 independent changes at once, each ending in a PR. Use it for the same category of change across many files or modules.
/debug: Reads the current session's debug log, optionally focused on a description you provide. Useful when Claude hits an error it can't self-resolve.
Claude Code voice mode: how to enable it and what it does
Voice mode for Claude Code started rolling out on March 3, 2026, to roughly 5% of users. Hold the spacebar, speak your instruction, release. Claude executes. It's push-to-talk for your terminal AI.
If you don't have it yet, that's expected.
Toggle it with /voice. That's the full setup.
The feature was announced by Anthropic engineer Thariq Shihipar on X the day it launched. Broader rollout to all users is planned for the coming weeks.
Voice mode opens up hands-free workflows that weren't practical before. Review a PR while talking through changes. Walk through a codebase without touching the keyboard. It's a different interaction mode, not just a convenience feature.
Anthropic hasn't published specifics on rate limits or the underlying voice technology as of launch. The reported ElevenLabs partnership hasn't been confirmed officially.
For a deeper look at what voice mode means for coding agents, keep an eye on Anthropic's official Claude Code documentation as voice mode rolls out to more users.
Context management: /compact vs /clear and when each one is right
Claude Code holds around 200,000 tokens of context. As that fills up, quality degrades. Context management isn't an advanced topic. It's the most important constraint to understand after installation.
Use /compact to keep going. Use /clear when you're switching tasks.
The context window: how much is 200k tokens?
A 200k token context window sounds large. It isn't. File contents, command output, and conversation history add up fast. A complex feature with multiple file reads and revision cycles can eat through it in an hour.
Run /status to see where you stand.
/compact: when to compress
/compact condenses conversation history into a summary. The session stays alive. Claude keeps its working context about what you're building, but the detailed turn-by-turn history gets replaced with a compressed version.
Use /compact when:
- You've been in a session for a while and want to keep going on the same feature
- The
/statuscommand shows you're getting close to the limit - Claude starts giving shorter or less detailed responses (an early sign of context pressure)
/compact is lossy. It compresses well but doesn't preserve every detail of every exchange. Some specifics drop out. That's the trade-off.
/clear: when to wipe and start fresh
/clear erases the conversation but preserves project memory. CLAUDE.md stays. The project context stays. But the conversation history goes.
Use /clear when:
- You finished one task and you're switching to something unrelated
- The current session went sideways and you want a clean start
- You want Claude to approach a problem without assumptions from earlier in the session
The difference matters. /compact keeps you in the same work stream, compressed. /clear starts the conversation over while keeping the project context intact.
Claude Code best practices: what daily production use teaches you
The single best thing you can do is give Claude a way to verify its own output. Tests, screenshots, expected results. Without verification criteria, Claude writes code and guesses whether it worked. With them, it runs the check and iterates.
The difference in output quality is significant.
Give Claude a way to verify its work
The official best practices call this the most important thing you can do. Tell Claude how to know if it succeeded.
Some examples:
- "Run
npm testafter each change and fix any failures before moving on" - "Open the preview and confirm the modal appears without a scroll bar"
- "Run the migration and check that the user table has the new column"
These aren't complicated instructions. They're checkpoints Claude can use to self-correct instead of handing you something that doesn't work.
Plan Mode: get a plan before committing to code
For any feature larger than a few files, use Plan Mode first. Describe what you want. Ask Claude to reason through the implementation before writing anything. Iterate on the plan until it looks right.
Then switch to execution.
This front-loads the reasoning into a stage where nothing is broken yet. Redirecting a plan is much easier than untangling code Claude already wrote in the wrong direction.
Keep CLAUDE.md lean
This follows from how Claude handles CLAUDE.md content. It may skip sections it judges as irrelevant. A longer file doesn't mean more context. It often means less, because Claude filters more aggressively.
The practical rule: if an instruction only applies to some tasks, it doesn't belong in CLAUDE.md. Put it in a skill, or pass it in the session prompt when it's relevant.
Key Terms
Claude Code is Anthropic's agentic coding tool that reads codebases, edits files, and runs commands from the terminal.
CLAUDE.md is the project context file Claude Code reads at the start of every session. It's the only file injected into every conversation by default.
Plan Mode is a Claude Code mode where Claude reasons through an implementation plan before writing any code. Useful for complex features.
Skills are custom slash commands created in .claude/skills/ as markdown files. They replaced the older .claude/commands/ system.
Context window is the total amount of text (tokens) Claude can hold in memory during a session. Claude Code's context window is approximately 200,000 tokens.
FAQ
Is Claude Code free?
Claude Code requires a Claude subscription. It's available through Anthropic's Claude plans. There's no standalone free tier for Claude Code.
Does Claude Code work with any programming language?
Yes. Claude Code reads and writes any language. It performs best on TypeScript, Python, Rust, Go, and similar languages well-represented in its training data. Less common languages work, but expect Claude to lean on patterns it recognizes.
What's the difference between Claude Code and chatbot Claude?
Claude.ai is a conversational interface. You ask, it answers. Claude Code is an agentic tool that explores, plans, edits files, and runs commands. It takes action in your environment. That's a fundamentally different product.
How do I check how much context I've used?
Run /status in your Claude Code session. It shows current token usage, context percentage, and session cost.
Is Claude Code voice mode available to everyone?
Not yet. The March 2026 rollout started at roughly 5% of users. Broader rollout is planned over the following weeks. Toggle it with /voice once it's available in your account.
Claude Code: what to do next
Claude Code is a different kind of tool. It's not autocomplete. It's an agent that reads your project, writes code, and runs commands. The setup that matters most is a lean CLAUDE.md, a habit of using /compact and /clear at the right times, and giving Claude verification criteria so it can check its own work. Voice mode is rolling out now, and it's worth trying once you have access. Start with a small project, build your CLAUDE.md, and let the agent do the work.
Sources
This guide draws on Anthropic's official Claude Code documentation, official best practices, and slash commands documentation.
Voice mode details come from TechCrunch's day-of-launch coverage on March 3, 2026.
CLAUDE.md analysis is based on HumanLayer's investigation, which used an API proxy to inspect Claude's actual system prompt behavior.
Community practice references come from Builder.io's engineering team, CodeWithMukesh, SFEIR Institute, and Reddit r/ClaudeAI.
Voice rate limits and the reported TTS provider are unconfirmed as of publication. Those claims are not stated as fact in this article.
Related Resources
- Claude Code official best practices
- Claude Code official documentation
- Writing a Good CLAUDE.md by HumanLayer
- How I Use Claude Code by Builder.io
Changelog
| Date | Change |
|---|---|
| 2026-03-04 | Initial publish |




Comments
No comments yet. Be the first.