Creating New Plugins

Follow a structured approach to create new Claude Code plugins and register them in your marketplace. Use when building plugins for commands, skills, hooks, or MCP servers.

7 stars

Best use case

Creating New Plugins is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Follow a structured approach to create new Claude Code plugins and register them in your marketplace. Use when building plugins for commands, skills, hooks, or MCP servers.

Teams using Creating New Plugins should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/new-plugins/SKILL.md --create-dirs "https://raw.githubusercontent.com/jack-michaud/faire/main/.claude/skills/new-plugins/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/new-plugins/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Creating New Plugins Compares

Feature / AgentCreating New PluginsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Follow a structured approach to create new Claude Code plugins and register them in your marketplace. Use when building plugins for commands, skills, hooks, or MCP servers.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Creating New Plugins

## Overview

A systematic workflow for creating new Claude Code plugins and adding them to your plugin marketplace. This skill guides you through plugin structure, manifest creation, and marketplace registration.

## When to Use

- Creating a new plugin from scratch
- Building plugins with commands, skills, hooks, or MCP servers
- Adding plugins to an existing marketplace
- Structuring a plugin following best practices

## Process

### Step 1: Understand Plugin Requirements

Before creating a plugin, clarify:
- **Purpose**: What does the plugin do? (e.g., browser testing, code review, deployment automation)
- **Components**: What will it include? Commands, skills, hooks, MCP servers, or agents?
- **Target audience**: Who will use this plugin?
- **Dependencies**: What external tools or services does it need?

Ask clarifying questions if the requirements are ambiguous.

### Step 2: Create Plugin Directory Structure

Create the plugin directory with the standard structure:

```
plugin-name/
├── plugin.json          # Plugin manifest
├── .mcp.json           # MCP server config (if using MCP)
├── README.md           # Documentation
├── commands/           # Custom slash commands (optional)
│   └── command-name.md
├── agents/             # Custom agents (optional)
│   └── agent-name.md
├── skills/             # Agent skills (optional)
│   └── skill-name/
│       └── SKILL.md
└── hooks/              # Event handlers (optional)
    └── hooks.json
```

Only create directories for components you're actually using.

### Step 3: Create plugin.json Manifest

Create a `plugin.json` file at the plugin root with required metadata:

```json
{
  "name": "plugin-name",
  "version": "1.0.0",
  "description": "Clear description of what the plugin does",
  "author": "Your Name",
  "license": "MIT",
  "mcpServers": [
    {
      "name": "server-name",
      "config": {
        "command": "command-to-run",
        "args": ["arg1", "arg2"]
      }
    }
  ]
}
```

**Key fields:**
- `name`: Lowercase, hyphenated plugin identifier
- `version`: Semantic versioning (1.0.0)
- `description`: One-sentence description of functionality
- `author`: Your name or organization
- `mcpServers`: Array of MCP server configurations (if applicable)

### Step 4: Create Supporting Files

Create necessary supporting files based on plugin components:

**For MCP servers:**
- Create `.mcp.json` with server configuration matching `plugin.json`

**For all plugins:**
- Create `README.md` with documentation including:
  - Features and capabilities
  - Installation instructions
  - Usage examples
  - Requirements and troubleshooting

### Step 5: Register in Marketplace

Add the plugin to your marketplace's `marketplace.json`:

1. Open `.claude-plugin/marketplace.json`
2. Add a new entry in the `plugins` array:

```json
{
  "name": "plugin-name",
  "source": "./plugin-name",
  "description": "Clear description of what the plugin does",
  "version": "1.0.0",
  "author": {
    "name": "Your Name"
  },
  "license": "MIT",
  "homepage": "https://your-repo-url",
  "repository": "https://your-repo-url",
  "keywords": ["keyword1", "keyword2"],
  "category": "category-name",
  "tags": ["tag1", "tag2"]
}
```

3. Ensure JSON is valid (valid commas, proper nesting)
4. Save the file

### Step 6: Verify Plugin Structure

Check that:
- Plugin directory exists at the path specified in `marketplace.json`
- `plugin.json` is in the plugin root (not in a subdirectory)
- Required directories (`commands/`, `skills/`, etc.) are at plugin root, not in `.claude-plugin/`
- All component markdown files are properly formatted
- `README.md` exists with clear documentation
- JSON files are valid (use `jq` to validate if needed)

### Step 7: Test the Plugin

To test locally:

1. Start Claude Code from the marketplace parent directory
2. Use `/plugin marketplace add ./path/to/marketplace`
3. Use `/plugin install plugin-name@marketplace-name`
4. Restart Claude Code
5. Verify with `/help` to see new commands
6. Test all plugin functionality

## Common Patterns

### Creating an MCP Plugin

1. Set up directory structure with `plugin.json` and `.mcp.json`
2. In `plugin.json`, add `mcpServers` array with server details
3. In `.mcp.json`, include `mcpServers` object with configuration
4. Document required dependencies in `README.md`
5. Test that MCP server starts correctly

### Creating a Skills Plugin

1. Create `skills/` directory at plugin root
2. Create subdirectory for each skill: `skills/skill-name/`
3. Add `SKILL.md` file in each skill subdirectory
4. Update `plugin.json` to reference skills: `"skills": ["skills/"]`
5. Document skill usage in `README.md`

### Creating a Commands Plugin

1. Create `commands/` directory at plugin root
2. Create markdown files: `commands/command-name.md`
3. Format with YAML frontmatter and markdown content
4. Document commands in `README.md`
5. Test commands with `/command-name`

## Critical Points

**Directory Structure:**
- Component directories (`commands/`, `skills/`, etc.) go at plugin root
- Never place components inside `.claude-plugin/`
- `plugin.json` must be at plugin root, not nested

**Manifest Files:**
- `plugin.json` defines the plugin itself
- `marketplace.json` registers the plugin in your marketplace
- Both must be valid JSON with proper formatting

**Naming Conventions:**
- Plugin names: lowercase, hyphenated (e.g., `browser-testing`, `code-review`)
- Directory names: match plugin name or use descriptive names
- Commands: lowercase, hyphenated (e.g., `/test-browser`, `/review-pr`)

**Metadata:**
- Version follows semantic versioning (MAJOR.MINOR.PATCH)
- Description is concise (one sentence)
- Keywords and tags aid discoverability
- License should be specified (typically MIT)

## Troubleshooting

**Plugin doesn't appear in marketplace:**
- Verify entry exists in `.claude-plugin/marketplace.json`
- Check that source path is correct relative to marketplace
- Ensure JSON is valid with no syntax errors
- Restart Claude Code

**Commands not available after installation:**
- Verify `commands/` directory is at plugin root
- Check command markdown files have proper frontmatter
- Restart Claude Code to load changes
- Check `/help` to see if commands are listed

**MCP server fails to start:**
- Verify `.mcp.json` has correct command and arguments
- Test command runs manually (e.g., `npx @playwright/mcp@latest`)
- Check all dependencies are installed
- Review MCP server documentation

## Next Steps

After creating a plugin:
1. Test all functionality thoroughly
2. Add to your marketplace for team access
3. Document any team-specific setup requirements
4. Share marketplace with team members
5. Iterate based on feedback

Related Skills

Creating Slash Commands

7
from jack-michaud/faire

Build custom slash commands in Claude Code with YAML frontmatter, permissions, and best practices. Use when creating automation workflows, project-specific commands, or standardizing repetitive tasks.

Creating Hooks

7
from jack-michaud/faire

Build event-driven hooks in Claude Code for validation, setup, and automation. Use when you need to validate inputs, check environment state, or automate tasks at specific lifecycle events.

Creating Skills

7
from jack-michaud/faire

A meta-skill for documenting and creating reusable skills for Claude Code agents. Use when you discover a technique, pattern, or workflow worth documenting for reuse across projects.

Ticket Workflow

7
from jack-michaud/faire

Autonomous ticket-to-production lifecycle with promptlet-driven phases. Use when executing /ticket commands or working on ticket-driven development.

setup-sprite

7
from jack-michaud/faire

Set up a reproducible remote dev environment using sprites with credential-free git sync. Use when user asks to "set up a sprite", "create a remote dev environment", "use sprites", or mentions wanting a reproducible remote environment for a project.

Writing python services

7
from jack-michaud/faire

Writing a class with encapsulated logic that interfaces with an external system. Logging, APIs, etc.

stacked-pr-review

7
from jack-michaud/faire

Use when addressing PR review comments on stacked jj branches. Triggered by phrases like "address review comments", "fix PR feedback", "respond to review on stacked branch", or "update the PR with reviewer suggestions".

Python Code Style

7
from jack-michaud/faire

Use when writing python code. Can be used for code review.

Plan

7
from jack-michaud/faire

My planning skill that has additional instructions. Always use when entering plan mode.

Modal

7
from jack-michaud/faire

No description provided.

merging-pr-stack

7
from jack-michaud/faire

Use when merging a stack of stacked PRs with jj. Triggered by phrases like "merge the PR stack", "merge the stacked PRs", "land these PRs", or "merge the stack into main".

Create Claude Channel

7
from jack-michaud/faire

Step-by-step procedure for building a Claude Code channel integration. Use when creating a new channel plugin that connects Claude Code to external systems via MCP, named pipes, webhooks, or chat platforms.