plugin-authoring
Creates Claude Code plugins that package skills, agents, hooks, and MCP servers into distributable bundles. Covers plugin.json manifest, directory structure, namespacing, and distribution. Follows official Anthropic best practices. USE WHEN: user mentions "create plugin", "plugin", "plugin.json", "distribute skills", "share agents", "plugin marketplace", "package extension", ".claude-plugin" DO NOT USE FOR: creating standalone skills - use `skill-authoring`; creating standalone agents - use `agent-authoring`; creating standalone hooks - use `hook-authoring`
What this skill does
# Plugin Authoring — Official Best Practices
## What Plugins Do
Plugins bundle skills, agents, hooks, and MCP servers into shareable packages. Skills get namespaced: `/plugin-name:skill-name`.
## Directory Structure
```
my-plugin/
├── .claude-plugin/
│ └── plugin.json # Manifest (ONLY file inside .claude-plugin/)
├── skills/ # Agent Skills with SKILL.md
│ └── code-review/
│ └── SKILL.md
├── commands/ # Skills as simple Markdown files
│ └── review.md
├── agents/ # Custom agent definitions
│ └── reviewer.md
├── hooks/
│ └── hooks.json # Hook configurations
├── .mcp.json # MCP server configurations
├── .lsp.json # LSP server configurations
├── settings.json # Default settings (only "agent" key supported)
└── README.md # Documentation
```
**Critical:** skills/, agents/, hooks/ go at plugin root, NOT inside `.claude-plugin/`.
## plugin.json Manifest
See [quick-ref/manifest-schema.md](quick-ref/manifest-schema.md) for the complete schema.
```json
{
"name": "my-plugin",
"description": "A code quality plugin with review skills and formatting hooks",
"version": "1.0.0",
"author": {
"name": "Your Name"
},
"homepage": "https://github.com/user/my-plugin",
"repository": "https://github.com/user/my-plugin",
"license": "MIT"
}
```
- `name`: unique identifier, becomes skill namespace prefix
- `version`: semantic versioning (MAJOR.MINOR.PATCH)
- Only `name` and `description` are required
## Namespacing
Plugin skills are prefixed: `/my-plugin:hello`, `/my-plugin:review`.
This prevents conflicts between plugins with same skill names.
## Plugin Components
### Skills in plugins
Same as standalone skills but in `plugin-root/skills/`. Each needs `SKILL.md` with frontmatter.
### Agents in plugins
Same Markdown format as `.claude/agents/`. Placed in `plugin-root/agents/`.
### Hooks in plugins
Create `hooks/hooks.json` — same format as `hooks` in settings.json:
```json
{
"hooks": {
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{ "type": "command", "command": "jq -r '.tool_input.file_path' | xargs prettier --write" }]
}]
}
}
```
### MCP servers in plugins
Configure in `.mcp.json` at plugin root. Use `${CLAUDE_PLUGIN_ROOT}` for relative paths:
```json
{
"my-server": {
"command": "${CLAUDE_PLUGIN_ROOT}/servers/my-server",
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"],
"env": { "API_KEY": "${API_KEY}" }
}
}
```
### Default settings
`settings.json` at plugin root — currently only `agent` key supported:
```json
{ "agent": "security-reviewer" }
```
This activates the named agent as main thread when plugin is enabled.
## Development & Testing
```bash
# Test locally (no install needed)
claude --plugin-dir ./my-plugin
# Multiple plugins
claude --plugin-dir ./plugin-one --plugin-dir ./plugin-two
# Verify components
/help # Skills listed under namespace
/agents # Agents visible
/mcp # MCP servers running
```
Changes require restart to take effect.
## Distribution
1. **Version control** — push to Git repository
2. **Plugin marketplace** — submit via claude.ai/settings/plugins/submit
3. **Team sharing** — configure team marketplace in `.claude/plugins.json`
## When Plugin vs Standalone
| Standalone | Plugin |
|------------|--------|
| Personal workflow | Sharing with team/community |
| Single project | Reusable across projects |
| Quick experiments | Versioned releases |
| Short names (`/hello`) | Namespaced (`/plugin:hello`) |
**Tip:** Start standalone in `.claude/`, convert to plugin when ready to share.
## Anti-Patterns
| Anti-Pattern | Fix |
|--------------|-----|
| Components inside `.claude-plugin/` | Only plugin.json goes there; rest at root |
| No description in plugin.json | Required for discovery |
| Hardcoded paths in MCP config | Use `${CLAUDE_PLUGIN_ROOT}` |
| Missing README | Add docs for users installing the plugin |
## Checklist
- [ ] `.claude-plugin/plugin.json` with name, description, version
- [ ] Components at plugin root (not inside .claude-plugin/)
- [ ] Skills have proper SKILL.md with frontmatter
- [ ] MCP configs use `${CLAUDE_PLUGIN_ROOT}` for paths
- [ ] Tested with `--plugin-dir`
- [ ] README.md with installation instructions
- [ ] Semantic versioning
## Reference
- [Full manifest schema](quick-ref/manifest-schema.md)
- [Directory structure details](quick-ref/directory-structure.md)
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.