The Claude Code Configuration Stack: CLAUDE.md, Hooks, Subagents and More
Most people use Claude Code like a smarter autocomplete. But it is a fully programmable system, with a stack of configuration mechanisms that each solve a different problem. Knowing which to reach for is what separates chatting with the tool from engineering it.
CLAUDE.md: Persistent Context
The foundation. CLAUDE.md is read every session and holds what is always true about your project — the stack, the conventions, what not to touch. Get this right first; everything else builds on it.
Slash Commands: Reusable Actions
A slash command is a prompt template you invoke by name. Anything you type repeatedly — a review checklist, a commit format — becomes a command you trigger with a slash. They are the easiest mechanism to create and give immediate value.
Subagents: Delegated Work
A subagent is a separate Claude instance with its own context window. When a task needs heavy exploration — "go read the codebase and tell me how auth works" — a subagent does the reading in its own context and returns just the answer, keeping your main session clean.
Hooks: Deterministic Enforcement
A hook is an event-driven script that runs deterministic code. Where CLAUDE.md asks Claude to follow a rule, a hook enforces it at the system level — blocking a dangerous command, running a formatter after every edit. For anything that must never go wrong, a hook is a guarantee, not a request.
Skills and Plugins
Skills hold on-demand capability that loads only when relevant, keeping CLAUDE.md lean. Plugins bundle commands, subagents, hooks and skills into a single versioned unit you can share across a team. Together they let a configuration scale from a solo project to an organisation.
Which Tool, and When
The framework is simple: CLAUDE.md for what is always true. Commands for what you repeat. Skills for what loads on demand. Hooks for what must be enforced. Subagents for what should stay out of your context. Plugins to share it all. Master the question behind each and the right tool follows from the problem.