Claude Code: Complete Guide for Developers
Claude Code is Anthropic’s agentic coding tool. Instead of suggesting a line of code and waiting, it reads your codebase, edits files across your project, runs commands, and checks its own work, all from a plain English instruction. This guide covers what Claude Code is, how to install it on every platform, what it costs, and the features and habits that separate developers who get real leverage from it from those who don’t.
In this guide:
1. What is Claude Code?
2. Where Claude Code runs
3. How to install Claude Code
4. Pricing and who can use it
5. Your first session
6. CLAUDE.md: give Claude permanent context
7. Hooks, skills, subagents, MCP and plugins
8. Best practices that actually matter
9. Claude Code in automation and CI
10. Common mistakes
11. Claude Code vs Cursor and other tools
12. FAQ
What is Claude Code?
Claude Code is an AI coding assistant that can plan a change, write code across several files, run your tests, and fix what breaks. Anthropic describes it as an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools.
The word that matters is agentic. A chat assistant answers and stops. Claude Code works in a loop: it explores the project, forms a plan, makes edits, runs a command to check the result, reads the output, and keeps going until the job is done or it needs your input. You can watch, redirect, or step away.
Typical jobs include:
• Building a feature from a description and wiring it across several files
• Tracing a bug from an error message to its root cause and fixing it
• Writing tests for untested code, then running them and fixing failures
• Resolving merge conflicts, fixing lint errors, updating dependencies
• Creating commits and opening pull requests through git
• Explaining an unfamiliar codebase, as you would ask a senior engineer
Where Claude Code runs
Claude Code is not only a terminal tool. It runs on several surfaces that share the same engine, so your project’s CLAUDE.md files, settings and MCP servers carry across all of them.
| Surface | What it is |
| Terminal (CLI) | The full-featured version, started with the claude command |
| VS Code (and Cursor) | Extension with inline diffs, @-mentions, plan review and history |
| JetBrains IDEs | Plugin for IntelliJ IDEA, PyCharm, WebStorm and others; it needs the CLI installed separately |
| Desktop app | Standalone app to review diffs visually and run several sessions side by side |
| Web and mobile | Run tasks in the browser at claude.ai/code, or from the Claude mobile app, with no local setup |
| Slack, CI/CD, Chrome | Mention @Claude in Slack, automate reviews with GitHub Actions or GitLab CI/CD, debug live web apps through Chrome |
How to install Claude Code
Anthropic recommends the native installer. Open a terminal and run the command for your system.
macOS, Linux and WSL:
curl -fsSL https://claude.ai/install.sh | bash Windows PowerShell:
irm https://claude.ai/install.ps1 | iexWindows CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd Package-manager options also exist: # Homebrew (macOS/Linux)
brew install --cask claude-code # WinGet (Windows)
winget install Anthropic.ClaudeCode You can also install through apt, dnf or apk on Debian, Fedora, RHEL and Alpine.
Good to know:
• Native installs update themselves in the background. Homebrew and WinGet installs do not, so run brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode now and then. • Homebrew has two casks: claude-code follows the stable channel (typically about a week behind) and claude-code@latest gets releases as soon as they ship.
• On native Windows, Git for Windows is recommended so Claude Code can use its Bash tool. Without it, Claude Code falls back to PowerShell. You can also run it inside WSL. • Many older tutorials show an npm install. Check the official setup page for the current recommended method before following them.
Verify the install:
claude --version
claude doctorIf your shell says claude is not found, the install directory is not on your PATH yet. Open a new terminal window first, then fix your PATH if the problem remains.
Start it:
cd your-project
claudeOn first run you’ll be asked to log in. If you have an ANTHROPIC_API_KEY environment variable set, Claude Code skips the login prompt and asks you to approve the key instead.
Claude Code pricing and who can use it
Claude Code needs a paid account. The free Claude.ai plan does not include it. You can use it through:
• Claude Pro: $20 per month ($17 per month billed annually)
• Claude Max 5x: $100 per month, roughly five times Pro capacity
• Claude Max 20x: $200 per month, roughly twenty times Pro capacity
• Team or Enterprise plans: seat-based, with Claude Code access depending on seat type
• Anthropic Console / API: pay per token instead of a flat subscription
Pro is a sensible place to start. Developers who hit usage limits regularly, or who run several agents for hours, usually move to a Max plan. Plans and limits change, so confirm current prices on the official pricing page before you subscribe.
Your first session
Start in a project folder and talk to Claude Code the way you’d brief a teammate: explain how authentication works in this project
add input validation to the signup form, write tests for it, run them and fix any failures commit my changes with a descriptive message
A few habits help immediately:
• Reference files with @, for example @src/auth/login.ts, so Claude reads the file instead of guessing.
• Paste screenshots or error messages directly into the prompt.
• Press Esc to stop Claude mid-action without losing context.
• Press Esc twice or run /rewind to restore an earlier conversation and code checkpoint.
• Run /clear when you switch to an unrelated task.
CLAUDE.md: give Claude permanent context
CLAUDE.md is a markdown file in your project root that Claude Code reads at the start of every session. Use it for things Claude cannot infer from the code: build and test commands, style rules that differ from defaults, branch and pull request conventions, architectural decisions, and environment quirks.
Run /init to generate a starter file from your project structure, then refine it.
# Code style - Use ES modules (import/export), not CommonJS (require) # Workflow
- Typecheck after a series of code changes
- Prefer running a single test file over the full suiteThe most common mistake is making it too long. Anthropic’s guidance is to keep it short and cut any line whose removal would not cause a mistake. A bloated file makes Claude ignore the rules that matter. Run /context to confirm the file loaded. Claude Code also builds auto memory as it works, saving what it learns across sessions.
Hooks, skills, subagents, MCP and plugins
These five features customize Claude Code. Knowing which one fits which problem saves a lot of time. Hooks: guaranteed automation
Hooks are shell commands, HTTP calls, prompts or subagents that run automatically at set points in Claude’s workflow. Unlike instructions in CLAUDE.md, which are advice, hooks are deterministic, so use them for anything that must happen every single time.
Common events include SessionStart, UserPromptSubmit, PreToolUse (before a tool call, and it can block it), PostToolUse (after a call), and Stop (when Claude finishes). You configure them in .claude/settings.json for a project or ~/.claude/settings.json for all your projects.
This example runs a linter after every file edit:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "/path/to/lint-check.sh"
}
]
}
]
}
}For policy hooks that block actions, remember that exit code 2 is what blocks. A plain exit code 1 is treated as a non-blocking error and the action goes ahead. Run /hooks to browse what is configured.
Skills: reusable know-how
A skill is a folder containing a SKILL.md file, placed in .claude/skills/. Claude applies a skill when it is relevant, or you invoke it directly, for example /fix-issue 1234. Use skills for domain knowledge or workflows that matter only sometimes, so they don’t bloat every session the way a long CLAUDE.md would.
Subagents: isolated helpers
Subagents run in their own context window with their own allowed tools and report back a summary. Define them as markdown files in .claude/agents/, or just tell Claude: “use a subagent to review this code for security issues.” They are ideal for research that reads many files, and for independent review of finished work.
MCP: connect your tools
The Model Context Protocol is an open standard for connecting AI tools to outside data and services. With MCP servers, Claude Code can read design docs, update tickets in Jira, query databases, pull data from Slack, or use your own tooling. Add a server with:
claude mcp add –transport http notion https://mcp.notion.com/mcp
Plugins: bundles of all of the above
Run /plugin to browse the marketplace. A plugin packages skills, hooks, subagents and MCP servers into one installable unit.
Best practices that actually matter
Anthropic’s own guidance rests on one constraint: Claude’s context window fills up fast, and performance drops as it fills. Almost every good habit is a way of protecting it.
1. Give Claude a way to verify its work. This is the highest-leverage habit. Provide tests, a build command, a linter or a screenshot comparison so Claude can check itself and iterate. Without a check, “looks done” is the only signal, and you become the verification loop.
2. Explore, plan, then code. Use plan mode (press Shift+Tab until plan mode shows, or start with claude –permission-mode plan) so Claude reads and plans without changing anything. Then implement, then commit. Skip planning when you could describe the diff in one sentence.
3. Be specific. “Add tests for foo.py” works worse than “write a test for foo.py covering the logged-out case, avoiding mocks.” Point to existing patterns in your codebase and name the files.
4. Manage context aggressively. Use /clear between unrelated tasks, /compact with instructions when you want a controlled summary, and subagents for investigation so the reading doesn’t clutter your main session.
5. Course-correct early. If you’ve corrected Claude twice on the same issue, the context is cluttered with failed attempts. Run /clear and rewrite the prompt with what you learned.
6. Configure permissions sensibly. Claude Code asks before actions that change your system. Pre approve safe commands with /permissions and use /sandbox for OS-level isolation. Auto mode uses a separate classifier to review actions instead of asking you each time. Understand the mode you’re in before you leave a session unattended.
7. Let Claude interview you for big features. Ask it to question you about the hard parts, then write a spec to a file. Start a fresh session to implement from that spec.
One caveat: checkpoints only track changes made through Claude’s file-editing tools, not changes made by Bash commands. Checkpoints are not a replacement for git.
Claude Code in automation and CI
Claude Code follows the Unix philosophy, so it composes with other tools. Non-interactive mode runs with -p:
claude -p “Explain what this project does”
claude -p “List all API endpoints” –output-format json
git diff main –name-only | claude -p “review these changed files for security issues”
You can fan work out across many files by looping over claude -p, or use /batch to split a change across multiple subagents, each in its own git worktree. For CI, GitHub Actions and GitLab CI/CD integrations automate pull request review and issue triage. You can also schedule recurring work, such as morning PR reviews or weekly dependency audits, using routines or desktop scheduled tasks.
To resume work later, use claude –continue or claude –resume.
If you want to build your own agents on the same foundation, the Claude Agent SDK (formerly the Claude Code SDK) exposes Claude Code’s tools and agent loop in Python and TypeScript.
Five common mistakes
1. The kitchen-sink session. Mixing unrelated tasks fills the context. Fix: /clear between tasks.
2. Correcting again and again. Failed attempts pollute the context. Fix: restart with a better prompt after two misses.
3. An over-long CLAUDE.md. Important rules get lost. Fix: prune ruthlessly, or turn rules into hooks.
4. Trusting without verifying. Plausible code can miss edge cases. Fix: always provide tests or a check.
5. Unscoped investigation. “Look into this” can make Claude read hundreds of files. Fix: scope it, or use a subagent.
Claude Code vs Cursor and other AI coding tools
Cursor is a standalone AI-first editor, while Claude Code is agent-first and works in your terminal, IDE, desktop app and browser. Many developers use both: an editor for hands-on work and Claude Code for larger multi-file tasks and automation. Because Claude Code has a VS Code extension that also installs into Cursor, the two are not mutually exclusive. The better choice depends on whether you want the AI inside your editor or running tasks alongside it.
Frequently Asked Questions
Building features, fixing bugs, writing tests, refactoring, resolving merge conflicts, creating commits and pull requests, and understanding unfamiliar code.
No. The free Claude.ai plan does not include it. You need a Pro, Max, Team or Enterprise plan, or an Anthropic Console account billed per token.
Run the native installer for your system (see the install section above), then run claude –version to confirm and claude inside your project to start.
Yes. You can run it natively on Windows or inside WSL. Git for Windows is recommended for native installs.
A markdown file Claude Code reads at the start of every session, holding project rules, commands and conventions.
CLAUDE.md instructions are advisory. Hooks are scripts that run automatically and guarantee an action happens.
The Model Context Protocol lets Claude Code connect to external tools and data sources such as Jira, Slack, Google Drive and databases.
Yes. You can use subagents, git worktrees, the desktop app’s parallel sessions, cloud sessions on the web, and background agents.
Claude Code uses a tiered permission system and asks before actions that modify your system, and sandboxing is available. Review the permission mode you are using, and check your organization’s security requirements.
easycomm.io builds custom software for businesses. Its work includes AI CCTV, AI hybrid solutions, robotics (ROS-based tech stack), web development, app development, AI development, real estate software with a built-in CRM, custom software development, an LMS with AR/VR features, ERP and CRM systems.
Yes. easycomm.io has built AI products such as AI CCTV and AI hybrid solutions, and offers AI development, along with web, app and enterprise software. Reach out to easycomm.io with your requirements to discuss scope.
Conclusion
Claude Code rewards a different way of working. Describe the outcome, give Claude a way to verify it, protect the context window, and encode your team’s rules once in CLAUDE.md, hooks and skills. Start with a small task in a real project, add one customization at a time, and let the results tell you where to invest next.
Build with easycomm.io. easycomm.io designs and builds custom software and AI solutions, including AI CCTV, AI hybrid solutions, robotics (ROS-based tech stack), web development, app development, AI development, real estate software with a built-in CRM, custom software development, an LMS with AR/VR features, ERP and CRM systems. Have a project in mind? Get in touch with the easycomm.io team at easycomm.io to talk through your idea.
Sources
• Claude Code overview: https://code.claude.com/docs/en/overview
• Best practices for Claude Code: https://code.claude.com/docs/en/best-practices • Hooks reference: https://code.claude.com/docs/en/hooks
• Claude Code setup: https://code.claude.com/docs/en/setup
• Claude pricing: https://claude.com/pricing




