.claude/rules/*.md
Path-scoped Claude rule
Loads focused instructions only when Claude works on matching files.
- Revision
- 1
- Verified
- 2026-07-26
Compatibility and paths
Claude Code
.claude/rules/{{ruleName}}.mdFiles matching the paths frontmatterVS Code
.claude/rules/{{ruleName}}.mdFiles matching the paths frontmatterTrust and provenance
Curated record reviewed 2026-07-26. Results still depend on the supplied context and target environment.
Files matching the paths frontmatter
Fill variables
Values stay in this browser tab and are not stored.
Generated asset7 required field(s) must be completed
---
paths:
- "{{pathGlob}}"
---
# {{ruleTitle}}
- Follow {{primaryConvention}}.
- Validate with `{{validationCommand}}`.
- Do not introduce {{prohibitedPattern}}.Real example
Input
Project uses .claude/rules/{{ruleName}}.md with the required variables filled.Expected result
--- paths: - "example-value" --- # example-value - Follow example-value. - Validate with `example-value`. - Do not introduce example-value.