Handbook
Welcome to the Claude Rules handbook. This is the complete guide to analyzing, splitting, and maintaining your CLAUDE.md instruction files.
What’s inside
Section titled “What’s inside”- Beginners — New to Claude Rules? Start here
- Getting Started — Install and analyze your first file
- How It Works — The three-layer architecture
- Commands — Full CLI reference
- Security — Attack surface and threat model
The Problem
Section titled “The Problem”CLAUDE.md files grow over time. Every line costs tokens every session — whether it matters for the current task or not. A 300-line instruction file quietly becomes a tax on every thought the model has.
The Fix
Section titled “The Fix”Claude Rules splits your instruction file into three layers:
| Layer | File | Loaded |
|---|---|---|
| Operator console | CLAUDE.md | Always (lean index) |
| Dispatch table | .claude/rules/index.json | Always (machine-readable) |
| Rule payloads | .claude/rules/*.md | On demand |
The agent reads the dispatch table and loads rule files when the task matches their keywords. The rest stay unloaded, saving context tokens every session.