[FEATURE] Support file content pattern for auto-loading Claude Rules
Resolved 💬 2 comments Opened Mar 18, 2026 by danilofuchs Closed Apr 16, 2026
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
In our projects, we have specific guidelines about some of our dependencies, such as how to write zod schemas.
Currently, .claude/rules are loaded on demand based on file paths (frontmatter setting).
However, dependencies may be used in any file and are valid throughout the project. But I don't want to pollute CLAUDE.md context with these rules
Proposed Solution
Frontmatter supporting regex based on file content:
patterns:
- "/from \"zod\"/"
Alternative Solutions
- Using Claude skills
- Adding the common rule to all .ts files
- Adding the common rule to CLAUDE.md
Priority
Low - Nice to have
Feature Category
Configuration and settings
Use Case Example
_No response_
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗