Claude Code reveals 5-layer architecture
- Anthropic’s Claude Code docs now spell out the extension stack behind the coding agent — CLAUDE.md, skills, hooks, subagents, MCP, and plugins. - The key detail is where each layer sits: CLAUDE.md is always loaded, hooks fire on lifecycle events, and plugins bundle skills, agents, hooks, and MCP. - It matters because Anthropic is shifting Claude Code from “AI pair programmer” toward a controllable agent platform for teams.
Claude Code is not really “a chatbot that can use bash.” That’s the wrong mental model. It’s an agent runtime with a bunch of extension points layered around the model — some always on, some event-driven, some isolated, some connected to outside systems. Anthropic’s latest docs finally make that architecture legible, and that matters because the product is moving from solo coding helper to team-scale automation surface. The interesting news is not a new model. It’s the control plane. (code.claude.com) ### What actually got clarified? Anthropic’s Claude Code docs now lay out the extension layer in one place: CLAUDE.md, skills, subagents, hooks, MCP, and plugins. The docs frame these as parts of the agentic loop, not random add-ons. CLAUDE.md adds persistent context, skills add reusable workflows, MCP connects external services, subagents run isolated loops and return summa(code.claude.com)ces for reuse. (code.claude.com) ### Why does CLAUDE.md sit at the bottom? Because it’s the always-on layer. Anthropic describes CLAUDE.md as persistent context loaded every conversation — basically the project memory Claude should see before it starts making decisions. In larger repos, Claude walks up the directory tree to discover multiple CLAUDE.md files, and Anthropic tells teams to keep them under 200 (code.claude.com)t makes this less like chat history and more like a standing operating manual. (code.claude.com) ### What are skills for? Skills are the reusable middle layer. Anthropic describes them as markdown files containing knowledge, instructions, or workflows that you can call directly — like `/deploy` — or let Claude load automatically when relevant. The point is to stop re-explaining the same process over and over. If CLAUDE.md is policy, skills are playbooks. They hold the r(code.claude.com)every session by default. (code.claude.com) ### Why do hooks matter so much? Hooks are where the system stops being “advice” and starts becoming automation. They can run scripts, HTTP requests, prompts, or even subagents when specific events happen — session start, tool use, stop, file changes, permission requests, and more. That means teams can force linting, logging, notifications, policy checks, or test runs at the(code.claude.com)he agent into your workflow instead of hoping the model remembers your preferences. (code.claude.com) ### Why use subagents instead of one long session? Context control. Anthropic’s docs describe subagents as isolated execution contexts that return summarized results. That isolation matters because long-running agent sessions get messy fast — too many files, too many branches of reasoning, too much junk in context. A subagent can go do a research task or a focused coding task, then hand(code.claude.com)tern for parallel development and specialized workers since at least September 2025. (code.claude.com) ### Where does MCP fit? MCP is the bridge to external systems — databases, ticket trackers, browsers, internal APIs. Anthropic’s framing is simple: use MCP when Claude needs to reason over outside state or take actions beyond the local repo. That is a different job from skills or CLAUDE.md. Those shape behavior. MCP expands reach. Once you see that split, the architecture makes more sense. (resources.anthropic.com) ### So what are plugins really packaging? Plugins are the distribution layer. Anthropic says a plugin can bundle skills, agents, hooks, and MCP servers into one installable unit. That’s important because it turns a clever local setup into something a team can standardize and share. Instead of every developer hand-rolling the same stack, a company can package its workflow once and install it everywhere. (code.claude.com) ### How does persistent memory fit the bigger push? This is where Claude Code starts to blur into Anthropic’s broader agent platform. Managed Agents sessions start fresh by default, but Anthropic’s memory stores let agents keep durable files across sessions, with version history and read/write controls. So the broader direction is clear: transient model context for the task, (code.claude.com)asically, Anthropic is building an agent system that can be steered, audited, and reused — not just prompted. (platform.claude.com) ### Bottom line? The real reveal is not “Claude Code has five layers.” It’s that Anthropic now wants users to think in layers at all. That’s a platform story. Once developers understand which parts are persistent, which are callable, which are event-driven, and which reach outside the repo, Claude Code looks less like a coding assistant and more like a programmable operating environment for software work. (code.claude.com)