[FEATURE] Git remote/org condition for rules frontmatter
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
Rules files support paths frontmatter conditions, but there's no way to scope rules based on which org owns the repo. When working across multiple orgs on one machine, user-level rules (~/.claude/rules/) either apply to everything or nothing — there's no middle ground for "only in repos belonging to my company."
Proposed Solution
Add a remote condition to rules file YAML frontmatter:
---
remote: "github.com/my-org/*"
---
Org-specific instructions here...
Matches against configured git remotes using glob patterns. Combinable with existing paths condition.
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
I work on company repos and personal repos. My company has coding standards that should apply to all company repos but not personal projects. With a remote condition in ~/.claude/rules/, the right rules activate automatically based on which repo I'm in.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗