Claude Code in Practice: 7 Mechanisms You Need to Know

Anthropic has added over a dozen mechanisms to Claude Code that fundamentally change how developers work with code. CLAUDE.md, skills, subagents, plugins, and MCP — these are the building blocks of an ecosystem that deserves a closer look.

TL;DR: Claude Code offers a configurable ecosystem of tools: the CLAUDE.md file stores project context, skills automate repetitive tasks, subagents enable work delegation, plugins extend functionality, and MCP standardizes communication with external servers. Understanding these mechanisms leads to more effective daily work.

How Does the CLAUDE.md File Work and Why Is It the Foundation of Configuration?

The CLAUDE.md file is the central configuration point for every project in Claude Code. According to the documentation, it works like the .cursorrules file known from Cursor — it defines rules, conventions, and context that Claude applies during a session. In my opinion, this is the most important element of the entire ecosystem, because without proper context, even the best model generates unnecessary code.

Andrej Karpathy identified four main problems with Claude Code and built a CLAUDE.md file that solves them. His principles are: Think Before Coding, Simplicity First, Surgical Changes, and Goal-Driven Execution. Installing these principles takes less than two minutes. The source code is available in the andrej-karpathy-skills repository on GitHub.

Each of these principles addresses a specific problem. For example, Think Before Coding forces the model to analyze the structure before generating code. Simplicity First prevents overengineered solutions. Surgical Changes guarantees minimal diffs. I recommend testing this approach in every project.

It is also worth checking out Boris’s approach, described on Arpan Patel’s blog. Boris creates CLAUDE.md in the .claude directory, placing coding conventions, dependencies, and architecture there. Additionally, the CLAUDE.local.md file stores machine-specific configuration that does not end up in the repository.

What Are Skills in Claude Code and How Do You Create Them?

Skills are a mechanism for automating repetitive tasks in Claude Code. They work like saved workflows that you can invoke with a single command. The andrej-karpathy-skills repository on GitHub demonstrates how a single skill can improve Claude Code’s behavior by applying Karpathy’s programming principles.

Creating a skill involves defining a markdown file with instructions that Claude interprets. For example, a skill can contain a step-by-step code review process, application deployment, or test generation. A skill loads context, executes the task, and returns the result.

In practice, this is straightforward. You create a file in the .claude/skills directory, add instructions in markdown format, and invoke it with /skill name. Claude reads the file, interprets the instructions, and executes the task according to the defined workflow.

How Do Subagents and Plugins Extend Claude Code’s Capabilities?

Subagents allow Claude Code to delegate specialized tasks to separate instances. Instead of one agent doing everything, a subagent specializes in a specific domain — for example, security analysis or documentation generation. Arpan Patel’s blog describes how the Anthropic team uses subagents to divide work into smaller, manageable pieces.

Plugins work similarly to other tools — they add new functionality without modifying the core. Claude Code supports plugins that can add new commands, integrations with external services, or custom output formats. For more on plugins in a competitive context, see the article OpenAI Codex Gets Plugins — Catching Up with Claude Code and Gemini CLI.

The subagent mechanism is useful when a project has multiple layers. For example, one subagent can manage the frontend, another the backend, and a third the database. Each has its own context and instructions, which reduces the risk of errors caused by context overload.

It is worth testing how subagents perform in large projects. Instead of one long prompt, you divide the work into specialized tasks. This approach reduces hallucinations and improves the quality of results.

How Does MCP Standardize Communication with External Servers?

Model Context Protocol is a protocol that standardizes how Claude Code communicates with external servers and data sources. Instead of writing integrations for each service separately, MCP provides a single interface. The Claude Code CLI guide describes MCP as one of the main mechanisms for extending the tool’s functionality.

MCP acts as an intermediary layer between Claude Code and external servers. For example, an MCP server can provide access to a database, third-party APIs, or DevOps tools. Claude Code connects to the server, discovers available tools, and uses them within a session.

Configuring MCP requires adding an entry to the Claude Code configuration file. Each server has its own endpoint and set of tools. After adding a server, Claude automatically recognizes the available functions and can use them without additional configuration.

ComponentFunctionExample Use Case
CLAUDE.mdProject contextCoding conventions, architecture
SkillsTask automationCode review, deployment, tests
SubagentsWork delegationFrontend, backend, DevOps
PluginsFeature extensionNew commands, integrations
MCPServer communicationDatabases, external APIs

Which Claude Code Commands Are Underrated and How Should You Use Them?

The Claude Code documentation lists commands that most users skip. Arpan Patel’s blog highlights /goal and /insights as tools that change the way you work. The /goal command lets you define the session’s objective, which helps Claude stay on track. Meanwhile, /insights generates a summary of what Claude has learned while working on a project.

Other useful commands include /ultraplan, which I cover in more detail in the claude code /ultraplan article, and session management commands. For a full overview of available commands, see Claude Code Review — Claude Code Docs.

Setting /goal at the beginning of every session is worth the effort. It ensures Claude knows the objective and does not drift off course. This is especially useful during long sessions where context can become blurred.

What Workflow Patterns Does the Anthropic Team Recommend?

The Anthropic team uses specific workflow patterns that Arpan Patel describes on his blog. First and foremost, they recommend keeping context in the CLAUDE.md file, using skills for automation, and subagents for dividing work. They additionally recommend regularly updating the CLAUDE.md file to reflect the current state of the project.

These patterns are based on the principle that better context produces better results. Instead of relying on the model’s guesses, the Anthropic team provides clear instructions, conventions, and constraints. This approach reduces the number of iterations and improves the quality of generated code. For more on tool updates, see Changelog — Claude Code Documentation.

A practical pattern is keeping the CLAUDE.md file in the repository so every team member has access to the same context. The CLAUDE.local.md file serves for machine-specific configuration, such as paths to local tools.

Another pattern is using skills to standardize processes across a team. For example, a code review skill ensures that every team member applies the same criteria. This approach is described in the guide Claude Code CLI Guide: Installation, Configuration, Commands, and Environment Variables.

Understanding these mechanisms enables more effective use of Claude Code in daily work.

What Mistakes Do Claude Code Users Make Most Often?

The most common mistake is the absence of a CLAUDE.md file or its content being too generic. Karpathy identified four main problems: the model generates code without analysis, creates overengineered solutions, introduces large changes instead of minimal diffs, and loses sight of the goal. These problems affect every project, regardless of scale.

Karpathy noticed that Claude Code tends to overcomplicate solutions. Instead of a simple fix, the model adds new abstraction layers, changes naming conventions, and modifies files that do not need to be touched. This is why the Simplicity First principle is so important — it forces the model toward minimalism.

Another frequent mistake is relying solely on ad-hoc prompts. The user types a command, gets a result, and moves on. Without saved context in CLAUDE.md, every new session starts from scratch. This leads to inconsistency and repeating the same mistakes.

  • Missing CLAUDE.md file or content that is too generic
  • Ignoring the Think Before Coding principle
  • Overengineered solutions instead of surgical changes
  • No saved context between sessions
  • Not using skills for repetitive tasks
  • Skipping the /goal command at the start of a session
  • Sessions that are too long without splitting into subagents
  • Irregular updates to the CLAUDE.md file
  • No CLAUDE.local.md configuration for the local environment

What Are the Best Practices for Configuring the CLAUDE.md File?

Boris, described on Arpan Patel’s blog, creates CLAUDE.md in the .claude directory divided into sections: coding conventions, module dependencies, project architecture, and testing instructions. He additionally uses CLAUDE.local.md for machine-specific configuration. This approach separates universal context from local settings.

Boris’s practice involves updating CLAUDE.md after every significant change in the project. For example, adding a new dependency or changing the architecture requires updating the file. This way, Claude always has up-to-date context. The file goes into the repository, so the entire team benefits from the same information.

Karpathy’s principles provide a solid starting point. Think Before Coding forces analysis before coding. Simplicity First prevents overengineering. Goal-Driven Execution keeps the focus on the objective.

It is also worth adding test information to CLAUDE.md. Karpathy recommends specifying how to run tests, which testing frameworks are used, and what the code coverage is. Claude then generates code that aligns with existing tests.

CLAUDE.md SectionContentWho Updates It
Coding conventionsStyle, naming, formattingEntire team
ArchitectureModules, dependencies, patternsArchitect
TestsFrameworks, commands, coverageDevelopers
CLAUDE.local.mdLocal paths, toolsIndividual user

How to Integrate Claude Code with MCP in Practice?

MCP (Model Context Protocol) standardizes communication between Claude Code and external servers.

In practice, MCP integration works as follows. First, you configure an MCP server — this can be a server providing access to a database, an external API, or DevOps tools. Then you add an entry to the Claude Code configuration with the endpoint address.

For example, an MCP server can provide access to PostgreSQL. Claude Code connects to the server and can execute SQL queries directly from the terminal. This eliminates the need to switch between tools and keeps context within a single session.

Configuring MCP requires knowledge of endpoints and the protocol. The Claude Code documentation includes examples for configuring popular servers. It is best to start with one server and gradually add more, rather than configuring everything at once.

  • Add an entry to the Claude Code configuration file
  • Specify the MCP server endpoint
  • Define available tools
  • Test the connection before using in production
  • Add servers gradually, not all at once
  • Document the configuration in CLAUDE.md
  • Check connection logs when troubleshooting
  • Use ready-made servers from the documentation

What Open-Source Tools Extend Claude Code’s Functionality?

The Claude Code ecosystem is growing thanks to open-source tools created by the community. Claude Code Companion lets you control Claude Code from Telegram, enabling remote session management. Claw-code is a ground-up reimplementation of Claude Code, offering an alternative approach to architecture. Claude-warmup manages the 5-hour usage window of Claude Code.

Claude Code Companion acts as a bridge between Telegram and Claude Code. You send a command via Telegram, and Claude Code executes it on your computer. This is useful when you want to start a task remotely, such as a deployment or test run, without terminal access.

Claw-code is an open-source project that rewrites Claude Code from scratch. It offers a different architecture and approach to context management. Although it is in early stages of development, it shows that the community is actively experimenting with Claude Code concepts.

Claude-warmup solves the problem of Claude Code’s 5-hour usage window. The tool manages sessions to maximize available time. This is particularly important for users who want to maintain work continuity without interruptions for re-authentication.

What Are the Differences Between Skills and Subagents?

Skills are saved workflows invoked with a single command. Subagents are separate Claude Code instances specializing in a specific domain. Skills operate within a single session, while subagents can operate independently.

Skills are simpler to configure. You create a markdown file in the .claude/skills directory and invoke it with /skill name. Subagents require more complex configuration — each subagent has its own context, instructions, and scope of responsibility. Arpan Patel describes how the Anthropic team uses subagents to divide work into frontend, backend, and DevOps.

The choice between skills and subagents depends on task complexity. For simple, repetitive processes, skills are sufficient. For complex, multi-module projects, subagents offer better work organization. You can combine both approaches — skills for automation, subagents for specialization.

FeatureSkillsSubagents
ComplexitySimple workflowsSpecialized tasks
ConfigurationMarkdown fileOwn context + instructions
Invocation/skill nameAutomatic delegation
Use caseRepetitive processesComplex multi-module projects

Frequently Asked Questions

How to quickly configure CLAUDE.md in an existing project?

Copy the CLAUDE.md file from the andrej-karpathy-skills repository to the .claude directory of your project and adapt the sections to your needs. Installation takes less than two minutes.

Does MCP work with any external server?

MCP requires a server compatible with the Model Context Protocol. The Claude Code CLI guide (Blake Crosley, 2025) lists several ready-made MCP servers, including PostgreSQL, GitHub, and Slack. Each server must implement the standard tool interface.

How many skills can be defined in a single project?

There is no limit on the number of skills. The andrej-karpathy-skills repository (GitHub, 2025) shows that even a single skill can significantly improve Claude Code’s behavior. It is best to start with 2-4 skills for the most common tasks and gradually add more.

How do subagents affect token consumption?

Subagents increase token consumption because each one has its own context. Arpan Patel’s blog (2025) recommends using subagents only for complex multi-module projects where the division of labor justifies the additional cost. For simple tasks, skills are more economical.

Summary

Claude Code is a tool that requires deliberate configuration. Karpathy’s principles — Think Before Coding, Simplicity First, Surgical Changes, and Goal-Driven Execution — form a solid foundation.

Key takeaways:

  • The CLAUDE.md file is the foundation — without it, Claude Code works in the dark
  • Skills automate repetitive tasks and standardize processes
  • Subagents excel in complex, multi-module projects
  • MCP standardizes communication with external servers
  • Open-source tools extend Claude Code’s functionality
  • Regular configuration updates improve result quality
  • The /goal and /insights commands help manage sessions

Before you start working with Claude Code, install Karpathy’s principles from the andrej-karpathy-skills repository. It takes two minutes that will save hours of frustration. Then add skills for your most common tasks and test MCP with a single server.