The complete guide to Claude Code setup (Opus 4.6, Sonnet 4.6, Haiku 4.5). 1M token context window. 100+ hours saved. 25 hook events. Agent teams and task management. Production-tested patterns for skills, hooks, and MCP integration.
What is Claude Code? Claude Code is Anthropic’s official CLI for AI-powered coding assistance, powered by Opus 4.6, Sonnet 4.6, and Haiku 4.5 with a 1M token context window. It provides an interactive terminal experience where you can collaborate with Claude directly in your development environment – including agent teams, task management, and coordinated parallel execution.
What does this guide cover? Complete setup, skills system, hooks, MCP integration, and 240+ proven patterns from production use.
How long to set up? 30 minutes for basic setup, 2-4 hours for full optimization.
Claude Code is installed via the official installer: curl -fsSL https://claude.ai/install.sh | sh (or claude update if already installed). After installation, run claude in your terminal to start an interactive session. You’ll need an Anthropic API key, which you can get from the Anthropic Console. See our Quick Start Guide for complete setup instructions.
Skills are reusable Markdown files with YAML frontmatter (name: and description: with “Use when…” clauses). Claude Code natively discovers all skills from ~/.claude/skills/ and activates them based on your query. No custom hooks needed. Our guide documents 240+ production-tested skills. Learn more in our Skill Activation System documentation.
Deprecated (Feb 2026): The pre-prompt hook was a custom UserPromptSubmit hook that matched skills to queries before Claude Code added native skill loading. Claude Code now discovers and loads skills automatically from ~/.claude/skills/, making custom pre-prompt hooks unnecessary. See the Pre-Prompt Hook Guide for historical reference.
MCP (Model Context Protocol) extends Claude Code with external tools like databases, file systems, and APIs. This guide covers integrations with PostgreSQL, GitHub, Perplexity, Basic Memory, and more. See our MCP Integration Guide.
Skills are Markdown files with YAML frontmatter (name: and description: fields). Claude Code natively discovers all skills in ~/.claude/skills/ and matches them to your queries using the description: field. The key to good activation is writing clear “Use when…” clauses in your descriptions. 240+ skills documented in this guide.
The memory bank is a hierarchical knowledge system that stores project context, patterns, and decisions. It uses a 4-tier structure (always → learned → ondemand → reference) to optimize token usage while maintaining full context access. See Memory Bank Hierarchy.
Claude Code hooks are customizable scripts that run at specific points in the AI workflow. There are 25 hook events (PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, SessionEnd, CwdChanged, FileChanged, and more) and 3 hook types (command, prompt, agent). Hooks can validate inputs, block dangerous operations, inject context, and run background analytics. See our Complete Hooks Guide.
Agents (subagents) are specialized Claude Code workers spawned via the Task tool. Each agent gets its own context window, can use a specific model (sonnet, opus, haiku), has persistent memory, and can be configured with restricted tool access. They enable parallel execution and domain expertise. See our Agents Guide.
Agent teams are an experimental feature where a lead agent coordinates multiple teammate agents working in parallel. Enabled via CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, teams share a task list and mailbox for coordination. The lead can operate in delegate mode (coordination only) or default mode (can also use tools). See our Agent Teams Guide.
Based on production metrics: 100+ hours per year in developer time. Key achievements include 240+ proven patterns, 47-70% token savings per branch, and 25 hook events for full workflow automation.
| Metric | Result |
|---|---|
| Context Window | 1M tokens |
| Models | Opus 4.6, Sonnet 4.6, Haiku 4.5 |
| Time Saved | 100+ hours/year |
| Hook Events | 25 automated |
| Hook Events | 22 documented |
| Hook Types | 3 (command, prompt, agent) |
| Proven Patterns | 240+ documented |
| Agent Patterns | 5 workflow architectures |
| Token Savings | 47-70% per branch |
| Production Skills | 240+ documented |
| MCP Integrations | 13 servers, 70+ tools |
| Chapters | 58 comprehensive |
This guide is built from 14+ months of production use. Every pattern, optimization, and best practice has been tested in real-world development scenarios. We share what works, what doesn’t, and the evidence to prove it.