The Loop  ·  Issue 016

The Loop

A field journal of the AI frontier — for engineers who ship.

§ Guides

By AI Blog Editor
Apr 20, 2026 · 1 min read

A field guide to Claude Code: CLAUDE.md, hooks, skills, plugins

Four primitives, often confused: the passive memory, the deterministic harness layer, the model-invoked capability, and the bundle. A pragmatic walkthrough, with diagrams and a decision picker.

Four things Claude Code gives you show up over and over in the docs — CLAUDE.md, hooks, skills, plugins — and they're easy to confuse. They sound adjacent. They sometimes live in the same directory. They each make Claude behave differently, for different reasons, at different moments in a turn.

This piece lays each one out, shows where it fits in the lifecycle, and gives you a quick way to decide which one to reach for. By the end, "should this be a hook or a skill?" should answer itself.

CONTEXTHARNESSMODELCLAUDE.MDProject memoryalways loadedHOOKSEvent-driven scriptsharness runs themPLUGIN (BUNDLE)any combination above, installed as oneSKILLSModel-invoked+ AGENTS / CMDSAlso bundledCLAUDEReads context. Decides tools.auto-includedfire on eventsmodel invokes
Fig. 1 — where each concept lives in the Claude Code lifecycle

CLAUDE.md — the thing that's always there

CLAUDE.md is passive context. It's a Markdown file Claude Code auto-loads into the conversation. You write it; nobody runs it. Every prompt, every turn, it's sitting there.

It answers the question "what should Claude assume about this project before I even say anything?" Stack choices, house rules, the name of the canonical db pool, the fact that you use vitest not jest. Stable facts.

There are three scopes: project-level (in the repo), user-level (your home directory), and enterprise-level (org-wide). They stack — more specific overrides more general.

CLAUDE.md is the only one of the four that Claude cannot choose to ignore. The harness puts it in the context window, period.

Hooks — the deterministic harness layer

Hooks are shell commands the harness runs on lifecycle events. They are not code the model writes; they're entries you put in settings.json that fire when something specific happens.

The event taxonomy includes UserPromptSubmit, PreToolUse, PostToolUse, Stop, SessionStart, and a handful of others. Each can take a matcher (which tool? which file?) and a command. The command's exit code and stdout can block the action, append context to the turn, or just run quietly.

Use hooks for "I want X to happen without Claude deciding to do it." Formatting on save. Secret redaction before submit. A notification when the turn ends. Running your test suite after every edit.

Skills — capabilities the model reaches for

Skills are on-demand, model-invoked packages. Each one lives in a folder with a SKILL.md: frontmatter declaring name and description, plus body instructions the model reads when it decides to use the skill.

The key word is decides. Unlike CLAUDE.md (always loaded) and hooks (harness-triggered), a skill is surfaced to the model as available, and the model picks it up when the description matches the task. Because the full content only loads on invocation, skills can be long and specific without bloating every turn.

Think of them as specialized playbooks. A frontend-design skill. A migration-review skill. A skill that knows your company's release notes template. The SKILL.md can reference helper scripts, prompt templates, and reference docs — all loaded lazily.

Plugins — the distribution layer

Plugins are bundles. A plugin is a packaged directory that can contain any mix of skills, subagents, slash commands, hooks, and MCP server definitions. It has a .claude-plugin/plugin.json manifest, it's installable from a marketplace, and it's the only one of these four concepts that isn't itself a runtime primitive.

You reach for a plugin when you want teammates to install the same toolkit with a single command, or when you want to publish something for the wider community. "Our engineering plugin" could bundle the migration-review skill, a hook that runs typecheck after edits, a release-notes subagent, and a postgres MCP server — all installed together.

  1. CLAUDE.mdalready in context before the turn begins
  2. Hook (UserPromptSubmit)optional: append context, redact secrets, block
  3. Claudereads context; decides to use a Skill? a Tool?
  4. Skillmodel invokes; SKILL.md content loads into the turn
  5. Hook (PreToolUse)runs before any tool; can block or modify
  6. Tool (Edit/Bash/…)the actual work
  7. Hook (PostToolUse)lint, format, validate, notify
  8. Hook (Stop)cleanup at end of turn
Fig. 3 — one turn, annotated. Rust-colored rows are model-facing, navy rows are harness-run.

So which do I use?

Here's the decision, as a radio group. Pick the sentence that matches your need; the right tool and a concrete example appear on the right.

Interactive · § pick one

What do you actually need?

Pick what you need
ConceptWho triggers itWhen it runsBehaviourLives in
CLAUDE.mdYou, in a fileAlways (auto-loaded)Never runs — it is passive contextText in a repo file
HookThe harnessOn events (pre-tool, post-tool, submit, stop…)Deterministic — your shell commandsettings.json entry
SkillThe model (Claude)When Claude judges it relevantProbabilistic — description-based matchA SKILL.md file (+ optional scripts)
Plugin"install" mechanism — contains the aboveN/A — it is a bundle, not a runtime thingWhatever is insidemarketplace install
Fig. 2 — at-a-glance comparison. Who does what, when.

Common pitfalls

Stuffing CLAUDE.md with everything. CLAUDE.md is always in context. Every line costs tokens, every turn. Keep it to the stable facts. If it changes per task, make it a skill.

Using a skill when you needed a hook. If Claude might skip a skill invocation in a bad turn, but you absolutely must run the check, that's a hook. Skills are best-effort; hooks are guaranteed.

Using a hook when you needed a skill. Reverse failure. If the action requires judgment — "read this PR and decide if the migration is safe" — a hook is the wrong shape. Hooks are dumb-on-purpose.

Building a plugin before you need one. If you're the only one using the setup, a folder of skills + a settings.json with hooks is enough. Plugins earn their weight when more than one person installs them.

Tiny mental model

To wrap: CLAUDE.md is what Claude knows. Hooks are what the harness enforces. Skills are what Claude can reach for. Plugins are how you distribute all of the above. Get those four verbs right and the rest follows.

* * *

Thanks for reading. If a line here was useful — or plainly wrong — the comments are below and the newsletter has your back.

Elsewhere in this issue

3 more
  1. 01

    Guides

    Putting Claude on a schedule: routines, loops, and background work

    Apr 20, 2026

  2. 02

    Guides

    Writing a CLAUDE.md that actually helps

    Apr 20, 2026

  3. 03

    Guides

    Building agents that actually work

    Apr 20, 2026

Letters

Arguments, corrections, questions. Anonymous comments allowed; be kind, be specific.