Plugin Development
Skill1 starsChanged 7 months agoMITView on GitHub
Develop Claude Code plugins that bundle skills, commands, hooks, and MCP servers into distributable .claude-plugin packages. Full lifecycle from scaffold to publish. Trigger phrases: "create a plugin", "build a plugin", "plugin development", "new claude plugin", "package a plugin", "plugin scaffold"
In this repository164 other files it gives its agents.
- instrument-data-to-allotropeSkill
- literature-reviewSkill
- nextflow-developmentSkill
- scientific-problem-selectionSkill
- scvi-toolsSkill
- single-cell-rna-qcSkill
- discover-brandSkill
- enforce-voiceSkill
- generate-guidelinesSkill
- csat-reportSkill
- customer-escalationSkill
- customer-researchSkill
- draft-responseSkill
- kb-articleSkill
- sentiment-analysisSkill
- ticket-triageSkill
- analyzeSkill
- build-dashboardSkill
- create-vizSkill
- data-context-extractorSkill
- data-modelingSkill
- data-pipelineSkill
- etl-designSkill
- explore-dataSkill
- sql-queriesSkill
- statistical-analysisSkill
- validate-dataSkill
- write-querySkill
- accessibility-reviewSkill
- component-librarySkill
- design-critiqueSkill
- design-handoffSkill
- design-systemSkill
- frontend-designSkill
- research-synthesisSkill
- user-researchSkill
- ux-copySkill
- wireframingSkill
- Agent DevelopmentSkill
- CLAUDE.md ManagementSkill
- MCP Server BuilderSkill
- Prompt EngineeringSkill
- Skill CreatorSkill
- curriculum-designSkill
- lesson-planningSkill
- quiz-generatorSkill
- study-guideSkill
- tutoringSkill
- api-designSkill
- architectureSkill
- ci-cd-pipelineSkill
- code-reviewSkill
- database-migrationSkill
- debugSkill
- dependency-auditSkill
- deploy-checklistSkill
- documentationSkill
- error-handlingSkill
- git-workflowSkill
- incident-responseSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 12 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Create, bundle, and distribute Claude Code plugins that package skills, commands, hooks, and MCP servers into a single installable unit.
- Distinctive: line 43
Create the plugin directory:
- Very specific: line 67
Create plugin.json with required fields:
- Very specific: line 101
Skills: Write SKILL.md files following the standard skill format with frontmatter, workflow steps, examples, and best practices.
- Distinctive: line 113
Document each setting with description and valid values
- Distinctive: line 119
Verify each skill triggers correctly
- Distinctive: line 120
Test all slash commands with various inputs
- Distinctive: line 123
Test configuration loading and validation
- Distinctive: line 127
Run the build step for any compiled components
- Distinctive: line 129
Create the distributable package
- Distinctive: line 167
Version all components: - use the plugin version to track breaking changes
- Distinctive: line 168
Isolate MCP server dependencies: - avoid conflicts with the host environment
- Distinctive: line 170
Handle missing dependencies gracefully: - check and report, do not crash
- Distinctive: line 171
Test across platforms: - verify on macOS, Linux, and Windows
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Plugin Development
Create, bundle, and distribute Claude Code plugins that package skills, commands, hooks, and MCP servers into a single installable unit.
Prerequisites
- Claude Code CLI installed and configured
- Node.js 18+ for build tooling
- At least one skill, command, or MCP server to package
- Understanding of the plugin manifest format
Workflow
Step 1: Plan the Plugin
Define the plugin scope:
- Plugin name - human-readable name (e.g., "Docker Workflow Tools")
- Plugin ID - unique kebab-case identifier (e.g.,
docker-workflow-tools) - Components - list what the plugin includes:
- Skills (SKILL.md files)
- Slash commands
- Event hooks (pre-commit, post-push, etc.)
- MCP servers
- Configuration templates
- Dependencies - external tools or services required
- Target audience - who will use this plugin
Step 2: Scaffold the Plugin Structure
Create the plugin directory:
<plugin-id>/
plugin.json # Plugin manifest (required)
skills/
<skill-name>/
SKILL.md # Skill definition
commands/
<command-name>.js # Slash command handlers
hooks/
pre-commit.js # Git hook handlers
post-push.js
mcp-servers/
<server-name>/ # Bundled MCP server
src/
package.json
config/
defaults.json # Default configuration values
README.md # Plugin documentationStep 3: Write the Plugin Manifest
Create plugin.json with required fields:
{
"id": "<plugin-id>",
"name": "<Plugin Name>",
"version": "1.0.0",
"description": "What this plugin does",
"author": "<author>",
"license": "MIT",
"skills": ["skills/<skill-name>"],
"commands": {
"<command>": "commands/<command-name>.js"
},
"hooks": {
"pre-commit": "hooks/pre-commit.js"
},
"mcpServers": {
"<server-name>": {
"command": "node",
"args": ["mcp-servers/<server-name>/dist/index.js"]
}
},
"config": {
"schema": "config/schema.json",
"defaults": "config/defaults.json"
}
}Step 4: Implement Components
For each component type:
Skills: Write SKILL.md files following the standard skill format with frontmatter, workflow steps, examples, and best practices.
Commands: Implement slash command handlers that receive user arguments and return responses. Each command exports a handler function.
Hooks: Implement event handlers that run at specific lifecycle points. Hooks receive context about the triggering event and can modify behavior.
MCP Servers: Build standalone MCP servers that the plugin manages. Include build scripts and proper dependency isolation.
Step 5: Add Configuration
- Define a JSON Schema for plugin settings
- Set sensible defaults in
config/defaults.json - Document each setting with description and valid values
- Support environment variable overrides for secrets
Step 6: Test the Plugin
- Install the plugin locally for development testing
- Verify each skill triggers correctly
- Test all slash commands with various inputs
- Confirm hooks fire at the right lifecycle events
- Validate MCP servers start and respond properly
- Test configuration loading and validation
Step 7: Package and Distribute
- Run the build step for any compiled components
- Validate the manifest against the plugin schema
- Create the distributable package
- Publish to the plugin registry or distribute directly
Output Format
The skill produces:
- Complete plugin directory with all components
- Valid
plugin.jsonmanifest - Implemented skills, commands, hooks, and/or MCP servers
- Configuration schema and defaults
- README with installation and usage instructions
Examples
Example 1: CI/CD Plugin
User: "Create a plugin for managing CI/CD pipelines"
Action: Scaffold a plugin with skills for pipeline configuration, commands for triggering builds, hooks for pre-push validation, and an MCP server for build status queries.
Example 2: Code Quality Plugin
User: "Build a plugin that enforces code quality standards"
Action: Scaffold a plugin with a linting skill, pre-commit hooks for formatting, commands for running quality checks, and configuration for rule customization.
Example 3: Documentation Plugin
User: "Make a plugin for auto-generating project documentation"
Action: Scaffold a plugin with skills for API doc generation, a command for doc preview, and hooks that update docs on file changes.
Best Practices
- Keep plugins focused - one domain or workflow per plugin
- Minimize dependencies - fewer external requirements means easier adoption
- Provide sensible defaults - the plugin should work out of the box
- Version all components - use the plugin version to track breaking changes
- Isolate MCP server dependencies - avoid conflicts with the host environment
- Document installation steps - include any system-level prerequisites
- Handle missing dependencies gracefully - check and report, do not crash
- Test across platforms - verify on macOS, Linux, and Windows
Error Handling
| Error | Cause | Recovery |
| Invalid manifest | Malformed plugin.json | Validate against schema, fix syntax |
| Missing component | Referenced file not found | Check paths in manifest match actual files |
| Dependency conflict | Version mismatch with host | Pin versions, use isolated node_modules |
| Hook failure | Hook script throws error | Add try-catch, log errors, allow skip |
| MCP server crash | Server process exits unexpectedly | Implement restart logic and health checks |
| Config validation | Invalid user settings | Report which fields failed and valid options |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

