Skip to content

Claude Code

Claude Code is Anthropic’s coding assistant that runs in your terminal. It can read files, edit code, run commands, and iterate on a task until you stop it or it finishes.

Claude's capabilities


Claude Code follows an agent loop: gather context, take action, verify, repeat.

flowchart TD
    A["You send a prompt"] --> B["Gather context"]
    B --> C["Take action"]
    C --> D["Verify results"]
    D --> E{"Done?"}
    E -->|No| B
    E -->|Yes| F["Return final result"]

In practice, that means it may search files, inspect code paths, edit files, run tests, and then iterate.


Claude Code usually explores a codebase on demand using file search and reads, then loads what it needs into context. It is not limited to a pre-selected set of files.

Claude Code context gathering


CategoryExamples
File operationsRead, create, edit, rename files
SearchFind files, grep/regex style lookup
ExecutionRun tests, scripts, git commands
WebLook up docs or troubleshooting info
OrchestrationUse subagents for parallel work

Use caseExample prompts
Codebase orientation”Explain auth flow in this repo”
Feature work”Add rate limiting to this endpoint and add tests”
Debugging”Investigate this stack trace and fix root cause”
Refactoring”Rename this API and update all references”
Review support”Review this diff for regressions and missing tests”

Claude Code uses two memory layers:

  • CLAUDE.md files that you write (project/team/user guidance)
  • Auto memory that Claude writes based on repeated corrections/preferences

CLAUDE.md file locations

Claude also loads CLAUDE.md and CLAUDE.local.md files while walking up the directory tree from your current working directory, and can load subtree-specific guidance when working in those folders.

NeedCommand
Create starter project guidance/init
View/edit loaded memory files/memory
Start fresh conversation/clear
Compact long history/compact
Resume older conversation/resume

Claude Code supports MCP for connecting tools and data sources (issue trackers, docs, databases, monitoring systems, etc.).

Terminal window
# Local stdio server
claude mcp add my-server -- /path/to/server
# Remote HTTP server
claude mcp add --transport http my-server https://example.com/mcp
# Remote SSE server
claude mcp add --transport sse my-server https://example.com/sse

Use /mcp inside Claude Code to manage connections and authentication.


As of April 20, 2026, Anthropic recommends native installers first.

Terminal window
# macOS / Linux / WSL (recommended)
curl -fsSL https://claude.ai/install.sh | bash
# Windows PowerShell (recommended)
irm https://claude.ai/install.ps1 | iex
# Alternatives
brew install --cask claude-code
winget install Anthropic.ClaudeCode

npm install -g @anthropic-ai/claude-code still exists for compatibility, but it is no longer the primary recommendation.

Then start in your project:

Terminal window
claude

Pricing and plan details change often, so avoid hard-coding numbers in docs.

As of April 20, 2026:

  • The free Claude.ai plan does not include Claude Code access
  • Access is available via paid Claude plans or Anthropic Console/API billing
  • Team and enterprise usage is generally usage-based and policy-controlled
  • Check the official pricing page for current limits and cost details

Command availability can vary by version, platform, and plan. Use /help for the exact list in your installed version.

Common commands:

CommandPurpose
/helpList available commands
/initGenerate or improve project CLAUDE.md
/modelSelect model
/memoryManage memory files and auto memory
/mcpManage MCP servers/auth
/clearStart a fresh conversation
/compactReduce context usage
/reviewRun code review workflow
/rewindRewind session/code state
/doctorDiagnose installation/setup
/costShow token-cost estimates (especially for API usage)
/statsShow usage patterns

You can create reusable project or user commands with markdown files.

  • Project scope: .claude/commands/
  • User scope: ~/.claude/commands/

Example:

.claude/commands/fix-pr.md
Review the current branch diff against main.
List likely bugs, missing tests, and risky changes.
Suggest concrete fixes.

Run it in-session as:

Terminal window
/fix-pr

The VS Code extension adds a UI on top of Claude Code with:

  • Inline diff review before applying edits
  • Accept/reject controls for proposed changes
  • File @ mentions (including line ranges)
  • Plan review and conversation history in-editor

Good fitBetter alternative
Multi-step coding tasks across filesSingle quick Q&A without code changes
Debugging with logs/tests/commandsTasks where terminal access is not appropriate
Repo-wide refactors or cleanupWorkflows requiring strict manual-only editing
Repetitive engineering choresOne-off tasks easier done directly in IDE

  • Claude Code is a terminal-first coding assistant with tool use
  • It works iteratively: inspect, change, verify, repeat
  • CLAUDE.md and auto memory provide persistent context
  • MCP extends it to external tools and systems
  • Installer and command surface evolve quickly, so verify with official docs