B7.1Bloom · AnNot started

Skill vs slash vs CLAUDE.md vs hook (by invocation model)

Reading depth

What you'll learn

Pick by invocation: auto-loaded → CLAUDE.md; user-runs-it → slash (prompt-only) or skill (bundle); harness fires it → hook.

  • Invocation model is the canonical decision axis.
  • CLAUDE.md = auto-loaded advisory. Slash = user-invoked prompt-only. Skill = user-invoked instruction-bundle (with assets/menu). Hook = harness-executed on lifecycle event.
  • Skills don't auto-load — 'always-on' rule in a Skill silently won't apply.

All four mechanisms — Skill, slash command, CLAUDE.md, hook — let you codify behaviour. They look interchangeable until you focus on *how each one is invoked*. Invocation model is the canonical axis: it determines whether a rule fires automatically, on user request, on a harness event, or via interpretation by the model.

**CLAUDE.md** is *auto-loaded into project context* every session. The model reads it on every turn; it's advisory and persistent. **Slash command** is *user-invoked one-shot* — the user types `/name`, the body expands as a user message, and that's it. **Skill** is *user-invoked named instruction-bundle* — it appears in a discoverable menu, may bundle assets, and is selected and loaded on demand. **Hook** is *harness-executed* on a named lifecycle event — deterministic, model can't override, the only mechanism with the block primitive (PreToolUse).

The decision rule maps invocation to need. 'Always applies, advisory' → CLAUDE.md. 'User picks and runs' → slash command (prompt-only) or skill (prompt + bundled assets / menu). 'Fires on a harness event regardless of model decision' → hook. The most common confusion is between Skill and CLAUDE.md: Skills don't auto-load (they're user-invoked), so 'always-on' rules in a Skill silently won't apply.

Cross-cutting axis 2: trust requirement (covered in B6.2). If the rule must execute regardless of model decision, only a hook gives that guarantee — even an auto-loaded CLAUDE.md is interpreted by the model. Cross-cutting axis 3: instructions vs. capabilities. A Skill carries instructions; a tool / MCP server carries capabilities. Confusing the two leads to skills that try to encode runnable logic and tools that try to carry workflow.

Key points

  • Invocation model is the canonical decision axis.
  • CLAUDE.md = auto-loaded advisory. Slash = user-invoked prompt-only. Skill = user-invoked instruction-bundle (with assets/menu). Hook = harness-executed on lifecycle event.
  • Skills don't auto-load — 'always-on' rule in a Skill silently won't apply.
  • Hook is the only mechanism with deterministic enforcement and a block primitive.

Examples

'Always-on coding-style guide'

Auto-loaded advisory = CLAUDE.md. Skill silently fails (doesn't auto-load); slash relies on user invocation; hook is over-engineered.

'Reusable release-notes workflow with templates'

User-invoked + bundled assets (templates) + menu discoverability = Skill. Slash command works for the prompt-only case but loses the assets and menu UX.

'One-keystroke rebuild-and-test command'

User-invoked + prompt-only = slash command. Skill is heavier than needed; CLAUDE.md is auto-loaded (wrong invocation); hook fires on events.

Pitfalls

  • Putting 'always-on' rules in a Skill. Skills are user-invoked; the rule won't apply when the user forgets.
  • Putting prompt-only on-demand workflows in a Skill 'for tidiness'. Slash command is lighter and equally appropriate.
  • Treating CLAUDE.md as a hook substitute. Advisory ≠ enforced.
  • Encoding runnable logic in a Skill. Skills are instructions; capabilities belong in tools / MCP servers.

Source notes: 00-academy-basics/notes/07-agent-skills.md

Ask Claude

Build a prompt with this lesson + your question, copy it, and open the Claude Project in a new tab.