Plugin Dev — Plugin Development Toolkit

Plugin Development Toolkit

Comprehensive toolkit for developing Claude Code plugins with 7 specialized skills, 3 expert agents, and an 8-phase guided creation workflow.

7
Skills
3
Agents
58
Files
MD
Language

🛠️ Development Kit📚 Progressive Disclosure🤖 3 Expert Agents🔌 8-Phase Workflow

📚 What is this & why does it exist?

Plugin Dev is the meta-plugin — it teaches Claude Code how to build other plugins. It provides structured knowledge about every plugin component type (commands, agents, skills, hooks, MCP servers, settings) through progressive disclosure: concise SKILL.md files for quick reference, detailed references for deep understanding, and working examples for implementation. The /create-plugin command orchestrates a guided 8-phase workflow from discovery to documentation.

💡 Real-world analogy

Imagine a master craftsperson's workshop that not only has every tool imaginable, but also comes with apprenticeship programs for each tool. The plugin-dev toolkit is that workshop. The 7 skills are like specialized training manuals (one for woodworking, one for metalwork, etc.), the 3 agents are expert instructors who can review your work, and the /create-plugin command is a guided project plan that walks you from concept to finished product.

Architecture

flowchart LR
    subgraph CreatePlugin["8-Phase Workflow"]
        P1["Discovery"] --> P2["Planning"]
        P2 --> P3["Design"]
        P3 --> P4["Structure"]
        P4 --> P5["Implementation"]
        P5 --> P6["Validation"]
        P6 --> P7["Testing"]
        P7 --> P8["Documentation"]
    end
    subgraph Skills["7 Specialized Skills"]
        S1["plugin-structure"]
        S2["agent-development"]
        S3["command-development"]
        S4["hook-development"]
        S5["mcp-integration"]
        S6["plugin-settings"]
        S7["skill-development"]
    end
    subgraph Agents["3 Expert Agents"]
        A1["agent-creator"]
        A2["plugin-validator"]
        A3["skill-reviewer"]
    end
    P5 --> S1
    P5 --> S2
    P5 --> S3
    P5 --> S4
    P5 --> S5
    P6 --> A2
    P6 --> A3
    P5 --> A1

Key Components

ComponentFileRole
create-plugin.mdcommands/create-plugin.md8-phase guided plugin creation command
agent-creatoragents/agent-creator.mdGenerates agent configurations from descriptions
plugin-validatoragents/plugin-validator.mdValidates plugin structure, manifest, and security
skill-revieweragents/skill-reviewer.mdReviews skill quality and trigger effectiveness
plugin-structureskills/plugin-structure/SKILL.mdDirectory layout, manifest, auto-discovery
agent-developmentskills/agent-development/SKILL.mdAgent file structure, frontmatter, triggering
command-developmentskills/command-development/SKILL.mdSlash commands, YAML frontmatter, arguments
hook-developmentskills/hook-development/SKILL.mdEvent hooks, 9 event types, security patterns
mcp-integrationskills/mcp-integration/SKILL.mdMCP server configuration, authentication
plugin-settingsskills/plugin-settings/SKILL.mdPer-project YAML frontmatter settings
skill-developmentskills/skill-development/SKILL.mdSkill structure, progressive disclosure
manifest-referenceskills/plugin-structure/references/manifest-reference.mdDetailed plugin.json field reference
component-patternsskills/plugin-structure/references/component-patterns.mdReusable plugin component patterns

Data Flow

sequenceDiagram
    participant Dev as Developer
    participant Cmd as /create-plugin
    participant Skills as Skill System
    participant Agent as agent-creator
    participant Val as plugin-validator
    participant Rev as skill-reviewer

    Dev->>Cmd: /create-plugin "my-plugin"
    Cmd->>Dev: Phase 1: What does your plugin do?
    Dev->>Cmd: Description and requirements
    Cmd->>Skills: Load plugin-structure skill
    Skills-->>Cmd: Directory layout guidance
    Cmd->>Agent: Create agent configurations
    Agent-->>Cmd: Generated agent files
    Cmd->>Skills: Load hook-development skill
    Skills-->>Cmd: Hook patterns and examples
    Cmd->>Val: Validate plugin structure
    Val-->>Cmd: Validation report (issues/warnings)
    Cmd->>Rev: Review skill quality
    Rev-->>Cmd: Quality assessment
    Cmd->>Dev: Phase 8: Summary and README

Skill Progressive Disclosure

stateDiagram-v2
    [*] --> Metadata: Plugin loaded
    Metadata --> CoreSKILL: Skill triggered
    CoreSKILL --> References: Deep knowledge needed
    CoreSKILL --> Examples: Implementation needed
    References --> Scripts: Validation needed
    Examples --> Scripts: Testing needed
    Scripts --> [*]: Plugin validated

    state Metadata {
        [*] --> Name
        Name --> Description
        Description --> Triggers
    }
    state CoreSKILL {
        [*] --> API_Reference
        API_Reference --> Patterns
        Patterns --> BestPractices
    }

Each skill uses progressive disclosure: metadata is always loaded (trigger matching), the core SKILL.md (1,500–2,000 words) provides essential API reference, references/ holds 2-4 detailed docs, examples/ provides 3-12 working samples, and scripts/ offers validation utilities.

🚶 Step-by-Step: Creating a Plugin from Scratch

Follow a /create-plugin "my-security-scanner" command through the 8-phase workflow:

  1. Phase 1 — Discovery — The command asks what your plugin does, who it serves, and what problem it solves. You describe a security scanner plugin.
  2. Phase 2 — Planning — Determines which component types you need: a command for scanning, a hook for real-time monitoring, and a skill for security knowledge.
  3. Phase 3 — Design — Clarifying questions about scope: which vulnerability patterns, what languages, blocking vs warning behavior.
  4. Phase 4 — Structure — Creates the directory layout: .claude-plugin/plugin.json, commands/, hooks/, skills/. Uses the plugin-structure skill for guidance.
  5. Phase 5 — Implementation — The agent-creator generates agent configurations. The hook-development skill guides PreToolUse hook creation. The command-development skill structures the slash command.
  6. Phase 6 — Validation — The plugin-validator agent checks manifest fields, directory structure, naming conventions, and security patterns. Reports critical issues vs warnings.
  7. Phase 7 — Testing — You test the plugin in a Claude Code session. The validator verifies hook responses and command behavior.
  8. Phase 8 — Documentation — Generates README.md with installation instructions, usage examples, and configuration reference. The skill-reviewer checks documentation quality.

Code Examples

Plugin Manifest (plugin.json)

{
  "name": "my-security-scanner",
  "version": "1.0.0",
  "description": "Scans code for security vulnerabilities during editing",
  "author": { "name": "Developer", "email": "dev@example.com" },
  "mcpServers": {}
}

Agent Configuration (agents/scanner.md)

---
name: security-scanner
description: |
  Use this agent when reviewing code for security vulnerabilities.
  Examples:
  <example>scan this file for XSS vulnerabilities</example>
  <example>check for SQL injection in the API routes</example>
model: sonnet
color: red
tools:
  - Read
  - Grep
  - Glob
  - Bash
---

You are a security scanning expert. Analyze code for vulnerability patterns...

Hook Configuration (hooks/hooks.json)

{
  "PreToolUse": [
    {
      "matcher": "Write|Edit|MultiEdit",
      "hooks": [
        {
          "type": "command",
          "command": "python3 hooks/security_check.py"
        }
      ]
    }
  ]
}

Interactions

ModuleInterfaceData Exchanged
Claude Code CLICommand registrationPlugin manifest loaded at startup
All pluginsStructure guidanceProvides canonical plugin structure knowledge
hook-development skillHook systemDocuments all 9 hook event types
mcp-integration skillMCP protocolConfigures external tool servers
GitHub MarketplacePublishingGuides marketplace submission process

Directory Map

Source tree for Plugin Dev
plugin-dev/
├── .claude-plugin/plugin.json          ← Role: Plugin manifest
├── README.md                           ← Role: Plugin documentation
├── commands/
│   └── create-plugin.md                ← Role: 8-phase creation workflow
├── agents/
│   ├── agent-creator.md                ← Role: Agent file generator
│   ├── plugin-validator.md             ← Role: Structure validator
│   └── skill-reviewer.md               ← Role: Quality reviewer
└── skills/
    ├── plugin-structure/               ← Role: Directory layout guidance
    ├── agent-development/              ← Role: Agent creation guidance
    ├── command-development/            ← Role: Command patterns
    ├── hook-development/               ← Role: Hook event handling
    ├── mcp-integration/                ← Role: MCP server config
    ├── plugin-settings/                ← Role: Settings patterns
    └── skill-development/              ← Role: Skill authoring

Configuration Reference

ParameterDefaultDescription
plugin.json name(required)Plugin identifier for command namespacing
plugin.json version"1.0.0"Semantic version string
plugin.json description(required)Brief plugin description
plugin.json author{}Author name and email
plugin.json mcpServers{}MCP server definitions
agent.modelinheritAI model: inherit, sonnet, opus, haiku
agent.colorblueTerminal color: blue, cyan, green, yellow, magenta, red
agent.toolsallAllowed tool list or 'all'
hook.typecommandHook type: command or prompt
hook.matcher*Tool name regex for PreToolUse/PostToolUse
skill.version"1.0.0"Skill version for compatibility