Skip to content

Why the plugin rules exist

.claude/rules/plugins.md is loaded whenever Claude works under plugins/ or .claude-plugin/. It is short on purpose; this page gives the reason for each rule, so a rule can be judged before it is changed.

Rule Why
Bump version in plugin.json with every change under plugins/<name>/ A machine replaces its cached copy of a plugin only when the version string changes. A change without a bump merges, looks released, and never reaches anyone—and nothing reports that (setup/marketplace.md). CI enforces it against current main, because two pull requests bumping to the same number both pass against their own base (#99), and once more on every push to main, which merges behind main can still reach (#735).
Set the version only in plugin.json, not in the marketplace entry Two places drift; the runtime reads the plugin's own manifest.
claude plugin validate . --strict before a manifest change The runtime silently ignores a field it does not know, so a misspelled field does nothing and says nothing.
Reach the plugin's own files through ${CLAUDE_PLUGIN_ROOT} The plugin runs from a versioned cache directory whose path is not stable; a path that resolves in this checkout works for the author and nobody else. CI rejects machine-specific paths under plugins/.
A plugin with a bin/ ships hooks/restore-exec-bit.sh A Desktop session on a remote host runs the client's copies, which arrive without the executable bit (setup/desktop-remote.md).
A plugin with a bin/ ships hooks/bin-on-path.sh On Windows Claude Code does not put a plugin's bin/ on the Bash PATH, in claude -p and claude --bg sessions alike, so the launchers were "command not found" in Git Bash (#265). The hook adds the entry through CLAUDE_ENV_FILE, which Claude Code sources before every Bash command.
A skill follows .claude/rules/writing-skills.md and passes skill-audit The rules and their reasons: writing-skills.md.
No plugin names a project, a Notion page, a board or a person SPEC.md REQ-6 and Q-10: a plugin serves every repository and reads what differs from that repository at run time. check-plugins.sh greps for the known names.
One plugin per pull request where possible Two open pull requests that bump the same plugin collide on the version: the second has to merge main and bump again. The coordinator avoids starting two tasks on one plugin for that reason.