Claude Code Quickstart
Get Claude Code running in your project in 5 minutes.
Install
npm install -g @anthropic-ai/claude-code
Requires Node.js 18+ and an Anthropic API key (or Claude Pro/Team subscription).
First Project
cd my-project
claude
Claude reads your project structure and any CLAUDE.md file, then waits for your prompt.
Try something simple:
> What does this project do? Give me a one-paragraph summary.
Claude will read key files (README, package.json, main entry points) and respond.
Write a CLAUDE.md
Create a CLAUDE.md at your project root. This is the single most impactful thing you can do to improve Claude Code’s behavior:
# My Project
## Build & Test
- `npm run build` to compile
- `npm test` to run tests
- `npm run lint` to check style
## Architecture
- src/api/ - REST endpoints (Express)
- src/db/ - Database queries (Postgres via pg)
- src/services/ - Business logic
## Conventions
- Use TypeScript strict mode
- Prefer named exports
- Error handling: throw AppError with status codes
- Tests: colocate with source files as *.test.ts
Claude reads this at session start and follows it throughout.
Key Commands
| Command | What it does |
|---|---|
/help | List all commands |
/clear | Reset conversation context |
/compact | Compress context (useful for long sessions) |
| Cmd+K | Topic switcher - jump between separate task threads |
| Esc Esc | Undo last change (restore checkpoint) |
/rewind | Rewind to a specific checkpoint |
Configure Permissions
By default, Claude asks before editing files or running commands. Speed this up by allowing common operations in .claude/settings.json:
{
"permissions": {
"allow": [
"Bash(npm test)",
"Bash(npm run build)",
"Bash(npm run lint)",
"Bash(git status)",
"Bash(git diff *)",
"Bash(git log *)",
"Edit"
]
}
}
Tip: Start conservative and add permissions as you see which prompts you approve repeatedly.
VS Code Extension
- Install “Claude Code” from the VS Code marketplace
- Open the sidebar panel (Claude icon in activity bar)
- Start prompting - inline diffs appear directly in your editor
The VS Code extension provides:
- Inline diff previews before applying edits
- Code lens actions on functions and classes
- File-level suggestions in the explorer
- Same conversation history as the terminal
Try These First
Once you’re set up, try these prompts to see Claude Code in action:
> Add input validation to the /api/users POST endpoint
> Find all places where we catch errors but don't log them
> Write tests for the auth middleware
> Explain how the payment flow works, step by step
Tips for Effective Use
-
Be specific - “Fix the login bug” is vague. “The /api/login endpoint returns 500 when the email contains a plus sign” is actionable.
-
Let Claude read first - don’t paste code into the prompt. Say “read src/auth.ts and explain the token refresh logic.” Claude reads the actual file and stays up to date.
-
Use multi-turn - start broad (“explain the auth system”), then narrow (“now add rate limiting to the login endpoint”). Claude retains context.
-
Trust the tools - Claude will read files, search code, and run commands. Let it explore rather than pre-explaining everything.
Next
- Claude Code features - checkpoints, hooks, subagents, agent teams
- Build your first skill - extend Claude with custom workflows