OKANE LAND

The Primer · Tools & Stacks

Hooks, skills, subagents, plugins, CLAUDE.md: what each is for

Vendor-neutral

A hand-inked context window drawn as a shelf, with CLAUDE.md sitting on it permanently, skills and subagents waiting in a drawer marked on demand, and hooks pinned outside the shelf entirely, the mascot starfish weighing each one.

Five ways to extend Claude Code, and the confusion is real: hooks or skills, skills or subagents, CLAUDE.md or a skill. They differ on one axis that decides everything else, when each one enters the context window. Anthropic just published that axis and rebuilt around it. Here is the tested taxonomy, with the token cost of each measured on a clean session.

The queries tell you where the confusion lives: hooks versus skills, skills versus subagents, CLAUDE.md versus a skill. People reach for one mechanism, get the behavior of another, and cannot tell why. The disambiguation is simpler than the five names suggest, because they all sort on a single axis, and it is the axis that decides your token bill: when each one enters the context window. Always, on demand, or never.

Here is the whole answer up front. CLAUDE.md is always-on: it loads in full at the start of every session and you pay for it every request. Skills and subagents are on-demand: their listings or descriptions cost a trickle, and their real weight loads only when invoked. Hooks are off-context entirely: they run as events and add nothing to the window. Plugins are just packaging. We measured each on a clean session, and the numbers make the axis concrete.

The short version, measured

We ran a trivial one-turn session in an isolated directory and summed the prompt tokens, then added each mechanism one at a time. Claude Code 2.1.204, three runs each, baseline around 25,331 tokens.

MechanismWhen it loadsFixture sizeMeasured startup cost
CLAUDE.mdEvery session, in full8,497 chars~2,505 tokens
SkillName + description always; body on invoke38,920-char body~33 tokens
SubagentDescription always; prompt on spawn30,518-char prompt~34 tokens
HookNever (runs on an event)n/a0 tokens
MCP serverDeferred in 2.1.204n/a~0 tokens

The table is the whole primer. A 39,000-character skill body cost 33 tokens at startup because only its listing loads; an 8,500-character CLAUDE.md cost 2,505 because it loads whole. Put your always-needed rules in the cheap-looking file and you have quietly bought a tax on every turn; put a rarely-needed procedure in CLAUDE.md and you pay for it constantly. The mechanism is the meter.

A hand-inked number line sorting Claude Code mechanisms by when they enter context: CLAUDE.md always at 2,505 tokens, skills and subagents on demand at about 33, and hooks and deferred MCP never at zero.

The always-on tier: CLAUDE.md and memory

CLAUDE.md loads its full content into context at the start of every session, as the docs state and our measurement confirms, which is why the docs also target keeping it under 200 lines: everything in it is billed on every request for the life of the session. Its @path imports resolve up to four hops and also load at launch, so an import tree is an easy way to balloon the always-on cost without noticing. Auto-memory’s MEMORY.md behaves the same way, loading up to 200 lines or 25 KB at session start. The rule that falls out of the numbers: CLAUDE.md is for the handful of instructions that must be true every single turn, and nothing else. If it is only sometimes relevant, it belongs one tier down.

The on-demand tier: skills and subagents

Skills are cheap, not free. The always-loaded part is the listing, a skill’s description plus its when-to-use text, truncated at 1,536 characters by default (configurable via skillListingMaxDescChars). That listing is what cost 33 tokens in our test. The body, however large, loads only when the skill is invoked, and then it stays in context for the rest of the session. If you disable model invocation, the cost drops to zero until you type the command yourself. So a skill is the right home for a long procedure you need occasionally: you pay a sentence to advertise it and the full text only on the turns that use it.

Subagents go further: they run in their own context window. A spawned subagent receives its own prompt, the delegation message, and CLAUDE.md plus git status, does its work in isolation, and returns a result, so a 30,000-character agent prompt cost the parent 34 tokens at rest. The default concurrent limit is 20, and changing it via CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS needs Claude Code 2.1.217 or later. Reach for a subagent when a task would otherwise flood your main context with intermediate work you do not want to keep.

The off-context tier: hooks

Hooks add nothing to the window, which our zero-token measurement confirms. They are shell commands, HTTP endpoints, or prompts that fire automatically at fixed points in the lifecycle, and their output is capped at 10,000 characters before Claude Code diverts it. The distinction from a skill is guarantee versus interpretation: a hook runs deterministically on its event whether or not the model decides it is relevant, while a skill is something the model chooses to invoke. If you need a thing to happen every time, without relying on the model to elect it, that is a hook.

Plugins: the packaging tier

Plugins have no load behavior of their own. A plugin is a bundle that packages skills, subagents, hooks, and MCP servers under one manifest so they can be shared and installed together, via /plugin install. Whatever a plugin costs is the sum of what it contains, priced by the tiers above. Treat “should I install this plugin” as “what does it bundle, and what tier is each piece,” not as a question with its own answer.

The 80% reset, and why it moves your files

There is a reason this taxonomy suddenly matters more, and it is a change Anthropic made to itself. In November 2025 the company published that it “removed over 80% of Claude Code’s system prompt for models like Claude Opus 5 and Claude Fable 5 with no measurable loss on our coding evaluations.” Two qualifiers keep it accurate: the “no measurable loss” is Anthropic’s claim about its own internal evals, not our finding, and the cut applies by model, changelog v2.1.154 makes the lean prompt the default for all models except Haiku, Sonnet, and Opus 4.7 and earlier, which still receive the full prompt. Alongside the cut came the progressive-disclosure moves this piece describes: deferring tool definitions, pushing verification into skills, auto-memory. The direction is consistent: keep the always-on window small, and let everything else load on demand.

A hand-inked before-and-after bar showing Anthropic removing over 80 percent of Claude Code's system prompt for its newest models by its own account, with a note that older models still receive the full prompt.

Does always-on context even earn its tokens?

The evidence cuts both ways, and it is worth holding both. A February 2026 arXiv paper (revised in June) measured always-on AGENTS.md-style context files and found no general gain for about 20% added cost, an argument for keeping the permanent window lean. But a Vercel eval reported a 100% pass rate for an 8 KB AGENTS.md docs index against 79% and 56% ceilings for skills-based approaches on its task, an argument that a well-built always-on index can beat on-demand loading when the task leans on it constantly. The resolution is not a winner; it is the axis again. Always-on context earns its tokens when the model needs it every turn, and wastes them when it does not, which is exactly the judgment the measured table is meant to help you make.

Decision rules

The taxonomy collapses to a few triggers. If the model gets something wrong twice, the fix is a line in CLAUDE.md, the always-on tier. If you have a long procedure you paste occasionally, that is a skill. If a task floods your context with work you will not keep, that is a subagent. If something must happen deterministically on an event, that is a hook. And if you want to share a set of these, that is a plugin. Underneath all of it is the token discipline our cost study and the MCP tax measurement keep landing on, and that our Claude Code guide puts to work: the cheapest context is the context you did not load until you needed it. Every number here is pinned to Claude Code 2.1.204 and the docs as of 2026-08-09; re-run the one-turn test on your version, because loading behavior is precisely what changes between releases.

One email, when there's something worth sending

Get the research in your inbox.

No fixed schedule, no filler. You get an email when we've tested something, run the numbers, or found a tool worth your time.

Free. Double opt-in, unsubscribe in one click.

Which mechanism did you reach for? Compare notes in the forum ↗

Sources

SourceLink
Okane Land measurement (Claude Code 2.1.204, macOS, 2026-08-09): total prompt tokens on a trivial one-turn session per mechanism, three runs and medians. Baseline ~25,331. CLAUDE.md (8,497 chars) added ~2,505 tokens; a 38,920-char skill body added ~33; a 30,518-char subagent prompt added ~34; a hook added 0; a deferred MCP server added ~0. code.claude.com ↗
Claude Code docs, Extend Claude Code features overview (read 2026-08-09): the context-cost-by-feature table states CLAUDE.md loads full content at session start, skills load descriptions at start with the body on invoke, subagents run in their own context, and hooks add nothing at rest. code.claude.com ↗
Claude Code docs, memory / CLAUDE.md (read 2026-08-09): CLAUDE.md is loaded into context at the start of every session; docs target is under 200 lines; @path imports resolve up to 4 hops and load at launch. Auto-memory MEMORY.md loads up to 200 lines or 25 KB at session start. code.claude.com ↗
Claude Code docs, skills (read 2026-08-09): a skill's always-loaded listing is truncated at 1,536 characters by default, configurable via skillListingMaxDescChars; the body loads on invocation and stays for the session; disabling model invocation drops the cost to zero until the command is typed. code.claude.com ↗
Claude Code docs, subagents (read 2026-08-09): a subagent gets its own prompt, the delegation message, and CLAUDE.md plus git status; the default concurrent limit is 20, and the CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS override requires Claude Code 2.1.217 or later. code.claude.com ↗
Anthropic, the new rules of context engineering for Claude Code (2025-11-04) and changelog v2.1.154: Anthropic states it removed over 80% of Claude Code's system prompt for models like Claude Opus 5 and Claude Fable 5 with no measurable loss on its own coding evaluations; v2.1.154 makes the lean prompt the default for all models except Haiku, Sonnet, and Opus 4.7 and earlier. anthropic.com ↗
arXiv 2602.11988 (submitted 2026-02-12, v2 June 2026) and a Vercel eval: measured always-on AGENTS.md-style context files; the arXiv paper found no general gain and about 20% added cost, and the Vercel eval reported a 100% pass rate for an 8 KB AGENTS.md docs index against 79% and 56% ceilings for skills-based approaches. arxiv.org ↗

← The Primer