home / skills / jeongsk / claude-skills / creating-plugins

creating-plugins skill

/.claude/skills/creating-plugins

This skill guides you through creating Claude Code plugins, enabling commands, agents, hooks, and MCP servers for extendable AI tooling.

npx playbooks add skill jeongsk/claude-skills --skill creating-plugins

Review the files below or copy the command above to add this skill to your agents.

Files (12)
SKILL.md
3.5 KB
---
name: creating-plugins
description: Guide for creating Claude Code plugins with commands, agents, skills, hooks, and MCP servers. Use when the user wants to create a new plugin, add plugin components (commands, agents, hooks), set up a plugin marketplace, or needs help with plugin.json configuration.
---

# Plugin Creator

Create Claude Code plugins to extend functionality with custom commands, agents, skills, hooks, and MCP servers.

## Plugin Creation Workflow

### 1. Gather Requirements

Ask the user:
- What functionality should the plugin provide?
- Which components are needed? (commands, agents, hooks, MCP servers, skills)
- Who is the target audience? (personal, team, public)

### 2. Create Plugin Structure

```
my-plugin/
├── .claude-plugin/
│   └── plugin.json      # Required
├── commands/            # Optional: slash commands
├── agents/              # Optional: sub-agents
├── skills/              # Optional: agent skills
├── hooks/               # Optional: event handlers
└── .mcp.json           # Optional: MCP servers
```

### 3. Write plugin.json

Minimal example:
```json
{
  "name": "my-plugin",
  "description": "Brief description",
  "version": "1.0.0",
  "author": {"name": "Author Name"}
}
```

### 4. Add Components

Based on user requirements, add:
- **Commands**: See [commands.md](references/commands.md) for slash command format
- **Agents**: See [agents.md](references/agents.md) for agent definition format
- **Hooks**: See [hooks.md](references/hooks.md) for event handler configuration
- **MCP Servers**: See [mcp-servers.md](references/mcp-servers.md) for server configuration

### 5. Test Locally

Create a test marketplace:
```bash
mkdir test-marketplace/.claude-plugin
```

Create `test-marketplace/.claude-plugin/marketplace.json`:
```json
{
  "name": "test-marketplace",
  "owner": {"name": "Developer"},
  "plugins": [{"name": "my-plugin", "source": "./my-plugin"}]
}
```

Test commands:
```
/plugin marketplace add ./test-marketplace
/plugin install my-plugin@test-marketplace
```

## Quick Reference

### Command File (commands/hello.md)
```markdown
---
description: Greet the user
---
# Hello Command
Greet the user warmly.
```

### Agent File (agents/reviewer.md)
```markdown
---
description: Code review specialist
capabilities: ["review", "suggestions"]
---
# Reviewer
Review code for quality and best practices.
```

### Hooks (hooks/hooks.json)
```json
{
  "hooks": {
    "PostToolUse": [{
      "matcher": "Write|Edit",
      "hooks": [{"type": "command", "command": "prettier --write $CLAUDE_FILE_PATH"}]
    }]
  }
}
```

## References

### Plugin Development
- [Plugins Guide](references/plugins-guide.md) - Complete plugin creation guide
- [Plugins Reference](references/plugins-reference.md) - Technical schemas and configurations
- [Plugin Structure](references/plugin-structure.md) - Directory layout and plugin.json schema
- [Marketplace](references/marketplace.md) - Plugin distribution

### Plugin Components
- [Commands](references/commands.md) - Slash command format
- [Agents](references/agents.md) - Sub-agent definitions
- [Hooks](references/hooks.md) - Event handlers
- [MCP Servers](references/mcp-servers.md) - External tool integration

### Skills Development
- [Skills Overview](references/skills-overview.md) - What skills are and how they work
- [Skills Best Practices](references/skills-best-practices.md) - Writing effective skills
- [Skills Schema](references/skills-schema.md) - SKILL.md format and validation

Overview

This skill guides you through creating Claude Code plugins that add commands, agents, skills, hooks, and MCP servers. It focuses on a practical workflow: gathering requirements, scaffolding the plugin, configuring plugin.json, adding components, and testing via a local marketplace. Use it to build personal, team, or public plugins that extend Claude Code functionality.

How this skill works

The skill inspects your goals and helps define required components (slash commands, sub-agents, skills, event hooks, and external MCP servers). It provides a recommended directory layout, a minimal plugin.json schema, component file examples, and a local testing flow using a test marketplace. It also outlines hook patterns and deployment steps so you can validate and iterate quickly.

When to use it

  • You want to create a new Claude Code plugin from scratch.
  • You need to add commands, agents, or skills to an existing plugin.
  • You plan to integrate external tools using an MCP server.
  • You need guidance configuring event hooks for automated workflows.
  • You want to test plugins locally before publishing to a marketplace.

Best practices

  • Start by collecting clear requirements: functionality, components, and target audience.
  • Keep plugin.json minimal but complete: name, description, version, and author.
  • Organize files into clear folders: commands, agents, skills, hooks, and optional MCP config.
  • Write small, focused commands and agents so each component is easy to test and maintain.
  • Test locally with a test marketplace and iterate on hooks and command behavior before release.

Example use cases

  • Create a code-review plugin with a reviewer agent and skills for linting and suggestions.
  • Add a slash command suite to automate repo tasks like formatting, testing, and changelog generation.
  • Build hooks that run formatters or linters automatically after tool use or file edits.
  • Integrate a CI-like MCP server to run external tests and report results back into Claude.
  • Assemble a team-facing plugin that bundles commands and agents tailored to your workflow.

FAQ

What minimal fields are required in plugin.json?

Include name, description, version, and an author object with at least a name.

How do I test a plugin locally?

Create a test marketplace directory with a .claude-plugin/marketplace.json listing your plugin, then add and install it via the plugin marketplace commands.