Key points
- The paths field in a rule file's YAML frontmatter holds glob patterns that decide when the rule activates.
- Path-scoped rules load only when a matching file is being edited, cutting irrelevant context and token usage.
- Globs such as **/*.test.tsx match files by naming pattern regardless of directory, which a directory-level CLAUDE.md cannot do.
- A double star () matches any depth, so terraform//* covers every nested module under terraform/.
- The frontmatter decides when the rule loads; the markdown body says what to do.
- Directory-level CLAUDE.md is still the simplest choice when a convention truly belongs to one folder.
Skills the exam expects
- Create a .claude/rules/ file with a paths glob so it loads only for matching files.
- Write globs that target a file type across the whole codebase, such as all test files.
- Choose path-specific rules over subdirectory CLAUDE.md files when conventions span directories.
Common misconceptions
- "A rules file applies everywhere like CLAUDE.md." With a paths field it applies only to matching files.
- "A directory CLAUDE.md can reach files in other directories." It is bound to its own folder.
- "Rules must be invoked like skills." They load automatically on a path match.
Watch for
- Conventions for scattered files duplicated into many directory-level CLAUDE.md files.
- A root CLAUDE.md that loads every area's conventions into every session.
- Relying on Claude to infer which section of a big file applies instead of matching deterministically.
Practice task 3.3
54 practice items cover this task in CCA Prep Studio: flashcards, matching, scenario questions and explain-it-back exercises, each tracked toward your mastery score.