Steering Claude Code: Anthropic's Official Guide to CLAUDE.md, Skills, Hooks, Rules, and Subagents
Anthropic published a comprehensive official guide covering seven methods for controlling Claude Code's behavior: CLAUDE.md files, rules, skills, subagents, hooks, output styles, and system prompt appending. The guide explains each method's context cost, persistence through session compaction, and instruction authority, giving developers a principled decision framework for structuring their Claude Code projects. Published on June 18, 2026, this is the most complete steering reference Anthropic has released to date.
Sources & Mentions
5 external resources covering this update
Claude Code: Hooks, Subagents, and Skills Complete Guide
Dev.to
Claude Code Guide 2026: 25 Features with Examples & Demo
MarkTechPost
Anthropic's Complete Guide to Claude Skills Building
KDnuggets
Claude Code Customization Guide: CLAUDE.md, Skills, Subagents
alexop.dev
Claude Code Skills, Commands, Hooks, Agents
Substack
Anthropic Publishes Official Steering Guide for Claude Code
On June 18, 2026, Anthropic published a comprehensive reference guide titled "Steering Claude Code: CLAUDE.md files, skills, hooks, rules, subagents and more." The post documents seven distinct mechanisms for customizing Claude Code's behavior, along with a decision framework explaining when to use each one.
The Seven Steering Methods
CLAUDE.md Files
CLAUDE.md is a markdown file loaded into context at session start and persisted through compaction. It suits build commands, directory layouts, monorepo structures, coding conventions, and team norms. Anthropic recommends keeping root CLAUDE.md files under 200 lines. Subdirectory CLAUDE.md files load on-demand when Claude navigates into those directories, reducing upfront context cost.
Rules
Rules are markdown files stored in .claude/rules/. They are path-scoped: a rule file only loads when Claude touches a file that matches its scope, keeping irrelevant conventions out of context.
Skills
Skills are dynamic procedures stored in .claude/skills/, each with a SKILL.md file defining a name, description, and workflow body. At session start, only the names and descriptions load; the full body loads only when a skill is invoked. This lazy-loading model means long procedural reference material carries no context cost until needed.
Subagents
Subagents are isolated assistants defined in .claude/agents/. Each runs in a separate context window with its own system prompt, tool access, and permissions. Only final results return to the main session. As of v2.1.172, subagents can spawn their own subagents up to five levels deep.
Hooks
Hooks are event-driven scripts that fire on lifecycle events. Unlike prompts, hooks execute deterministic code and cannot hallucinate. They can be configured as shell commands, HTTP calls, LLM calls, or agent invocations.
Output Styles
Output styles are files in .claude/output-styles/ that inject formatting instructions into the system prompt, controlling response format and tone without modifying the core role.
Appending the System Prompt
The --append-system-prompt CLI flag adds additive instructions without replacing Claude Code's default role. Instructions appended this way are cached after the first request.
Decision Framework
The guide frames each method along three axes: context cost, compaction persistence, and instruction authority. CLAUDE.md instructions are highest-authority and zero-cost-after-load; skills and rules are near-zero cost until triggered; hooks are authority-guaranteed because they bypass the model entirely.