← all news

Seven ways to steer Claude Code, and what each one costs

AI · · · source (claude.com)

Anthropic's Claude team published a guide to the seven different ways to shape how Claude Code behaves, and the useful part is not the list but the reasoning about when each method loads and what it costs you in context. CLAUDE.md files are read at the start of every session, which makes them the natural home for build commands and team conventions, but also the easiest to bloat. The team suggests keeping the root file under 200 lines. Rules live in .claude/rules/ and can be scoped to file paths, so a rule about your CSS only loads when Claude actually touches a stylesheet. Skills work the same way: only the name and description load up front, and the full procedure loads when Claude decides to use it.

The other four methods trade context for control in different ways. Subagents run in a separate context window, and the only thing that comes back to your main session is their final message, which keeps long investigations from polluting the main thread. Hooks are cheap because they run external code on lifecycle events rather than loading instructions, so they suit deterministic automation like running a linter after every edit. Output styles inject into the system prompt with the strongest instruction-following weight but never get compacted, and a CLI flag lets you append extra system-prompt text that is cached after first use.

The practical advice is to stop dumping everything into CLAUDE.md: move procedural steps into skills, push deterministic tasks into hooks, and scope rules so they only appear when relevant.

Why it matters

If you use Claude Code daily, scattering instructions without thinking about how they load inflates every session's context and can slow the model down. This guide gives you a concrete map so you can move always-on guidance into mechanisms that load only when needed.

Claude CodeAnthropicEngineering