Claude Code Plugins
Claude Code plugins are self-contained directories that bundle skills, agents, hooks, and resources under a shared namespace. They extend Claude Code’s capabilities in a portable, versioned, and shareable form beyond what personal~/.claude/ config offers.
Structure
.claude-plugin/ directory marks the root as a plugin. All other components live at the plugin root.
Manifest (plugin.json)
Minimal valid manifest:
name becomes the namespace. Skills inside become /my-plugin:<skill-name> — no collision with other installed skills.
Scopes Comparison
Invocation
Local testing:~/.claude/plugins/ config; auto-loaded on every session.
After edits:
Skill Discovery
Claude auto-discovers skills viaskills/<name>/SKILL.md. The name field in SKILL.md frontmatter is used as the sub-command; if omitted, the directory name is used. Supporting files (scripts, references, assets) can live beside SKILL.md.
Symlink Gotcha
Installed plugins are cached. They cannot reliably reference files outside the plugin directory via relative paths. Workarounds:- Copy wiki/docs into the plugin directory
- Symlink from inside the plugin to files elsewhere:
ln -s ~/repos/llm-wiki/wiki skills/wiki/references - Absolute paths work for local-only plugins (not distributable)
When to Use Plugins vs. Personal Config
Use a plugin when:- Same skill set needed across multiple projects
- Want namespacing to avoid skill name collisions
- Plan to share or version the skill collection
- Skills have bundled resources (scripts, reference docs) that should travel with them
~/.claude/skills/ when:
- Skills are personal conventions not worth packaging
- One machine, personal productivity only
- No need for namespacing
Plugin Priority Stack
When a plugin’s skills conflict with CLAUDE.md rules:- User’s CLAUDE.md/AGENTS.md — highest priority
- Plugin skills — override default Claude behavior
- Default system prompt — lowest priority
Iron Law Pattern
Some plugins (e.g., Superpowers) encode “Iron Laws” — non-negotiable process rules enforced via skill instructions. Example: “Write code before a test? Delete it. Start over.” This is stricter than soft guidance in CLAUDE.md. Enable/disable:"plugin-name": true/false in ~/.claude/settings.json. Auto-reload via /reload-plugins.
wshobson Plugin Ecosystem
The wshobson/agents repo (184 agents, 78 plugins) demonstrates large-scale plugin use: plugins group related agents and skills by domain, with aPluginEval framework for testing plugin quality gates.
Related Pages
- Agent Skills — SKILL.md format, progressive disclosure, three loading levels
- Agent Subagents — agents bundled in plugins follow the same YAML frontmatter format
- Claude Code Plugins Llm Wiki — practical guide for wrapping llm-wiki as a plugin