Four primitives, two axes: who fires it · where its context lives — answer those two and the choice makes itself
2026-09-26 · BigCat
This is the easiest class to buy wrong: people install "multi-agent" as if it were a stronger skill. Subagents, hooks, slash commands and plugins solve four unrelated problems, and picking the wrong one doesn't give you a worse result — it gives you something that never fires. Ten installable entries first, then one two-axis grid that pins each of them down.
Get another class wrong and it still runs. Get orchestration wrong and it quietly does nothing. "Run lint before every commit" in CLAUDE.md is forgotten three times out of ten. A judgment call written as a hard hook blocks the wrong thing every time. The rule is one sentence: judgment goes to the model, certainty goes to code, anything that would flood the context moves out, anything other people need gets packaged. Ten real, installable or readable entries below — table and commands first, criteria in the second half.
// 01
The list first: four primitives and six ready-made things
Claim: the first four are built-in mechanisms — nothing to install, you just write a file. The last six are things other people already wrote. Get the first four straight and the rest picks itself.
Entry Source What it takes off your plate When not to use it
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
(1) subagent Built-in · .claude/agents/*.md Moves context-flooding search out The result is one line anyway
(2) hook Built-in · settings.json Pins "every time" into real code The task needs judgment
(3) skill / slash command Built-in · .claude/skills/ Turns a procedure into a command A one-off task
(4) plugin Built-in · plugin.json Packages 1-3 into a shippable unit Only one machine uses it
(5) agent teams (experimental) Built-in · env var Independent sessions that argue Sequential work · same files
(6) security-guidance Official plugin · Anthropic Three-layer auto security review No Python 3.10+ on the box
(7) hookify Official plugin · Anthropic Writes a hook rule from one line You already hand-write hooks
(8) feature-dev Official plugin · Anthropic 7-phase pipeline with 3 agents A one-line change
(9) wshobson/agents Community marketplace 94 plugins from one source You need one specific role
(10) disler/claude-code-hooks-mastery Community repo Runnable samples for 13 hook events You only want one snippet
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1-4 are the primitives, 5 upgrades 1 into full sessions; 6-8 are official builds on those primitives; 9-10 are community volume and samples.
How to install (commands copied from each official page)
# 6-8 official marketplace, added on your first interactive session; add it manually if not
/plugin marketplace add anthropics/claude-plugins-official
/plugin install security-guidance@claude-plugins-official
/plugin install hookify@claude-plugins-official
/plugin install feature-dev@claude-plugins-official
# 5 agent teams are off by default; turn them on in settings.json env
{ "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } }
# 9 the largest community marketplace, same two steps
/plugin marketplace add wshobson/agents
/plugin install python-development # or any of its 94 plugins# 1 a subagent is just a markdown file with frontmatter; nothing to install# .claude/agents/reviewer.md -- name and description are the only required fields# Do these two right after installing anything
/plugin # the Installed tab has a "Not used recently" group: who is billing you for nothing
/skill-doctor # per-skill context cost
One by one, in plain words
(1) subagent: a .claude/agents/*.md file where name and description are the only required fields; tools, disallowedTools, model, maxTurns, permissionMode and isolation: worktree are all optional. The whole value is the separate context window: throw log-trawling and repo-wide searches in there and take back only the conclusion. The hard numbers the docs state: 20 concurrent subagents by default (CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS), 3 levels of nesting, and a startup warning once all agent descriptions together exceed 15,000 tokens. When not to use it: the answer was one sentence — a second context window is pure tax.
(2) hook: a hooks block in settings that runs your shell command at a lifecycle point. The only deterministic mechanism in this class — it doesn't depend on the model remembering. The event table is wide now: PreToolUse, PostToolUse, PostToolUseFailure, PostToolBatch, UserPromptSubmit, PermissionRequest, PermissionDenied, SubagentStart, SubagentStop, Stop, TeammateIdle, TaskCreated, TaskCompleted, InstructionsLoaded, ConfigChange, FileChanged, PreCompact, SessionStart, SessionEnd and more. Two rules to memorize: a PreToolUsedeny still holds under bypassPermissions and --dangerously-skip-permissions (hooks tighten, never loosen); and hooks on one event all run to completion in parallel before results merge, so one hook's deny does not suppress another's side effects. When not to use it: the task needs judgment — reach for type: "prompt" (single-turn) or type: "agent" (multi-turn, 60-second default timeout, up to 50 tool turns, marked experimental).
(3) skill / slash command: two doors into the same thing now — .claude/skills/<name>/SKILL.md (multi-file, hot-reloaded), with the older .claude/commands/<name>.md still supported but single-file. Two frontmatter fields decide who can fire it: disable-model-invocation: true means only you can type it (right for a /deploy), user-invocable: false means only the model uses it. Three underrated powers: !`command` injects shell output before the model sees the content, allowed-tools pre-approves permissions for the turn, and context: fork runs the command in an isolated subagent. When not to write one: a task you'll do once.
(4) plugin: a directory with .claude-plugin/plugin.json that packages skills, agents, hooks and MCP servers as one installable unit. Not a fifth capability — a shipping crate. The docs are blunt about the price: an enabled plugin is part of every session, not only the ones where you use it. For everything the model can invoke on its own, the name and description are in context on every turn. Check Context cost in /plugin before installing and Not used recently after. When not to package: one machine, one user — just drop it in ~/.claude/.
(5) agent teams (experimental, off by default): a teammate is not a subagent but a complete, independent Claude Code session, sharing a task list and messaging the others through mailbox files; you can talk to any of them directly. The documented sweet spot is specific: five teammates each holding one hypothesis and trying to disprove the others, which breaks the anchoring that ruins single-threaded investigation. The limits are equally specific: no resumption (/resume does not restore in-process teammates) · no nesting · one team per session · the lead can't be transferred · shutdown is slow · task status lags. The docs suggest starting with 3–5 and say plainly that three focused teammates often beat five scattered ones.
(6) security-guidance (official plugin): install this one first, and read it as the best worked example of hook orchestration there is — the entire plugin is built out of hooks, in three deepening layers. PostToolUse on Edit/Write does a pure string-pattern match (eval(, pickle, dangerouslySetInnerHTML, edits under .github/workflows/) with no model call and no cost. Stop runs a background diff review at the end of each turn (up to 30 changed files per turn, at most three in a row). PostToolUse on Bash, filtered to git commit and git push, runs a deeper agentic review that reads surrounding code (capped at 20 per rolling hour). The key design choice: the instance that wrote the code never grades itself — a separate Claude starts fresh and is told only to find problems. Honest caveat: none of the three layers blocks a write or a commit. They hand findings back for Claude to fix.
(7) hookify (official plugin): it automates writing hooks. /hookify [description] takes one sentence, or reads the conversation for the behavior that has been annoying you, and generates a markdown rule with YAML frontmatter (event, pattern, action: warn|block). No restart — the rule applies on the next tool use./hookify:list and /hookify:configure manage the switches. When not to install: you already hand-write hook config, in which case it is one more layer of indirection.
(8) feature-dev (official plugin): one /feature-dev command opens a seven-phase workflow carrying three clearly split agents — code-explorer (traces execution paths to map what exists), code-architect (produces the architecture and implementation blueprint) and code-reviewer (hunts bugs and convention violations). The split is the part worth studying: exploration, design and review each get their own context, and none of them vouches for another. The same marketplace also carries code-review (multi-agent PR scoring) and claude-code-setup (scans your repo and tells you which automation to configure). When not to use it: a one-line change.
(9) wshobson/agents (community marketplace, MIT): per its README, 2026-09, it describes itself as 94 plugins / 202 agents / 183 skills / 105 commands, and claims support for Claude Code, Codex, Cursor, OpenCode and GitHub Copilot among others. Installation is identical to the official marketplace. Use it to take one plugin you need, not to install the repo — go back and reread the context tax in item (4).
(10) disler/claude-code-hooks-mastery (community repo): 13 hook lifecycle events written out one by one as runnable example scripts (UV single-file scripts, each hook isolated), plus a Builder/Validator validation pair and a meta-agent that generates subagents. The one entry here to read rather than install: adapting it beats starting from scratch. Note: community repos trail the official event table, so take event names from the official hooks docs.
Three more, as pointers only · anthropics/claude-code-action (MIT) moves this orchestration into GitHub Actions, picking its mode from @claude mentions, an explicit prompt, or a PR review; the minimal workflow needs contents: write, pull-requests: write and issues: write — think hard before granting CI write access. davila7/claude-code-templates installs agent / command / hook / MCP components via npx claude-code-templates@latest. ruvnet/ruflo (formerly claude-flow, MIT) is the other extreme — 100+ self-described agents, swarm topologies, consensus mechanisms. That isn't installing a plugin, it's swapping your harness; not recommended here, because its configuration surface dwarfs the problem most people have.
// 02
Why these ten don't compare: there are only two axes
Claim: one axis is who presses it (you type, the model decides, a lifecycle event fires); the other is where the context goes (into the main conversation, into isolation, or nowhere). Each primitive owns one cell. No cell substitutes for another.
│ Into main context │ Isolated context │ Never enters context
────────────────────┼───────────────────────┼─────────────────────────┼──────────────────────
You type it │ slash command │ skill with context: fork│ --
│ (disable-model- │ /subtask │
│ invocation: true) │ │
────────────────────┼───────────────────────┼─────────────────────────┼──────────────────────
The model decides │ skill (SKILL.md) │ (1) subagent │ --
│ │ (5) teammate (session) │
────────────────────┼───────────────────────┼─────────────────────────┼──────────────────────
A lifecycle event │ the small additional- │ agent hook (experimental)│ (2) hook (shell)
│ Context a hook feeds │ │ (6) lives entirely here
────────────────────┴───────────────────────┴─────────────────────────┴──────────────────────
(4) plugin isn't on this grid -- it's the crate that ships any combination of these cells.
The three common mismatches are all visible on that grid:
Writing a deterministic rule as an instruction. "Run lint before every commit" in CLAUDE.md takes work from the bottom-right cell and drops it in the middle one, where it becomes advice the model can forget. It should be a PostToolUse hook, or one sentence to (7).
Writing a judgment call as a hard hook. "Don't touch this directory" can be blocked outright. "Is this change a security problem" cannot. Two legitimate routes for the latter: a single-turn type: "prompt" hook, or copy (6) — a Stop hook that spins up a separate Claude in the background and feeds the verdict back.
Using a subagent as a teammate. The comparison table is explicit: a subagent returns its result to the caller, the main agent manages everything, and the token cost is lower; teammates message each other directly, claim their own tasks, and cost more (each is a full instance). Teams are for work that needs discussion and challenge. If you just want a conclusion, use a subagent.
One more thing that's easy to miss: turning (5) on changes ordinary delegation too. Per the docs, while agent teams are enabled, a subagent that Claude names on its own launches as a teammate — so a team can form when you never asked for one. Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS back to 0 if you don't want that.
How it breaks: you install (8) and a couple of review plugins from (9), and both sides ship an agent called reviewer. Nothing errors — the model just picks a different one each time. You think your review standard is drifting; in fact you installed two rulers. One executor per job.
// 03
Three-minute check: answer these six before you install
Claim: this class isn't chosen on stars, it's chosen on which cell you're in. Answer the six and the pick is basically made.
Does this need model judgment? No → (2) a hook, or (7) to generate one. Yes → (3) a skill or (1) a subagent. Get this one wrong and everything after it is wrong.
Does the result need to come back in full? No (logs, repo-wide search, long diffs) → (1) a subagent. Yes → just do it in the main conversation.
Must it happen every single time? Then only (2) guarantees it. Anything in CLAUDE.md is advice, not a guarantee.
Should the model be able to fire it? Yes → the description must say when to use it. No → disable-model-invocation: true, so nothing runs your /deploy on a hunch.
How much context does it hold permanently? The official line: for everything the model can invoke, name and description are in context every turn. Check Context cost before, Not used recently and /skill-doctor after. (1) adds one of its own: a warning once all agent descriptions exceed 15,000 tokens.
How many people and machines? One person → ~/.claude/. One repo → commit .claude/. Across repos or teams → now (4) and a marketplace are worth it.
The hard line: (9) claims 94 plugins, (10) covers 13 events, (5) can run a roomful of sessions — none of those numbers is a selection criterion. Question 1 is. Answer "no judgment needed" and then install a pile of agents, and what you get is a pile of reminders that fire sometimes.
// 04
The honest cost: orchestration is the expensive tier
Claim: a subagent costs tokens, a hook costs execution rights you hand over, and an agent team costs coordination. Three different bills, settled three different ways.
Three bills
The standing context tax. The one you pay daily and never see itemized. Installing five plugins from (9) is easy; their names and descriptions are in every turn from then on. The only defense is checking Not used recently and turning things off.
A hook runs arbitrary code as you. Whatever it runs, it runs with your privileges. Two practical traps: hooks on one event run in parallel and one deny doesn't suppress another's side effects; and PreToolUse Bash matching is best-effort — the docs say plainly to use the permission system, not a hook, for a hard allow or deny.
Agent team tokens scale linearly. The docs say "significantly more" than a single session, and an in-process teammate's requests fall outside the main conversation's cache bucket, defaulting to a 5-minute TTL (subagentPromptCacheTtl raises it to 1h, but 1-hour cache writes bill higher). And on permissions: if the lead starts with --dangerously-skip-permissions, every teammate inherits it.
What you can do without installing anything
Write two hooks before you write an agent. Most of what people mean by "it keeps forgetting X" is one PostToolUse hook. If you don't want to write it, (7) will.
Install (6) first — zero config, and most of it is free. The per-edit pattern match makes no model call; only the end-of-turn and commit layers spend, and both are capped.
Try subagents before a team. The agent teams page itself opens with it: before you set up a team, check whether a lighter option does the job.
The cell that stays empty: (1) isolates context, (2) guarantees it runs, (6) reviews automatically, (5) has five instances falsify each other — none of them can tell you whether this should be automated at all. The most telling line in (5)'s limitations: task status lags, teammates sometimes fail to mark work complete. Checking whether the work is actually done is still yours.
// THE ONE-PAGE BUYING CARD
Install these three: (1) /plugin install security-guidance@claude-plugins-official — zero config, the pattern layer is free, and it doubles as the best hook-orchestration example around. (2) /plugin install hookify@claude-plugins-official — write your first hook with it; edits apply without a restart. (3) One .claude/agents/ file of your own (name and description are enough) for whatever floods your context most often.
Add as needed: feature-dev@claude-plugins-official (whole features, if you accept the seven-phase overhead) · code-review@claude-plugins-official (multi-agent PR scoring) · claude-code-setup@claude-plugins-official (don't know what to configure — let it scan the repo) · wshobson/agents (you need a specific role; take a plugin, not the repo) · disler/claude-code-hooks-mastery (hook samples to adapt, event names verified against the official docs) · anthropics/claude-code-action (moving this into CI).
Explicitly don't: put "every time" rules in CLAUDE.md instead of a hook · write a judgment call as a hard deny hook · install two reviewers for one job · package a plugin when only your own machine uses it · enable agent teams on a production branch without reading the limitations list · assume more agents means better orchestration — the docs' own words are that three focused teammates often outperform five scattered ones.
// GLOSSARY
subagent
An assistant defined by a .claude/agents/*.md file, running in its own context window and returning only a result. 20 concurrent and 3 nesting levels by default.
hook
A shell command fired by a lifecycle event — the only deterministic mechanism in this class. It can tighten permissions, never loosen them.
teammate (agent team)
A complete, independent Claude Code session that shares a task list with other teammates and messages them directly. Experimental, off by default.
plugin
A directory with .claude-plugin/plugin.json packaging skills, agents, hooks and MCP servers as one installable unit. A crate, not a fifth capability.
Context cost
The standing-context estimate shown on an official marketplace plugin's detail page in /plugin. The number to read before installing.
disable-model-invocation
A skill frontmatter field. Set true, only you can type the command and the model can't call it — right for something like /deploy.
prompt hook / agent hook
The two hook types for judgment rather than hard rules: single-turn LLM evaluation, and multi-turn with tool access (60-second default timeout, up to 50 turns, marked experimental).
// FURTHER READING
Claude Code · Subagents — the full frontmatter field list; 20 concurrent / 3 nesting levels / the 15,000-token description warning; forks vs standard subagents (2026-09)
Claude Code · Slash commands — SKILL.md versus legacy command files; $ARGUMENTS, !`command`, allowed-tools, context: fork (2026-09)
Claude Code · Plugins overview — what a plugin contains; "an enabled plugin is part of every session"; Context cost and Not used recently (2026-09)
Claude Code · Agent teams — the subagent comparison table; CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS; the 3–5 recommendation; the full limitations list (2026-09)
Claude Code · Security guidance plugin — the three hook layers and their caps (30 files per turn, three in a row, 20 per rolling hour); review independence; none of the layers block (2026-09)
anthropics/claude-plugins-official — the official plugin catalog; the names and authors of security-guidance, hookify, feature-dev, code-review and claude-code-setup here come from its marketplace.json (2026-09)
feature-dev plugin source — code-explorer / code-architect / code-reviewer under agents/; the seven-phase /feature-dev workflow