Skip to content

Claude Code Quick Start Guide

Claude Code transforms how you write software by providing an intelligent AI pair programmer right in your terminal. This guide gets you from zero to productive in 2 hours, covering everything from initial setup through building your first feature with AI assistance.

Before starting, ensure you have:

  • Node.js 18+ installed (download)
  • Git configured on your system
  • A code editor (VS Code, Cursor, or JetBrains IDE recommended)
  • An active project to work with

By the end of this guide, you’ll be able to:

  • Install and configure Claude Code for optimal performance
  • Navigate the PRD → Plan → Todo workflow methodology
  • Use deep reasoning modes for complex architectural decisions
  • Integrate MCP servers for extended capabilities
  • Build, test, and deploy features with AI assistance
  • Collaborate effectively using Claude’s Git integration

Installation & Authentication (15 minutes)

Section titled “Installation & Authentication (15 minutes)”
  1. Install Claude Code globally

    The recommended installation method uses npm:

    Terminal window
    npm install -g @anthropic-ai/claude-code

    For macOS and Linux users, avoid using sudo as it can lead to permission issues. If you encounter errors, see the troubleshooting section.

  2. Verify installation

    Navigate to your project directory and start Claude Code:

    Terminal window
    cd your-project
    claude

    You should see the Claude Code welcome message and interactive prompt.

  3. Choose your authentication method

    Claude Code offers three authentication options:

    For API usage and billing

    • Connect through the Anthropic Console
    • Complete the OAuth process
    • Requires active billing at console.anthropic.com

    This is ideal for developers who want direct API access and usage-based billing.

  4. Test your setup

    Run a simple command to verify everything works:

    Terminal window
    > create a hello.js file that prints "Hello from Claude Code!"

    Claude should create the file and show you the changes.

Now let’s configure Claude Code for optimal productivity.

Claude Code’s permission system balances safety with efficiency. Choose your preferred mode:

Claude asks permission for each file modification and command. This is the safest option for beginners.

Terminal window
# No special configuration needed
claude

Claude Code uses intelligent model selection by default:

  • Claude Opus 4: For complex reasoning and architecture (until 50% usage)
  • Claude Sonnet 4: For implementation and simpler tasks (cost-efficient)

You can override the default:

Terminal window
# Force a specific model
claude --model opus
claude --model sonnet
# Or configure in settings
/config
  1. Install the Claude Code extension

    The extension auto-installs when you run claude from the integrated terminal.

    Features:

    • Quick launch with Cmd+Esc (Mac) or Ctrl+Esc (Windows/Linux)
    • Diff viewing in IDE
    • File reference shortcuts
    • Diagnostic sharing
  2. Configure terminal for optimal experience

    Run this command to set up proper key bindings:

    Terminal window
    > /terminal-setup

    This enables:

    • Shift+Enter for multiline input
    • Proper escape sequences
    • Better clipboard handling

Claude Code uses CLAUDE.md files to maintain project context across sessions. This is crucial for consistent, high-quality assistance.

  1. Generate initial CLAUDE.md

    Terminal window
    > /init

    Claude analyzes your project and creates a tailored CLAUDE.md file containing:

    • Project structure overview
    • Common commands
    • Detected frameworks and tools
    • Coding standards
  2. Customize for your needs

    Edit the generated CLAUDE.md to include:

    # Project Overview
    This is a Next.js e-commerce application using TypeScript and Tailwind CSS.
    # Key Commands
    - `npm run dev` - Start development server
    - `npm run build` - Build for production
    - `npm test` - Run test suite
    - `npm run lint` - Check code quality
    # Coding Standards
    - Use functional components with hooks
    - Implement proper TypeScript types (no `any`)
    - Follow Airbnb ESLint rules
    - Write tests for all new features
    # Architecture Notes
    - API routes in /app/api
    - Components in /components with .tsx extension
    - Use server components by default
    - Client components only when needed
  3. Use the # shortcut for quick updates

    As you work, quickly add memories:

    Terminal window
    > # Always use Prisma for database queries, never raw SQL

    Claude prompts you to select which memory file to update.

Core Workflow: PRD → Plan → Todo (45 minutes)

Section titled “Core Workflow: PRD → Plan → Todo (45 minutes)”

This is the heart of effective Claude Code usage - a systematic approach to building features.

Start with Documentation & PRD (15 minutes)

Section titled “Start with Documentation & PRD (15 minutes)”

Why start with a PRD? Clear requirements lead to better implementations. Claude excels when given specific context and goals.

  1. Create a feature PRD

    Terminal window
    > Create a PRD for a user authentication system with email/password
    > login, registration, password reset, and session management

    Claude generates a comprehensive PRD including:

    • User stories
    • Technical requirements
    • API endpoints
    • Database schema
    • Security considerations
  2. Refine the requirements

    Review and adjust the PRD:

    Terminal window
    > Add OAuth support for Google and GitHub to the auth PRD
    > Include rate limiting requirements for security
  3. Store in project memory

    Terminal window
    > Save this PRD to docs/features/authentication.md
    > # This project uses JWT tokens with 24-hour expiry

Claude’s thinking modes unlock powerful architectural planning:

For typical features:

Terminal window
> Create a detailed implementation plan for the authentication system

Example planning session:

Terminal window
> Based on our authentication PRD, think deeply about the
> implementation approach. Consider:
> - Security best practices
> - Database design
> - API structure
> - Testing strategy
> - Potential edge cases

Claude will:

  1. Analyze the requirements
  2. Consider multiple approaches
  3. Evaluate trade-offs
  4. Recommend a specific implementation plan
  5. Identify potential challenges

Transform plans into actionable tasks:

  1. Generate structured todos

    Terminal window
    > Convert the authentication plan into a detailed todo list
    > with subtasks and dependencies

    Claude creates:

    ## Authentication Implementation Tasks
    ### 1. Database Setup
    - [ ] Create users table with email, password_hash, created_at
    - [ ] Add indexes for email (unique) and created_at
    - [ ] Create sessions table with user_id, token, expires_at
    - [ ] Write migration scripts
    ### 2. API Endpoints
    - [ ] POST /api/auth/register
    - [ ] Input validation
    - [ ] Password hashing with bcrypt
    - [ ] Email uniqueness check
    - [ ] Create user record
    - [ ] POST /api/auth/login
    - [ ] Validate credentials
    - [ ] Generate JWT token
    - [ ] Set secure HTTP-only cookie
    ...
  2. Execute tasks systematically

    Terminal window
    > Let's start with task 1 - create the database schema

    Claude:

    • Creates the schema files
    • Writes migrations
    • Shows you the changes
    • Waits for approval
  3. Track progress

    Terminal window
    > Mark database setup as complete and move to API endpoints

    Continue through the todo list, with Claude maintaining context and checking off completed items.

MCP (Model Context Protocol) servers extend Claude’s capabilities with external tools.

Enhanced file operations

{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
}
}
}

Enables advanced file searching and bulk operations.

  1. Create MCP configuration

    Add to .claude/mcp.json in your project:

    {
    "mcpServers": {
    "filesystem": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
    },
    "github": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-github"],
    "env": {
    "GITHUB_TOKEN": "${GITHUB_TOKEN}"
    }
    }
    }
    }
  2. Verify MCP connections

    Terminal window
    > /mcp

    This shows:

    • Connected servers
    • Available tools
    • Authentication status
  3. Authenticate if needed

    Some servers require OAuth:

    Terminal window
    > /mcp
    # Select "Authenticate" for servers requiring it

Let’s build a real feature using Claude Code:

  1. Start with requirements

    Terminal window
    > We need a user profile page that shows:
    > - User information (name, email, avatar)
    > - Account settings
    > - Recent activity
    > Plan the implementation but don't write code yet
  2. Create the feature branch

    Terminal window
    > Create a new git branch called feature/user-profile
  3. Implement the UI

    Terminal window
    > Create a UserProfile component using our design system
    > Follow the mockup in designs/user-profile.png

    Claude:

    • Analyzes the design
    • Creates component structure
    • Implements with your framework
    • Uses proper styling
  4. Add data fetching

    Terminal window
    > Implement the API route to fetch user profile data
    > Include proper error handling and loading states
  5. Write tests

    Terminal window
    > Write comprehensive tests for the UserProfile component
    > Include unit tests and integration tests
  6. Fix any issues

    Terminal window
    > Run the tests and fix any failures

    Claude iterates until all tests pass.

  7. Commit and push

    Terminal window
    > Commit all changes with a descriptive message and push

Claude excels at debugging:

Terminal window
> TypeError: Cannot read property 'name' of undefined at UserProfile.tsx:34
> Fix this error

Claude will:

  1. Analyze the error context
  2. Identify the root cause
  3. Implement a fix
  4. Add defensive code to prevent recurrence
  5. Update tests if needed

Claude Code provides sophisticated Git integration:

Terminal window
> What files have I changed?
# Claude runs git status and summarizes
> Commit these changes with a descriptive message
# Claude analyzes changes and writes commit message
> The auth changes should be a separate commit
# Claude creates multiple logical commits

If you have gh CLI installed:

Terminal window
> What are the open issues labeled 'bug'?
> Implement a fix for issue #234
> Create a PR that fixes #234

Create reusable commands in .claude/commands/:

Example: .claude/commands/test-component.md

Please create comprehensive tests for: $ARGUMENTS
Requirements:
- Use React Testing Library
- Test all props variations
- Include accessibility tests
- Mock external dependencies
- Achieve >90% coverage

Usage:

Terminal window
> /test-component UserProfile

Configure in .claude/settings.json:

{
"hooks": [
{
"matcher": "Edit",
"hooks": [
{
"type": "command",
"command": "prettier --write \"$CLAUDE_FILE_PATHS\""
}
]
}
]
}

This automatically formats files after Claude edits them.

Work on multiple features simultaneously:

Terminal window
# Terminal 1
git worktree add ../feature-auth auth-feature
cd ../feature-auth
claude
# Terminal 2
git worktree add ../feature-profile profile-feature
cd ../feature-profile
claude

Each Claude instance works independently without conflicts.

Terminal window
> Fix the bug
> Make it better
> Add some tests
  1. Clear between unrelated tasks

    Terminal window
    > /clear
  2. Use focused queries

    Terminal window
    # Instead of: "analyze the entire codebase"
    > Analyze the authentication module in src/auth/
  3. Reference specific files

    Terminal window
    > Explain how @src/utils/validation.ts works
  • Never include secrets in CLAUDE.md or prompts
  • Use environment variables for sensitive data
  • Review commits before pushing
  • Be cautious with database operations
  • Validate AI-generated security code
TaskCommand
Start new feature> Create a plan for [feature description]
Fix a bug> [paste error] Fix this error
Write tests> Write tests for @src/components/Button.tsx
Refactor code> Refactor the auth module to use hooks
Update docs> Update the README with the new API changes
Code review> Review my changes and suggest improvements
Git operations> Create a PR for this feature

If you see npm permission errors:

Terminal window
claude migrate-installer

This moves Claude Code to ~/.claude/local/

Now that you’ve mastered the basics:

  1. Explore advanced techniques in the tips & tricks section
  2. Set up team workflows with shared CLAUDE.md and commands
  3. Build custom MCP servers for your specific tools
  4. Join the community to share experiences and learn from others

Remember: Claude Code is your AI pair programmer. The more context and clarity you provide, the better it can assist you. Start with simple tasks and gradually tackle more complex challenges as you build confidence.

Pro tip: Keep iterating on your CLAUDE.md file. The better you document your project’s patterns and preferences, the more consistent and helpful Claude becomes.