[FEATURE] Support rules field in plugin.json for distributing rules via plugins

Resolved 💬 3 comments Opened Jan 27, 2026 by affaan-m Closed Jan 30, 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

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 organization
  • security.md - Security checks, secret management
  • testing.md - TDD workflow, coverage requirements
  • git-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

  1. Manual copy (current workaround) - Requires users to run cp -r ./rules/* ~/.claude/rules/
  2. 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

  1. User installs everything-claude-code plugin
  2. Plugin's rules for coding standards, security, TDD are automatically loaded
  3. /context shows rules from the plugin
  4. When plugin is disabled, rules are also disabled
  5. 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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗