⌨️Claude Code Rules
Also known as .claude/rules, Path-scoped rules, Rules folder
Small rule files. Some load only for some files.
Think of it like
It is like a binder with a tab for each topic.
Example
Jack's API rules only matter in one folder. He moves them into a rule with a paths line, and his main CLAUDE.md gets shorter.
Why it matters
It keeps the context small, because a rule only costs space when it is needed.
Definition
Example code
markdown
---
paths: ["src/api/**"]
---
Every API route checks the user first.Common mistake
Key takeaways
- 1One topic a file. In .claude/rules/.
- 2Path rules. Load when needed.
- 3Personal rules. In ~/.claude/rules/.