plugin-creator
Guide for creating and managing Claude Code plugins. Use when creating a new plugin, adding plugin components (commands, agents, skills, hooks, MCP servers), or validating plugin structure and configuration.
What this skill does
# Plugin Creator
This skill provides comprehensive guidance for creating, developing, and managing Claude Code plugins.
## About Plugins
Plugins are modular packages that extend Claude Code's capabilities by bundling multiple components into a single installable unit. Unlike individual skills, plugins can include:
- **Commands**: Custom slash commands for repeatable workflows
- **Agents**: Specialized subagents for autonomous task handling
- **Skills**: Model-invoked capabilities that trigger based on context
- **Hooks**: Event handlers that respond to system events
- **MCP Servers**: External tool integrations via Model Context Protocol
## Plugin Development Workflow
Follow these steps to create a new plugin:
1. Understand plugin requirements and scope
2. Initialize plugin structure
3. Add components (commands, agents, skills, hooks, MCP)
4. Validate plugin structure
5. Test plugin locally
6. Distribute plugin
### Step 1: Understanding Plugin Requirements
Before creating a plugin, clarify:
- What capabilities should the plugin provide?
- Which components are needed (commands, agents, skills, hooks, MCP)?
- Who is the target audience (personal, team, public)?
- What existing tools or workflows will it enhance?
Ask questions to gather concrete examples:
- "What tasks should this plugin help with?"
- "Do you need custom slash commands for specific workflows?"
- "Should Claude automatically use these capabilities (skills) or should they be user-invoked (commands)?"
- "Do you need to integrate with external tools (MCP servers)?"
### Step 2: Initialize Plugin Structure
Create basic plugin directory with `.claude-plugin/plugin.json` containing: name, description, version, and author fields.
**For detailed initialization steps:**
- See [references/plugin-structure.md](references/plugin-structure.md) for complete setup instructions and field requirements
### Step 3: Add Plugin Components
Based on requirements, add the appropriate components. See references for detailed guidance on each component type:
#### Adding Skills
Skills are model-invoked capabilities that Claude uses automatically based on task context.
**When to use:** For capabilities that should activate automatically (e.g., PDF processing, spreadsheet analysis, code review)
**How to add:**
1. Create `skills/` directory at plugin root
2. For each skill, create `skills/skill-name/SKILL.md`
3. Follow skill-creator guidance for SKILL.md structure
**Example:**
```
my-plugin/
├── .claude-plugin/
│ └── plugin.json
└── skills/
├── pdf-processor/
│ └── SKILL.md
└── data-analyzer/
└── SKILL.md
```
See [references/skills-in-plugins.md](references/skills-in-plugins.md) for complete guidance.
#### Adding Commands
Commands are custom slash commands for repeatable workflows.
**When to use:** For user-initiated workflows that should be explicitly invoked (e.g., /deploy, /review-pr, /generate-report)
**How to add:**
1. Create `commands/` directory at plugin root
2. For each command, create `commands/command-name.md`
3. Add YAML frontmatter with description
4. Write instructions for Claude
**Example command file** (`commands/deploy.md`):
```markdown
---
description: Deploy application to production environment
---
# Deploy Command
When this command is invoked, perform these steps:
1. Run pre-deployment checks
2. Build the application
3. Deploy to production
4. Verify deployment success
```
Commands support arguments: `/deploy staging` or `/deploy production`
See [references/commands.md](references/commands.md) for advanced command features.
#### Adding Agents
Agents are specialized subagents that Claude can invoke for specific task types.
**When to use:** For complex multi-step tasks that benefit from dedicated focus (e.g., code review agent, testing agent)
**How to add:**
1. Create `agents/` directory at plugin root
2. For each agent, create `agents/agent-name.md`
3. Define agent's role, capabilities, and workflow
See [references/agents.md](references/agents.md) for agent development patterns.
#### Adding Hooks
Hooks are event handlers that execute in response to system events.
**When to use:** For automation triggered by events (e.g., linting after edits, logging tool usage)
**How to add:**
1. Create `hooks/` directory at plugin root
2. Create `hooks/hooks.json` with hook configuration
3. Define event types, matchers, and commands
**Note:** Hooks are configured through Claude Code settings, not traditionally through plugin files. The hooks.json in plugins primarily serves as documentation or defaults.
See [references/hooks.md](references/hooks.md) for available events and configuration.
#### Adding MCP Servers
MCP servers connect Claude to external tools and services.
**When to use:** For integrating external APIs, databases, or services (e.g., GitHub API, Slack, database access)
**How to add:**
1. Create `.mcp.json` at plugin root
2. Configure MCP server connection details
3. Document server capabilities
See [references/mcp-integration.md](references/mcp-integration.md) for MCP configuration.
### Step 4: Validate Plugin Structure
Use the validation script to check plugin structure:
```bash
python3 utils/validate_plugin.py path/to/my-plugin
```
The validator checks:
- plugin.json format and required fields
- Component directory structure
- SKILL.md frontmatter for skills
- Command file format
- Overall plugin organization
Fix any validation errors before proceeding.
### Step 5: Adding Plugin to Marketplace Configuration
After creating and validating a new plugin, check if there is a marketplace configuration file that should be updated to include it:
**For marketplace repositories:**
- Check if `.claude-plugin/marketplace.json` exists in the repository
- If it exists, the new plugin may need to be added to the `plugins` array
- Each marketplace entry includes: name, source, description, version, and author
**Example marketplace.json entry:**
```json
{
"name": "my-plugin",
"source": {
"source": "github",
"repo": "username/repo-name"
},
"description": "Plugin description",
"version": "1.0.0",
"author": {
"name": "Author Name"
}
}
```
**Important:** Ask the user how they want to handle the newly created plugin:
- Add it to the marketplace configuration for distribution
- Test it out locally first before adding to marketplace
- Keep it as a standalone plugin (not in marketplace)
- Another option
The user's preference will determine whether marketplace configuration updates are needed.
### Step 6: Test Plugin Locally
Install the plugin locally for testing:
```bash
# Install from local directory
claude plugin install /path/to/my-plugin
```
Test all components:
- For skills: Trigger tasks that should activate the skills
- For commands: Run slash commands with `/command-name`
- For agents: Invoke tasks that should use the agents
- For hooks: Trigger events to verify hook execution
Iterate based on testing feedback.
### Step 7: Distribute Plugin
Choose distribution method:
**Option 1: Git Repository**
```bash
# Users install from git URL
claude plugin install https://github.com/username/my-plugin
```
**Option 2: Plugin Marketplace**
- Submit to marketplace for wider distribution
- Follow marketplace submission guidelines
- Provide documentation and examples
**Option 3: Local/Team Distribution**
- Share plugin directory with team
- Install from local path or shared network location
## Best Practices & Common Patterns
**For detailed information:**
- See [references/plugin-structure.md](references/plugin-structure.md) for:
- Common plugin patterns (single-skill, multi-skill, command-heavy, full-featured)
- Best practices for scope, naming, versioning, and documentation
- Component integration guidelines
## Resources
This skill includes detailed reference documentation for each plugin component:
- **references/skills-in-plugins.md**: Comprehensive guide for adding skills to plugins
- **referenceRelated 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.