Skip to content
FlintFlintby Torch
← LevelsBuilder · B2

Split into rules/

Build-along · ~10 min at your own keyboard

When one file covers many jobs, split it: a .claude/rules/ folder with one file per concern (writing-voice.md, pricing.md, file-handling.md). Know what the split does and doesn't do. At the time of writing, a rule file with no settings loads in every session, just like CLAUDE.md — the split is tidier, not cheaper. A rule file only loads selectively if you scope it with a paths: line at the top (for example, only when working on files under quotes/). Check the Claude Code memory docs for the current syntax, then check what actually loaded rather than assuming.

The long version: Splitting CLAUDE.md into rules ↗

Mac: Mac: mkdir -p .claude/rules in Terminal. Use ls -a to see the hidden folder.

Windows: Windows: in PowerShell run mkdir .claude\rules. Use dir -Force to see the hidden folder.

Do this

0/4

Checkpoints

  • ▸You should now see a .claude/rules/ folder with 2-3 files in it.
  • ▸You should now see a slim CLAUDE.md that keeps only the core.
  • ▸You should now see, in /memory or /context, the scoped file load only when you work in its folder.
The three ways this goes wrong
  • The rules/ folder is in the wrong place and nothing loads. — It must be .claude/rules/ inside your project folder, with the leading dot. Check with ls -a (Mac) or dir -Force (PowerShell).
  • A rule landed in the wrong file and the wrong behavior shows up. — Open the files and move it by hand. Name each file for one concern only.
  • Rules seem to vanish after the split. — Ask Claude to diff the old and new files and list anything missing. Restore from your backup copy.

Dated facts in this lesson: Files in .claude/rules/ load every session unless scoped with a paths: frontmatter field; /memory lists loaded memory files (researched Oct 2, 2026, not yet confirmed by a person: check the source before you rely on it).

Share what happened

Paste your rules/ file list with one line each on what lives where, the scoping line you added, what /memory or /context listed before and after touching a scoped file, and what happened on the writing task.

Strip API keys, passwords, and tokens before you paste. Swap them for [KEY].

🔒 Don't paste confidential, personal-health, or payment info.