D3.1’s CLAUDE.md is always-on context. This chapter is the other half of the instruction layer: capabilities the agent loads only when it needs them. A slash command is a stored prompt you trigger by typing /name; a skill is a richer, directory-bundled capability that Claude can also reach for on its own. The exam-relevant facts are that the two have converged, and that a skill’s lazy-loading — and its budget — are what keep it cheap.

Commands and skills have merged

A slash command controls Claude Code from inside a session, and “a command is only recognized at the start of your message. Text that follows the command name is passed to it as arguments.” [Official] Commands · AnthropicT1-official original Alongside the many built-in commands, some entries are bundled skills: “they use the same mechanism as skills you write yourself: a prompt handed to Claude, which Claude can also invoke automatically when relevant. Everything else is a built-in command whose behavior is coded into the CLI.” [Official] Commands · AnthropicT1-official original

That same mechanism is why the two authoring formats have converged: “Custom commands have been merged into skills. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and work the same way. Your existing .claude/commands/ files keep working.” [Official] Extend Claude with skills · AnthropicT1-official original Old flat-file commands still run; skills are the recommended form for new work because they add directory bundling, frontmatter, and auto-invocation.

Skills are lazy-loaded directories

A skill is “a markdown directory: .claude/skills/<name>/SKILL.md,” with optional supporting files (reference.md, scripts/, and the like) alongside. [Official] Extend Claude with skills · AnthropicT1-official original The reason a skill is cheap is its loading model — unlike CLAUDE.md, which loads every session: “skills load on demand. The agent receives skill descriptions at startup and loads the full content when relevant.” [Official] Extend Claude with skills · AnthropicT1-official original Each description is roughly 100 tokens; the full body materializes only when the skill is invoked, “enters the conversation as a single message and stays there for the rest of the session,” and is not re-read on later turns. [Official] Extend Claude with skills · AnthropicT1-official original

The lazy-load lifecycle in full

The “cheap” story has a budget and a lifecycle the exam can probe at each stage:

One operational nicety: live change detection — adding, editing, or removing a skill under ~/.claude/skills/, the project’s .claude/skills/, or an --add-dir directory takes effect within the current session, no restart — the one exception being a brand-new top-level skills/ directory that did not exist at launch. [Official] Extend Claude with skills · AnthropicT1-official original

SKILL.md frontmatter and the four scopes

The SKILL.md frontmatter is where a skill declares its behavior. Among the fields: name (display name in skill listings, defaults to the directory name — the directory name, not this field, sets the /command you type, except for a plugin-root SKILL.md), description (drives auto-invocation; description + when_to_use capped at 1,536 chars by default), argument-hint, disable-model-invocation, user-invocable, allowed-tools (CLI-only), model, effort, context, and paths (glob patterns that limit when the skill activates). [Official] Extend Claude with skills · AnthropicT1-official original

Skills resolve across four scopes by precedence — “enterprise > personal > project; plugin skills use a plugin-name:skill-name namespace and never conflict”: Enterprise (managed settings, all users), Personal (~/.claude/skills/, all your projects), Project (.claude/skills/, auto-discovered from cwd up to repo root), and Plugin (namespaced). [Official] Extend Claude with skills · AnthropicT1-official original

Who can invoke it

Two frontmatter switches decide who may call a skill. user-invocable: false hides it from the / menu so only Claude can invoke it; disable-model-invocation: true does the inverse — only the user can trigger it via /, Claude cannot auto-invoke, its description is kept out of context, and it also blocks subagent preloading. [Official] Extend Claude with skills · AnthropicT1-official original Between them you can build a skill that is purely automatic, purely manual, or both.

Practice

Exercise solutions

Solution ↑ Exercise

B. A skill lazy-loads: only its ~100-token description sits in context at startup, and the full 2,000-token body loads on invocation — and Claude can auto-invoke it when a deploy is relevant. A is the D3.1 budget mistake: a CLAUDE.md is loaded every session, so the whole 2,000 tokens would be spent on every unrelated turn. C is wrong on the “only way” claim — commands have merged into skills, so .claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both create /deploy; the skill form is recommended. D defeats the point of a reusable capability. The skill is the form that is both cheap (lazy) and discoverable (auto-invocable).

Solution ↑ Exercise

disable-model-invocation: true keeps the skill’s description out of startup context entirely — so unlike an ordinary skill (whose ~100-token description Claude sees and can match against), the model is never told this skill exists. That is exactly the point for a risky release action: it forces a human to type /force-release, because Claude cannot auto-invoke something it cannot see. The teammate got the intended safety behavior; “Claude doesn’t know it exists” is the feature, not a bug. (If they wanted Claude to know about it but still gate execution, that is a permission/ask concern, not this flag.)

Solution ↑ Exercise

(a) Only the ~100-token description enters context at session start, counted against the skill-listing budget (default 1% of the model’s context window); the ~3,000-token body does not load yet. (b) The body loads on invocation, enters as a single message, and stays for the rest of the session (it is not re-read each turn). If a compaction fires, the body is carried forward within a budget — up to the first 5,000 tokens of each most-recently-invoked skill, capped at a combined 25,000 tokens post-compaction.

Exam essentials

Further reading

The deeper craft — how to write a description that gets discovered, when to extract a skill out of CLAUDE.md, and the progressive-disclosure design behind all of this — is developed in the Agentic Systems Design book, Chapter 5, Skills & Progressive Disclosure. Optional depth; this chapter stands on its own.