0Pricing
Claude Architect · Lesson

Monolith vs Modular Rules

Splitting a giant CLAUDE.md to save context and tokens.

The Monolith Problem

A single giant CLAUDE.md feels tidy, but every token in it is loaded into the context window on every single request of every session.

If your file holds 4,000 lines covering the backend, the iOS app, CSS conventions, and your release checklist, Claude pays that cost even when it is only fixing one CSS rule. That wasted context crowds out the code and history that actually matter.

This lesson is about splitting a monolith into modular rules that load only when relevant.

Why Modular Saves Tokens

The win is simple: load rules on demand instead of always.

  • A monolithic CLAUDE.md ships its entire body with every turn.
  • Modular rule files in .claude/rules/ can declare which paths they apply to, so they load only when you edit a matching file.

Less always-on text means more room for the task, and fewer tokens billed per request. This directly serves Domain 5: Context Management & Reliability.

All lessons in this course

  1. User / Project / Directory Levels
  2. The @path Import Syntax
  3. .claude/rules/ with Frontmatter Paths
  4. Monolith vs Modular Rules
← Back to Claude Architect