Setting Up Claude Code
Installation
npm install -g @anthropic-ai/claude-code
Or skip the CLI entirely and install the desktop app for Mac or Windows, which bundles Claude Code so there’s nothing else to set up.
Authentication
This opens a browser window for authentication. Once logged in, your credentials are stored securely and you’re ready to go.
First Run
Navigate to any project directory and run:
That’s it. Claude Code analyzes your project structure, reads relevant configuration files, and drops you into an interactive session.
CLAUDE.md: Your Project’s AI Configuration
The CLAUDE.md file is the most important feature most developers still overlook. Place it in your project root, and Claude Code reads it at the start of every session — on the CLI, the desktop app, the web, or inside an IDE extension.
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 URLs
This 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.
Using Claude Code Inside VS Code (and Visual Studio 2026)
This is where a lot of developers get confused in 2026, because “VS Code” and “Visual Studio” are two different Microsoft products with two very different levels of Claude Code support.
The Official VS Code Extension
Anthropic ships an official extension for Microsoft’s free, cross-platform VS Code editor. It bundles its own copy of the CLI internally, so you don’t need a separate CLI install to use the chat panel. It installs in under a minute and works with VS Code 1.98.0 or higher, plus VS Code forks like Cursor, Devin Desktop, and Kiro.
Inside the editor you get inline diff panels showing every change — additions highlighted in green, removals in red — and you can accept the whole diff, reject it, or accept individual hunks one at a time. It shares conversation history and permission modes with the CLI, so switching between terminal and editor mid-task is seamless.
The JetBrains Plugin
The official JetBrains plugin works across IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, GoLand, and Android Studio. Unlike the VS Code extension, it doesn’t bundle the CLI — you install the standalone CLI separately and make sure it’s on your PATH before the plugin will connect.
What About Visual Studio 2026?
Note the distinction: Visual Studio (the full Windows .NET IDE) is not the same product as VS Code. Anthropic does not currently ship an official Visual Studio extension. What exists is a community-built, unofficial bridge project that adds a native diff view with accept/reject, a live debugger Claude can drive autonomously, Roslyn-based code navigation, and Test Explorer integration — effectively the IDE half of Claude Code’s integration protocol, reimplemented for Visual Studio by the community. If you’re a .NET developer specifically asking “how do I use Claude with Visual Studio 2026,” that community project is currently the only path; for anything mission-critical, the officially supported route today is still the CLI, the desktop app, VS Code, or JetBrains.
One Thing to Know: Fast Mode Is CLI-Only
Fast mode (covered below) is a CLI-only feature as of this writing — it is not available inside the VS Code extension. If raw speed matters for a task, drop into the terminal.
Skills and Plugins: Reusable AI Workflows
Skills are lightweight, markdown-based workflows that load contextually when they’re relevant. There are two flavors:
- Capability Uplift skills — give Claude an ability it doesn’t have natively, like structured document creation or browser automation
- Encoded Preference skills — guide Claude to do something it already knows how to do, but your team’s specific way — an NDA review checklist, a weekly-update format, a deploy runbook
Plugins are the packaging layer on top: a versioned bundle that can ship one or more skills, subagents, slash commands, hooks, and MCP server definitions together as a single installable unit. If skills are individual tools, plugins are the toolbox.
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-staging
The 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 levels
Rule of thumb for which layer to reach for: a slash command for a plain prompt template, a skill when there’s real domain logic or helper files involved, a subagent for isolated parallel work, and a hook to enforce a rule with actual code instead of a suggestion.
Subagents: 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, another for the API routes, another for the React components, another for the test suite, then 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 stays 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 — they’re running processes that expose tools and data sources directly to Claude.
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, whether you’re driving it from the CLI, the desktop app, or an IDE extension.
Hooks: Automate Everything
Hooks let you trigger custom actions at specific points in Claude Code’s workflow — the layer that enforces a rule with actual code instead of hoping the model remembers:
- 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
Fast Mode: Speed When You Need It
Toggle it on in the CLI with /fast. Fast mode routes Opus through a configuration that prioritizes speed over cost efficiency, delivering up to 2.5x higher output tokens per second at premium pricing — same quality and capabilities, just faster. It’s built for interactive work like rapid iteration or live debugging, where waiting on a response breaks your flow.
A few things worth knowing: it requires a recent Claude Code CLI version, it’s CLI-only (not available in the VS Code extension as of this writing), and the setting persists across sessions by default — once you flip it on, it stays on until you toggle it off. Use it when speed matters more than cost; turn it off when the reverse is true.
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 a Claude account and usage is metered. Claude Pro and Max subscribers get Claude Code access included with plan-based usage limits across the CLI, desktop app, web, and IDE extensions; heavy or automated usage typically needs an API key with pay-as-you-go billing instead.
Can Claude Code replace a developer?
No, but it can make a developer several times more productive. It excels at implementation tasks but still needs human guidance for architecture decisions, product direction, and complex debugging judgment calls.
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, and it’s particularly strong in TypeScript and Python.
Should I use the VS Code extension or the CLI?
They’re the same engine with different ergonomics. The VS Code extension is easier to start with (no separate CLI install, visual diff review) and is great for day-to-day editing. The CLI is better for scripting, headless automation, worktrees, and fast mode. Most developers who use Claude Code daily end up using both, switching depending on the task.
Which Claude model should I use with Claude Code?
Sonnet 5 is the sensible default for everyday work. Reach for Opus 5 (or Fable 5, if your plan includes it) on hard, long-running refactors and architecture-level decisions, and drop down to Haiku 4.5 for simple, high-volume, or latency-sensitive tasks.
Getting Started Today
The best way to learn Claude Code is to use it on a real project. Start small — a single feature or bug fix, in whichever surface (CLI, desktop, or IDE extension) fits how you already work. As you get comfortable, explore skills, plugins, subagents, MCP servers, and fast mode.
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 BLOGREADER20 for 20% off your entire cart. No minimum, no catch.
Browse Prompt Packs →
Comments · 0
Beta: comments are stored locally on your device and not visible to other readers.
No comments yet. Be the first to share your thoughts.