[FEATURE] Support rules field in plugin.json for distributing rules via plugins
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
The plugin system supports distributing commands, agents, skills, hooks, mcpServers, outputStyles, and lspServers - but not rules.
This means plugin authors cannot bundle coding standards, style guides, or project conventions with their plugins. Users must manually copy rule files to ~/.claude/rules/ or .claude/rules/.
Real-World Impact
The everything-claude-code plugin contains 8 battle-tested rules:
coding-style.md- Immutability, file organizationsecurity.md- Security checks, secret managementtesting.md- TDD workflow, coverage requirementsgit-workflow.md- Commit format, PR workflow- etc.
Users report confusion when rules don't appear in /context after plugin installation (see issue #88).
Proposed Solution
Add rules as a supported field in plugin.json:
{
"name": "my-plugin",
"commands": "./commands",
"skills": "./skills",
"agents": "./agents",
"rules": "./rules" // NEW: distribute rules via plugins
}
Rules would be loaded from the plugin's rules directory and merged with user/project rules, following the same precedence as other plugin components.
Alternative Solutions
- Manual copy (current workaround) - Requires users to run
cp -r ./rules/* ~/.claude/rules/ - PostInstall hook - Could copy rules, but feels hacky and doesn't integrate with plugin management
Priority
Medium - Affects plugin ecosystem completeness
Feature Category
Plugin system
Use Case Example
- User installs
everything-claude-codeplugin - Plugin's rules for coding standards, security, TDD are automatically loaded
/contextshows rules from the plugin- When plugin is disabled, rules are also disabled
- When plugin is updated, rules are updated too
Additional Context
This would bring rules in line with other plugin components and improve the plugin ecosystem's ability to distribute complete development workflows.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗