CloudCodeTree LogoCloudCodeTree
AI NewsAbout
CloudCodeTree Logo
CloudCodeTree
  • AI News
  • About
← Back to AI News
Seven Ways to Steer Claude Code — and Which Layer to Use for What

Seven Ways to Steer Claude Code — and Which Layer to Use for What

Chris Harper

2 min read

Jun 20, 2026 · 12:05 UTC

AI
Workflow
Claude Code
Best Practices

TL;DR: Anthropic's official guide names seven Claude Code customization layers — CLAUDE.md, rules, skills, subagents, hooks, output styles, system prompt — each with different context loading and authority.

Anthropic published the definitive architecture for Claude Code customization on June 18. If you've been putting everything in CLAUDE.md and wondering why behavior drifts, this is the missing piece: there are seven distinct layers, each controlling when instructions load, how they survive compaction, and how much weight they carry.

The seven layers:

CLAUDE.md files — Load at session start, survive compaction. Keep the root file under 200 lines. Place subdirectory versions (e.g., app/api/CLAUDE.md) for on-demand loading — they load automatically when Claude touches files in that directory.

Rules (.claude/rules/) — Path-scoped constraints that load only when relevant files are edited. Better than CLAUDE.md for restrictions that apply only to specific directories:

---
paths:
  - "src/api/**"
---
All API handlers must validate input with Zod before processing.

This rule loads only when Claude edits an API handler — zero token cost on unrelated tasks.

Skills (.claude/skills/) — Procedural workflows: deploy checklists, review processes, migration steps. The full body only enters context when invoked. Anything procedural you call explicitly belongs here, not in CLAUDE.md.

Subagents (.claude/agents/) — Isolated context windows for side tasks. The subagent completes its work and returns only the final summary — intermediate steps don't pollute your main conversation or burn your context budget.

Hooks — The deterministic layer. Instructions in CLAUDE.md are advisory; hooks fire 100% of the time. If something must always happen (format on every write, block a sensitive path, run tests before Stop), put it in a hook, not a prompt.

Output styles (.claude/output-styles/) — Carry high instruction weight; risk overwriting critical defaults. Use the built-in /style options (Proactive, Explanatory, Learning) for most needs. Reserve custom styles for significant persona or role changes.

System prompt appending — For programmatic extension of the base system prompt via the API without replacing it; developer-tier use.

The decision rule: Deterministic must-happen → hook. Procedural workflow you invoke explicitly → skill. Always-on project context → CLAUDE.md. Constraints tied to specific paths → path-scoped rules. Isolated side tasks → subagents. Everything else → start with CLAUDE.md and refactor as the project grows.

Sources: Steering Claude Code: skills, hooks, subagents and more — Anthropic