AI Model Wiki

    Skip to main content
    10 min read
    Lesson 1 of 5

    What Is Claude Code & Why It Matters

    From the course Claude Code: AI Terminal Agent

    Claude Code is Anthropic's agentic coding assistant that runs directly in your terminal. Unlike IDE-integrated copilots, Claude Code operates as a full autonomous agent capable of understanding your entire codebase, making multi-file edits, and executing shell commands.

    Key Differentiators

    FeatureClaude CodeTraditional Copilots
    EnvironmentTerminal-nativeIDE plugin
    ScopeEntire codebaseSingle file/function
    AgencyPlans + executes multi-step tasksSuggests completions
    Tool useRuns commands, reads files, searches webCode suggestions only
    ContextFull project understandingLimited window

    Installation & Setup

    npm install -g @anthropic-ai/claude-code
    cd your-project
    claude
    

    How It Works

    1. Claude Code indexes your project structure and key files
    2. You describe what you want in natural language
    3. It creates a plan, shows you what it intends to do
    4. Executes edits across multiple files with your approval
    5. Can run tests, lint, and verify changes automatically

    Permission Model

    Claude Code has three permission levels:

    • Ask — Confirms every file write and command
    • Auto-edit — Writes files freely but asks before commands
    • YOLO — Full autonomy (use with caution)

    The CLAUDE.md File

    Create a CLAUDE.md at your project root to give Claude persistent context:

    • Project architecture and conventions
    • Key commands (build, test, lint)
    • Style guidelines and patterns to follow
    • Common gotchas and workarounds

    Minimal CLAUDE.md Template to Get Started

    # Project: <Your Project Name>
    
    ## Stack
    - Runtime: Node.js 22 + TypeScript 5
    - Framework: Next.js 15 (App Router)
    - DB: PostgreSQL via Prisma
    
    ## Key Commands
    - npm run dev     — start local dev server (port 3000)
    - npm test        — Jest unit tests
    - npm run build   — production build
    - npm run lint    — ESLint + Prettier check
    
    ## Conventions
    - Functional components only, no class components
    - Server components by default; add "use client" only when needed
    - Error boundaries wrap all async page components
    - All API routes validate input with Zod
    
    ## Do Not
    - Do not use any library not already in package.json without asking first
    - Do not modify the database schema without creating a Prisma migration
    

    This 20-line file saves dozens of clarifying back-and-forths per session and produces dramatically more accurate first attempts.

    Best Practice — Use /compact Regularly

    Claude Code accumulates context over a long session. After every 3-4 major tasks, run /compact to compress the conversation history. This reduces token costs by 40-60% and often improves response quality because the model is no longer attending to stale early-session context that is no longer relevant.

    Common Pitfall — Vague Multi-Goal Prompts

    "Improve the codebase" is the least effective instruction you can give Claude Code. It will make changes — often stylistic ones you didn't want. Always scope prompts to a single, verifiable outcome: "Add Zod validation to the POST /api/users route. The schema should require email (valid format), name (2-50 chars), and role (enum: admin | member | viewer)."

    Key Takeaways

    • •Claude Code is a terminal-native agentic coding tool with full codebase understanding
    • •It plans and executes multi-file edits autonomously with your approval
    • •CLAUDE.md provides persistent project context for better results
    • •Permission levels let you control autonomy from cautious to fully autonomous
    0 of 5 lessons marked complete

    Progress is kept in this browser only.