| name | plugin-publishing |
| description | Knowledge for extracting local Claude Code components and publishing to plugin marketplaces. Use when helping users package skills, agents, hooks into shareable plugins. Triggers: publish, marketplace, share skill, share agent, extract plugin, contribute, upload plugin. |
Plugin Publishing Knowledge
This skill provides knowledge for extracting locally installed Claude Code components and packaging them into shareable plugins for marketplace submission.
Claude Code Installation Paths
Default Locations
| Component | Path | Format |
|---|
| Skills | ~/.claude/skills/<name>/SKILL.md | Directory with SKILL.md |
| Agents | ~/.claude/agents/<name>.md | Single markdown file |
| Commands | ~/.claude/commands/<name>.md | Single markdown file |
| Settings (hooks) | ~/.claude/settings.json | JSON with hooks key |
| MCP Servers | ~/.claude/mcp.json | JSON configuration |
Project-Level Locations
Projects may have local overrides in:
.claude/skills/
.claude/agents/
.claude/commands/
.claude/settings.json
Plugin Structure Requirements
A valid plugin MUST have:
<plugin-name>/
โโโ .claude-plugin/
โ โโโ plugin.json # REQUIRED: Plugin manifest
โโโ README.md # REQUIRED: Documentation
โโโ [components...] # At least one component
plugin.json Schema
{
"name": "plugin-name",
"version": "1.0.0",
"description": "What it does",
"author": {
"name": "Author Name",
"email": "optional@email.com"
},
"homepage": "https://...",
"repository": "https://...",
"license": "MIT",
"keywords": ["tag1", "tag2"],
Component Formats
Skill Format (SKILL.md)
---
name: skill-name
description: What it does. Use when [triggers]. Triggers: keyword1, keyword2.
allowed-tools: Read, Grep, Glob, Bash
---
Step-by-step guide for Claude.
Concrete usage examples.
Validation Rules:
- MUST have YAML frontmatter with
name and description
description SHOULD include trigger keywords
allowed-tools restricts what tools skill can use
Agent Format (.md)
---
name: agent-name
description: What it does. Use for [use cases].
tools: Read, Grep, Glob, Bash, Edit, Write
model: inherit
---
You are a specialized agent for [purpose].
1. Step 1
2. Step 2
Validation Rules:
- MUST have YAML frontmatter with
name and description
tools lists allowed tool names
model can be: inherit, sonnet, opus, haiku
Command Format (.md)
---
description: Brief description of what command does
argument-hint: [required-arg] [optional-arg]
allowed-tools: Bash, Read
---
- `$1` - First positional argument
- `$ARGUMENTS` - All arguments as string
What to do when user invokes this command.
Hooks Format (hooks.json)
{
"hooks": {
"PostToolUse": [
{
"matcher": "Bash|Write",
"hooks": [{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/my-hook.sh",
"timeout": 30
}]
}
]
}
}
Hook Events:
PreToolUse - Before tool execution
PostToolUse - After tool execution
UserPromptSubmit - When user submits prompt
SessionStart - When session begins
SessionEnd - When session ends
Marketplace Formats
marketplace.json
{
"name": "marketplace-name",
"version": "1.0.0",
"metadata": {
"description": "Marketplace description",
"pluginRoot": "./plugins"
},
"owner": {
"name": "Owner Name"
},
"plugins": ["plugin-a", "plugin-b"],
"categories": ["devops", "development", "testing"]
}
catalog.json (Auto-Generated)
{
"generated_at": "ISO8601 timestamp",
"total_plugins": 5,
"verified_plugins": 2,
"plugins": [
{
"name": "plugin-name",
"version": "1.0.0",
"description": "...",
"author": "Name",
"category": "development",
"keywords": [],
"components": {
"commands": 0,
"agents": 1,
"skills": 1,
"hooks"
Category Selection Guide
| Category | Use For |
|---|
devops | Deployment, CI/CD, infrastructure, Docker, Kubernetes |
development | Coding workflows, git, testing, debugging |
security | Security scanning, vulnerability detection, secrets |
testing | Test generation, coverage, mutation testing |
documentation | Doc generation, README creation, API docs |
utilities | General-purpose tools, formatting, misc |
Keyword Suggestions
Extract keywords from:
- Component names (e.g.,
parallel-worker โ parallel, worker)
- Technologies mentioned (e.g.,
git, docker, pytest)
- Actions performed (e.g.,
deploy, test, monitor)
- Problem domain (e.g.,
orchestration, automation)
Related Component Detection
Skills and agents often work together. Detect relationships by:
- Name patterns:
foo-orchestrator + foo-worker + foo-monitor
- Cross-references: Agent mentions "use foo-skill"
- Shared keywords: Multiple components with same domain terms
- Explicit dependencies: Frontmatter mentions other components
Validation Checklist
Before submission, verify:
Common Issues to Fix During Extraction
| Issue | Fix |
|---|
Hardcoded paths (/home/user/...) | Replace with relative or ~ |
| Local usernames | Replace with generic terms |
| API keys or secrets | Remove or use environment variables |
| Machine-specific configs | Generalize or document requirements |
| Missing frontmatter | Add required YAML frontmatter |
| Inconsistent naming | Standardize to lowercase-hyphenated |
Marketplace Submission Workflow
- Fork the marketplace repository
- Clone your fork locally
- Create plugin in
plugins/<name>/ directory
- Validate with
python tools/validate.py <name>
- Commit with descriptive message
- Push to your fork
- Create PR with plugin details
PR Description Template
## New Plugin: <name>
**Description:** <one-line description>
**Category:** <category>
**Components:**
- Skills: <count>
- Agents: <count>
- Commands: <count>
- Hooks: yes/no
**Use Cases:**
- <use case 1>
- <use case 2>
**Testing:**
- [ ] Validated with `python tools/validate.py`
- [ ] Tested locally
- [ ] README complete