Claude Code has evolved from a simple CLI tool into a full agentic development platform. This comprehensive guide covers everything from basic setup to advanced features like subagents, worktrees, and custom skills.
If you told developers two years ago that an AI tool would reliably write, test, and deploy production code with minimal supervision, most would have laughed. Yet here we are in 2026, and Claude Code has become the most transformative developer tool since Git.
But most developers are using maybe 20% of what Claude Code can do. This guide covers everything — from first install to building custom AI development teams with subagents.
What is Claude Code?
Claude Code is Anthropic's official CLI (Command Line Interface) for Claude. Unlike the web interface, Claude Code runs in your terminal and has direct access to your filesystem, shell, and development tools. It can:
- Read and write files in your codebase
- Execute shell commands
- Run tests and analyze output
- Use MCP (Model Context Protocol) servers for external integrations
- Spawn subagents for parallel tasks
- Create and manage worktrees for isolated development
Think of it as having a senior developer sitting next to you in the terminal, with full access to your project.
Setting Up Claude Code
Installation
npm install -g @anthropic-ai/claude-codeAuthentication
claude loginThis opens a browser window for authentication. Once logged in, your API key is stored securely and you're ready to go.
First Run
Navigate to any project directory and run:
claudeThat's it. Claude Code will analyze your project structure, read relevant configuration files, and drop you into an interactive session.
CLAUDE.md: Your Project's AI Configuration
The CLAUDE.md file is the most important feature most developers overlook. Place it in your project root, and Claude Code reads it at the start of every session.
What to Put in CLAUDE.md
# Project: MyApp
## Tech Stack
- Next.js 15 with App Router
- TypeScript (strict mode)
- Tailwind CSS
- PostgreSQL with Drizzle ORM
## Conventions
- Use functional components only
- Prefer const over let
- All API routes go in src/app/api/
- Tests use Vitest, not Jest
## Common Commands
- npm run dev — start dev server
- npm run test — run all tests
- npm run build — production build
## Architecture Notes
- Auth handled by NextAuth v5
- State management: Zustand
- File uploads go to S3 via presigned URLsThis context makes Claude Code dramatically more accurate. Instead of guessing your conventions, it knows them. Instead of suggesting the wrong testing framework, it uses Vitest. The difference in output quality is immediate and significant.
Hierarchical CLAUDE.md Files
You can place CLAUDE.md files at multiple levels:
- ~/.claude/CLAUDE.md — Global preferences (editor, OS, coding style)
- project-root/CLAUDE.md — Project-specific conventions
- src/modules/auth/CLAUDE.md — Module-specific context
Claude Code merges these hierarchically, with more specific files taking precedence.
Skills: Reusable AI Workflows
Skills are one of Claude Code's most powerful features. They're essentially saved workflows that can be triggered with slash commands.
Built-in Skills
- /commit — Analyze changes and create a well-formatted git commit
- /review-pr — Review a pull request with detailed feedback
- /init — Initialize a new project with your preferred stack
Creating Custom Skills
You can create custom skills that encode your team's specific workflows:
claude skill create deploy-staging
# Description: Deploy current branch to staging
# Trigger: /deploy-stagingThe skill file is saved as a markdown file with instructions that Claude follows when the skill is invoked. This is incredibly powerful for standardizing team workflows.
Example: Custom Code Review Skill
Here's an example of a custom skill that reviews code against your team's standards:
# Skill: team-review
# Trigger: /team-review
## Instructions
1. Read the git diff for staged changes
2. Check against our coding standards in CLAUDE.md
3. Verify all new functions have JSDoc comments
4. Check for console.log statements that should be removed
5. Verify error handling patterns match our conventions
6. Suggest improvements for performance and readability
7. Format output as a structured review with severity levelsSubagents: Build an AI Development Team
This is the feature that changes everything. Claude Code can spawn subagents — independent Claude instances that work on tasks in parallel.
How Subagents Work
When Claude Code encounters a complex task that can be parallelized, it can spawn subagents to handle different parts simultaneously:
- One subagent writes the frontend component
- Another writes the API route
- A third writes the database migration
- A fourth writes tests for all of the above
Each subagent has its own context and can read/write files independently. The parent agent coordinates their work and resolves conflicts.
Practical Example
claude "Add a user profile page with avatar upload, bio editing,
and activity feed. Include API routes, database changes,
and comprehensive tests."Claude Code might handle this by:
- Spawning a subagent for the database schema changes
- Spawning another for the API routes
- Spawning another for the React components
- Spawning another for the test suite
- Coordinating the results and ensuring consistency
What would take you hours takes minutes. And because each subagent works within the project's CLAUDE.md conventions, the code is consistent.
Worktrees: Isolated Development Environments
Worktrees allow Claude Code to create isolated git branches for experimental work without affecting your current working directory.
Use Cases
- Testing a risky refactor without risking your current branch
- Exploring two different implementation approaches simultaneously
- Running long-running tasks in the background while you continue working
How to Use
claude "Try two approaches for the caching layer:
Redis-based and in-memory LRU. Create worktrees for each,
implement both, and compare performance."Claude Code creates separate worktrees, implements both approaches, and can even run benchmarks to compare them.
MCP Servers: Connecting Claude Code to Everything
MCP (Model Context Protocol) servers extend Claude Code's capabilities by connecting it to external services and tools.
Popular MCP Servers
- Playwright: Browser automation and testing
- Database: Direct SQL queries and schema inspection
- Figma: Design-to-code workflows
- GitHub: Issue management, PR reviews
- Slack: Team communication integration
Configuration
MCP servers are configured in your project's .claude/ directory or globally in ~/.claude/. Once configured, Claude Code can seamlessly interact with these services during your development workflow.
Hooks: Automate Everything
Hooks let you trigger custom actions at specific points in Claude Code's workflow:
- Pre-commit hooks: Run linting and formatting before commits
- Post-file-change hooks: Auto-run related tests when files change
- Session start hooks: Load project context and check for updates
Advanced Tips and Workflows
1. The "Architect Then Build" Pattern
claude "Before writing any code, analyze the current codebase
and propose an architecture for [feature]. Show me the plan,
wait for my approval, then implement."2. The "TDD Loop" Pattern
claude "Write failing tests first for [feature], then implement
the minimum code to make them pass, then refactor."3. The "Migration Expert" Pattern
claude "Migrate all class components in src/components/ to
functional components with hooks. Do it file by file,
running tests after each migration."People Also Ask
Is Claude Code free?
Claude Code requires an Anthropic API key and charges based on usage. Claude Pro subscribers ($20/month) get Claude Code access included with usage limits. For heavy usage, you'll need an API key with pay-as-you-go billing.
Can Claude Code replace a developer?
No, but it can make a developer 5-10x more productive. It excels at implementation tasks but still needs human guidance for architecture decisions, product direction, and complex debugging.
Does Claude Code work with any language?
Yes. Claude Code is language-agnostic. It works with Python, TypeScript, Rust, Go, Java, Ruby, and any other language. It's particularly strong in TypeScript and Python.
Getting Started Today
The best way to learn Claude Code is to use it on a real project. Start small — use it for a single feature or bug fix. As you get comfortable, explore skills, subagents, and MCP servers.
And remember: the quality of Claude Code's output is directly proportional to the quality of your CLAUDE.md and your prompts. Invest time in configuration upfront, and you'll save hours every day.
Want to skip months of trial and error? We've distilled thousands of hours of prompt engineering into ready-to-use prompt packs that deliver results on day one. Our packs at wowhow.cloud include battle-tested prompts for marketing, coding, business, writing, and more — each one refined until it consistently produces professional-grade output.
Blog reader exclusive: Use code
BLOGREADER20for 20% off your entire cart. No minimum, no catch.
Written by
Promptium Team
Expert contributor at WOWHOW. Writing about AI, development, automation, and building products that ship.
Ready to ship faster?
Browse our catalog of 1,800+ premium dev tools, prompt packs, and templates.