Agent skill
plugin-master
This skill should be used when the user asks to "create a plugin", "build a plugin", "scaffold a plugin", "add commands to a plugin", "add agents to a plugin", "add skills to a plugin", "package code as a plugin", "publish to marketplace", "validate plugin structure", or needs guidance on plugin architecture, directory layout, or plugin.json configuration.
Install this agent skill to your Project
npx add-skill https://github.com/JosiahSiegel/claude-plugin-marketplace/tree/main/plugins/plugin-master/skills/plugin-master
SKILL.md
Plugin Development Guide
Quick Reference
| Component | Location | Required |
|---|---|---|
| Plugin manifest | .claude-plugin/plugin.json |
Yes |
| Commands | commands/*.md |
No (auto-discovered) |
| Agents | agents/*.md |
No (auto-discovered) |
| Skills | skills/*/SKILL.md |
No (auto-discovered) |
| Hooks | hooks/hooks.json |
No |
| MCP Servers | .mcp.json |
No |
| Task | Action |
|---|---|
| Create plugin | Ask: "Create a plugin for X" |
| Validate plugin | Run: /validate-plugin |
| Install from marketplace | /plugin marketplace add user/repo then /plugin install name@user |
Critical Rules
Directory Structure
plugin-name/
├── .claude-plugin/
│ └── plugin.json # MUST be inside .claude-plugin/
├── agents/
│ └── domain-expert.md
├── commands/
├── skills/
│ └── skill-name/
│ ├── SKILL.md
│ ├── references/
│ └── examples/
└── README.md
Plugin.json Schema
{
"name": "plugin-name",
"version": "1.0.0",
"description": "Complete [domain] expertise. PROACTIVELY activate for: (1) ...",
"author": {
"name": "Author Name",
"email": "email@example.com"
},
"license": "MIT",
"keywords": ["keyword1", "keyword2"]
}
Validation Rules:
authorMUST be an object{ "name": "..." }- NOT a stringversionMUST be a string"1.0.0"- NOT a numberkeywordsMUST be an array["word1", "word2"]- NOT a string- Do NOT include
agents,skills,slashCommands- these are auto-discovered
YAML Frontmatter (REQUIRED)
ALL markdown files in agents/, commands/, skills/ MUST begin with frontmatter:
---
description: Brief description of what this component does
---
# Content...
Without frontmatter, components will NOT load.
Plugin Design Philosophy (2025)
Agent-First Design
- Primary interface: ONE expert agent named
{domain}-expert - Minimal commands: Only 0-2 for automation workflows
- Why: Users want conversational interaction, not command menus
Naming Standard:
docker-master→ agent nameddocker-expertterraform-master→ agent namedterraform-expert
Progressive Disclosure for Skills
Skills use three-tier loading:
- Frontmatter - Loaded at startup for triggering
- SKILL.md body - Loaded when skill activates
- references/ - Loaded only when specific detail needed
This enables unbounded capacity without context bloat.
Creating a Plugin
Step 1: Detect Repository Context
Before creating files, check:
# Check if in marketplace repo
if [[ -f .claude-plugin/marketplace.json ]]; then
PLUGIN_DIR="plugins/PLUGIN_NAME"
else
PLUGIN_DIR="PLUGIN_NAME"
fi
# Get author from git config
AUTHOR_NAME=$(git config user.name)
AUTHOR_EMAIL=$(git config user.email)
Step 2: Create Structure
mkdir -p $PLUGIN_DIR/.claude-plugin
mkdir -p $PLUGIN_DIR/agents
mkdir -p $PLUGIN_DIR/skills/domain-knowledge
Step 3: Create Files
- plugin.json - Manifest with metadata
- agents/domain-expert.md - Primary expert agent
- skills/domain-knowledge/SKILL.md - Core knowledge
- README.md - Documentation
Step 4: Register in Marketplace
CRITICAL: If .claude-plugin/marketplace.json exists at repo root, you MUST add the plugin:
{
"plugins": [
{
"name": "plugin-name",
"source": "./plugins/plugin-name",
"description": "Same as plugin.json description",
"version": "1.0.0",
"author": { "name": "Author" },
"keywords": ["same", "as", "plugin.json"]
}
]
}
Component Types
Commands
User-initiated slash commands in commands/*.md:
---
description: What this command does
---
# Command Name
Instructions for Claude to execute...
Agents
Autonomous subagents in agents/*.md:
---
name: agent-name
description: |
Use this agent when... Examples:
<example>
Context: ...
user: "..."
assistant: "..."
<commentary>Why trigger</commentary>
</example>
model: inherit
color: blue
---
System prompt for agent...
Skills
Dynamic knowledge in skills/skill-name/SKILL.md:
---
name: skill-name
description: When to use this skill...
---
# Skill content with progressive disclosure...
Hooks
Event automation in hooks/hooks.json:
{
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/lint.sh"
}]
}]
}
Events: PreToolUse, PostToolUse, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification, Stop, SubagentStop
Best Practices
Naming Conventions
- Plugins:
kebab-case(e.g.,code-review-helper) - Commands: verb-based (e.g.,
review-pr,run-tests) - Agents: role-based (e.g.,
code-reviewer,test-generator) - Skills: topic-based (e.g.,
api-design,error-handling)
Portability
Use ${CLAUDE_PLUGIN_ROOT} for all internal paths:
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/run.sh"
Never use hardcoded absolute paths.
Platform Notes
- Windows: Use GitHub marketplace installation (local paths may fail)
- Git Bash/MinGW: Detect with
$MSYSTEM, use GitHub method - Mac/Linux: All installation methods work
Troubleshooting
| Issue | Solution |
|---|---|
| Plugin not loading | Check plugin.json is in .claude-plugin/ |
| Commands missing | Verify frontmatter has description field |
| Agent not triggering | Add <example> blocks to description |
| Marketplace not found | Ensure repo is public, check path in marketplace.json |
Additional Resources
For detailed information, see:
references/manifest-reference.md- Complete plugin.json fieldsreferences/component-patterns.md- Advanced component patternsreferences/publishing-guide.md- Marketplace publishing detailsexamples/minimal-plugin.md- Simplest working pluginexamples/full-plugin.md- Complete plugin with all features
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
opentofu-guide
Comprehensive OpenTofu expertise including migration from Terraform, state encryption, OpenTofu 1.10/1.11 features (OCI registry, native S3 locking, ephemeral resources, enabled meta-argument), and CI/CD integration. Covers when to use OpenTofu vs Terraform with decision matrix.
terraform-tasks
Specialized Terraform task execution skill for autonomous infrastructure operations. Handles code generation, debugging, version management (1.10-1.14+), security scanning, and architecture design across all providers (AWS 6.0, AzureRM 4.x, GCP) and platforms. Covers ephemeral values, Terraform Stacks, policy-as-code, and 2025 best practices.
shellcheck-cicd-2025
ShellCheck validation as non-negotiable 2025 workflow practice
bash-master
Expert bash/shell scripting system across ALL platforms. PROACTIVELY activate for: (1) ANY bash/shell script task, (2) System automation, (3) DevOps/CI/CD scripts, (4) Build/deployment automation, (5) Script review/debugging, (6) Converting commands to scripts. Provides: Google Shell Style Guide compliance, ShellCheck validation, cross-platform compatibility (Linux/macOS/Windows/containers), POSIX compliance, security hardening, error handling, performance optimization, testing with BATS, and production-ready patterns. Ensures professional-grade, secure, portable scripts every time.
process-substitution-fifos
Process substitution, named pipes (FIFOs), and advanced IPC patterns for efficient bash data streaming (2025)
modern-automation-patterns
Modern DevOps and CI/CD automation patterns with containers and cloud (2025)
Didn't find tool you were looking for?