Claude Code: Developer Reference

энциклопедия claude code

Claude Code: Developer Reference

From a "smart bash assistant" to cloud agents and custom MCP servers. The whole of Claude Code — the agentic loop, extensions, integrations, SDK. Hands-on practice and deep analysis.

EN Энциклопедии Claude Code claude anthropic AI Agentic development
Языки: EN RU
38Уроки
8Модули
ENEncyclopedia

Содержание

1

The Foundation of Claude Code

1 What Claude Code Is: Agentic Coding in the Terminal Definition, brief product history, the concept of the agentic loop, and the Unix philosophy of composability. How an agent differs from a conventional chat assistant and why that changes the workflow.
2 Installation, Surfaces, and Environments Installation methods (native, Homebrew, WinGet, npm), four surfaces (Terminal, VS Code, JetBrains, Desktop, Web), and the unified engine behind them. Authentication and third-party model providers: Bedrock, Vertex AI, Foundry.
3 Interactive Mode and Session Navigation Claude Code's REPL from the inside: keyboard shortcuts, @-file mentions, the # shortcut for memory, image pasting, and mode switching. How to manage a long session effectively.
4 The Permission Model, Security, and Trust Permission modes (default, acceptEdits, plan, bypassPermissions), allow/deny rules, sandboxing, and prompt injection risks. How to grant the agent exactly as much freedom as it needs.
5 Claude Code Among the Alternatives Positioning relative to Cursor, Aider, GitHub Copilot, OpenAI Codex CLI, and Gemini CLI: where Claude Code wins, where it falls short, and how to choose the right tool for the job.
2

Context, Memory, and Configuration

6 CLAUDE.md and the Memory System The hierarchy of memory files (enterprise/project/user), auto-memory, imports via @path, and the # shortcut. How to write a CLAUDE.md that genuinely improves agent behavior.
7 Context Window Management The context window as a resource: /clear, /compact, /rewind, auto-compact, and the token budget. Context hygiene practices for long and complex tasks.
8 Settings and the Configuration Hierarchy settings.json at the user, project, local, and enterprise levels, environment variables, and priority rules. How to configure permissions, tools, and team behavior for a project.
9 Model Selection and Thinking Modes The Opus/Sonnet/Haiku family, switching via /model, and extended thinking. When to pay for a more powerful model and when a fast one is sufficient.
3

Workflows and Best Practices

10 Typical Workflows: Exploration, Planning, Implementation The explore → plan → code → commit pattern and its variations. How to frame a task so the agent first understands the codebase before taking action.
11 Plan Mode and Test-Driven Development Plan mode for safely designing changes, and the TDD loop with result verification. How to use tests as a feedback loop for the agent.
12 Best Practices and Code Organization Patterns Official Anthropic recommendations: context discipline, CLAUDE.md setup, task decomposition, and multi-agent patterns. What separates an experienced user from a beginner.
13 Git, Commits, and Pull Requests Claude Code's interaction with git: staging, meaningful commits, branches, pull requests, worktrees, and conflict resolution. How to integrate the agent into a team git workflow.
14 Headless Mode and CLI Scripting Non-interactive execution with claude -p, json and stream-json output formats, pipes, and composition with other utilities. How to turn Claude Code into a building block for scripts and pipelines.
4

Extensibility: Commands, Skills, Subagents, Hooks

15 Slash Commands: Built-in and Custom Built-in commands and creating your own in .claude/commands: frontmatter, arguments, and prompt reuse. The easiest way to codify a recurring request.
16 Subagents and Context Isolation Subagents as isolated instances with their own context, their definition in .claude/agents, parallel execution, and agent commands. When delegating a subtask pays off.
17 Skills — Portable Capabilities Agent Skills: the SKILL.md structure, progressive disclosure, nested scripts and files. How to package expertise so it is loaded only when needed.
18 Hooks — Lifecycle Events Hooks as deterministic shell commands triggered on PreToolUse, PostToolUse, Stop, SessionStart, and other events. Auto-formatting, lint gates, and auditing agent actions.
19 Plugins and the Marketplace A plugin as a versioned bundle of commands, subagents, skills, hooks, and MCP servers; the plugin.json manifest and publishing to the marketplace. The canonical way to share extensions.
20 Output Styles and the Status Line Configuring output style and a custom statusline. A small but meaningful personalization of the agent's interface.
21 Choosing Between a Command, Skill, Subagent, MCP, or Hook A decision matrix: which extension mechanism fits which task. A breakdown of overlaps and common selection mistakes across practical scenarios.
5

MCP and Integrations with External Tools

22 Model Context Protocol: Architecture and Fundamentals MCP as an open standard: the client-server model, tools/resources/prompts primitives, history, and its place in the ecosystem. Why the protocol is not tied to Claude Code.
23 Connecting MCP Servers in Claude Code The claude mcp add command, local/project/user scopes, the .mcp.json file, stdio/SSE/HTTP transports, and OAuth for remote servers. How to securely connect a ready-made server to a project.
24 Building Your Own MCP Server Assembling a server with FastMCP and the SDK (Python/TypeScript), exposing tools and resources, debugging with MCP Inspector, and the code-execution-with-MCP approach. From integration idea to working server.
25 In Practice: GitHub, Databases, and Web APIs via MCP A walkthrough of real-world integrations: GitHub, Postgres and other databases, and arbitrary web APIs. Patterns, access security, and common pitfalls.
6

Cloud Agents, Automation, and CI/CD

26 GitHub Actions and Automated Code Review claude-code-action as a wrapper around the Agent SDK: the @claude trigger, setup via /install-github-app, secrets, and automated pull request review. The agent in your CI runner.
27 GitLab CI/CD and Headless Automation Running Claude Code in GitLab pipelines and other CI systems via headless mode. Patterns for automating build tasks, reviews, and routine fixes.
28 Cloud Agents: Web, Routines, and Background Tasks Claude Code on the web, routines on Anthropic infrastructure, background agents in agent view, and /loop. Running long-running and periodic tasks without your machine.
29 Dynamic Workflows and Agent Orchestration Agent commands, a lead agent and subtask distribution, and dynamic workflows. How to assemble multi-agent pipelines for large-scale tasks.
30 Team Integrations: Slack, Chrome, and Remote Control Routing tasks from Slack to PRs, browser automation via Chrome, remote control, and channels (Telegram, Discord, webhooks). Claude Code wherever your team works.
7

Programmatic Access: Agent SDK and Claude API

31 Claude Agent SDK: Building Agents Programmatically An overview of the Agent SDK (TypeScript/Python), the query() function, managing orchestration, tool access, and permissions. The relationship between the SDK, the Claude Code engine, and the GitHub Action.
32 Claude API and the Anthropic SDK: Fundamentals The Messages API, the model family and their identifiers, pricing, and official SDKs. The basic foundation for any programmatic interaction with Claude.
33 Tool Use, MCP, and Streaming in the API Defining tools and the tool use cycle, connecting MCP servers at the API level, and streaming responses. How to give your own application agentic capabilities.
34 Prompt Caching, Batches, and Cost Optimization Prompt caching (the economics of cache writes and reads), the batch API, token counting, and cost-reduction practices. How to make production workloads significantly cheaper.
8

Domain-Specific Applications

35 Web Development and Frontend Debugging The build → test → debug cycle without context switching: Claude in Chrome and the Chrome DevTools MCP (DOM, console, network), and browser connection options. The agent as a frontend developer's assistant.
36 Data, SQL, and Analytics Working with databases via MCP, generating and validating SQL, Jupyter notebook support, and exploratory analysis. Patterns for data engineers and analysts.
37 ML Experiments and Pipeline Management Applying Claude Code in ML: data preparation, running experiments, managing pipelines, and reproducibility. Where the agent accelerates the research cycle and where it requires oversight.
38 Legacy Code, Refactoring, and Large Codebases Navigating unfamiliar and large codebases, safe refactoring, onboarding via CLAUDE.md and subagents. How the agent helps tame inherited complexity and scale.