Skip to content

Commit 072e7b9

Browse files
sjnimsclaude
andauthored
feat: add marketplace-structure skill for plugin marketplace creation (#89)
## Summary Add comprehensive marketplace development support to plugin-dev, addressing the gap where users asking to create or manage plugin marketplaces had no dedicated guidance. This repository itself is a marketplace, serving as a reference implementation. - New `marketplace-structure` skill with complete schema reference, distribution patterns, and 3 example templates - New `/plugin-dev:create-marketplace` command with 8-phase guided workflow - Extended `plugin-validator` agent to validate marketplace.json structure - Enhanced `/plugin-dev:create-plugin` Phase 8 with marketplace publishing integration ## Problem Fixes #86 Users asking to "create a marketplace", "organize multiple plugins", or "distribute plugins" had no dedicated skill guidance. The `plugin-structure` skill only mentioned marketplaces incidentally and didn't cover: - `marketplace.json` schema and required fields - Multi-plugin organization within a marketplace - Plugin source types (GitHub, git URLs, relative paths) - Distribution strategies (GitHub hosting, team settings) - The `strict` vs. non-strict mode distinction ## Solution ### New Skill: `marketplace-structure` ``` skills/marketplace-structure/ ├── SKILL.md (~1,800 words) ├── references/ │ ├── schema-reference.md # Complete marketplace.json field reference │ └── distribution-patterns.md # Hosting strategies, team setup └── examples/ ├── minimal-marketplace.md # Single plugin marketplace ├── team-marketplace.md # Internal company marketplace └── community-marketplace.md # Public multi-plugin marketplace ``` ### New Command: `/plugin-dev:create-marketplace` 8-phase guided workflow: 1. Discovery - Understand marketplace purpose 2. Plugin Planning - Determine plugins to include 3. Metadata Design - Configure marketplace metadata 4. Structure Creation - Create directory and manifest 5. Plugin Entry Configuration - Configure each plugin entry 6. Distribution Setup - Configure team settings or community guidelines 7. Validation - Run marketplace validators 8. Testing & Finalization - Test installation and finalize ### Enhanced Components - **plugin-validator agent**: Added marketplace validation (schema, entries, duplicates, source paths) - **/plugin-dev:create-plugin Phase 8**: Now loads marketplace-structure skill and guides through marketplace entry creation when publishing ### Alternatives Considered 1. **Add to plugin-structure skill** - Rejected: Different abstraction level (marketplace contains plugins), would bloat skill beyond 2,000 words 2. **Add to plugin-settings skill** - Rejected: plugin-settings is about .local.md configuration, not marketplace setup 3. **Document only in README** - Rejected: Actionable guidance should be model-invoked ## Changes - `plugins/plugin-dev/skills/marketplace-structure/` - New skill directory with 6 files - `plugins/plugin-dev/commands/create-marketplace.md` - New 8-phase workflow command - `plugins/plugin-dev/agents/plugin-validator.md` - Extended with marketplace validation - `plugins/plugin-dev/commands/create-plugin.md` - Enhanced Phase 8 for marketplace publishing - `CLAUDE.md` - Updated to reflect 8 skills, 2 commands - `.claude-plugin/marketplace.json` - Description updated - `plugins/plugin-dev/.claude-plugin/plugin.json` - Description updated ## Testing - [x] All markdown files pass `markdownlint` - [x] New skill follows established patterns (frontmatter, progressive disclosure) - [x] New command follows create-plugin structure - [x] plugin-validator agent has valid frontmatter and examples ### Manual Testing Checklist - [ ] Skill triggers on "create a marketplace" queries - [ ] `/plugin-dev:create-marketplace` command appears and executes - [ ] plugin-validator validates marketplace.json correctly --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent f4a1d74 commit 072e7b9

12 files changed

Lines changed: 1908 additions & 26 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"plugins": [
1212
{
1313
"name": "plugin-dev",
14-
"description": "Comprehensive toolkit for developing Claude Code plugins. Includes 7 expert skills covering hooks, MCP integration, commands, agents, and best practices. AI-assisted plugin creation and validation.",
14+
"description": "Comprehensive toolkit for developing Claude Code plugins. Includes 8 expert skills covering hooks, MCP integration, commands, agents, marketplaces, and best practices. AI-assisted plugin creation and validation.",
1515
"version": "0.1.0",
1616
"author": {
1717
"name": "Daisy Hollman",

CLAUDE.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Overview
66

7-
This repository is a **plugin marketplace** containing the **plugin-dev** plugin - a comprehensive toolkit for developing Claude Code plugins. It provides 7 specialized skills, 3 agents, and 1 guided workflow command for building high-quality plugins.
7+
This repository is a **plugin marketplace** containing the **plugin-dev** plugin - a comprehensive toolkit for developing Claude Code plugins. It provides 8 specialized skills, 3 agents, and 2 guided workflow commands for building high-quality plugins and marketplaces.
88

99
## Quick Reference
1010

@@ -22,7 +22,7 @@ plugin-dev/ # Marketplace root
2222
│ │ └── plugin.json # Plugin manifest
2323
│ ├── commands/ # Slash commands
2424
│ ├── agents/ # Autonomous agents
25-
│ └── skills/ # 7 specialized skills
25+
│ └── skills/ # 8 specialized skills
2626
└── .github/workflows/ # CI/CD workflows
2727
```
2828

@@ -46,7 +46,7 @@ Each skill follows progressive disclosure:
4646
- `examples/` - Complete working examples and templates for copy-paste
4747
- `scripts/` - Utility scripts (executable without loading into context)
4848

49-
**The 7 Skills:**
49+
**The 8 Skills:**
5050

5151
1. `hook-development` - Event-driven automation with prompt-based hooks
5252
2. `mcp-integration` - Model Context Protocol server configuration
@@ -55,8 +55,9 @@ Each skill follows progressive disclosure:
5555
5. `command-development` - Slash commands with frontmatter
5656
6. `agent-development` - Autonomous agents with AI-assisted generation
5757
7. `skill-development` - Creating skills with progressive disclosure
58+
8. `marketplace-structure` - Plugin marketplace creation and distribution
5859

59-
**Note:** `mcp-integration`, `plugin-structure`, and `skill-development` have no utility scripts—they provide documentation and examples only.
60+
**Note:** `mcp-integration`, `plugin-structure`, `skill-development`, and `marketplace-structure` have no utility scripts—they provide documentation and examples only.
6061

6162
### Writing Style
6263

@@ -174,7 +175,9 @@ Hooks defined in `hooks/hooks.json`:
174175

175176
## Workflow
176177

177-
The `/plugin-dev:create-plugin` command provides an 8-phase guided workflow:
178+
### `/plugin-dev:create-plugin`
179+
180+
An 8-phase guided workflow for plugin creation:
178181

179182
1. Discovery - Understand requirements
180183
2. Component Planning - Determine needed components
@@ -183,13 +186,26 @@ The `/plugin-dev:create-plugin` command provides an 8-phase guided workflow:
183186
5. Component Implementation - Build each component
184187
6. Validation - Run validators
185188
7. Testing - Verify in Claude Code
186-
8. Documentation - Finalize README
189+
8. Documentation - Finalize README and marketplace publishing
190+
191+
### `/plugin-dev:create-marketplace`
192+
193+
An 8-phase guided workflow for marketplace creation:
194+
195+
1. Discovery - Understand marketplace purpose
196+
2. Plugin Planning - Determine plugins to include
197+
3. Metadata Design - Configure marketplace metadata
198+
4. Structure Creation - Create directory and manifest
199+
5. Plugin Entry Configuration - Configure each plugin entry
200+
6. Distribution Setup - Configure team settings or community guidelines
201+
7. Validation - Run marketplace validators
202+
8. Testing & Finalization - Test installation and finalize
187203

188204
## Validation Agents
189205

190206
Use these agents proactively after creating components:
191207

192-
- **plugin-validator**: Validates entire plugin structure
208+
- **plugin-validator**: Validates entire plugin structure and marketplace.json
193209
- **skill-reviewer**: Reviews skill quality and triggering
194210
- **agent-creator**: Generates new agents from descriptions
195211

plugins/plugin-dev/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "plugin-dev",
33
"version": "0.1.0",
4-
"description": "Comprehensive toolkit for developing Claude Code plugins. Includes 7 expert skills covering hooks, MCP integration, commands, agents, and best practices. AI-assisted plugin creation and validation.",
4+
"description": "Comprehensive toolkit for developing Claude Code plugins. Includes 8 expert skills covering hooks, MCP integration, commands, agents, marketplaces, and best practices. AI-assisted plugin creation and validation.",
55
"author": {
66
"name": "Daisy Hollman",
77
"email": "daisy@anthropic.com"

plugins/plugin-dev/agents/plugin-validator.md

Lines changed: 127 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: plugin-validator
3-
description: Use this agent when the user asks to "validate my plugin", "check plugin structure", "verify plugin is correct", "validate plugin.json", "check plugin files", or mentions plugin validation. Also trigger proactively after user creates or modifies plugin components. Examples:
3+
description: Use this agent when the user asks to "validate my plugin", "check plugin structure", "verify plugin is correct", "validate plugin.json", "check plugin files", "validate marketplace", "check marketplace.json", "verify marketplace structure", or mentions plugin or marketplace validation. Also trigger proactively after user creates or modifies plugin or marketplace components. Examples:
44

55
<example>
66
Context: User finished creating a new plugin
@@ -31,22 +31,42 @@ Manifest modified, validate to ensure correctness.
3131
assistant: "I'll use the plugin-validator agent to check the manifest."
3232
</example>
3333

34+
<example>
35+
Context: User created or modified a marketplace
36+
user: "I've set up a marketplace.json for my plugins"
37+
assistant: "Let me validate the marketplace structure."
38+
<commentary>
39+
Marketplace created, validate schema and plugin entries.
40+
</commentary>
41+
assistant: "I'll use the plugin-validator agent to check the marketplace."
42+
</example>
43+
3444
model: inherit
3545
color: yellow
3646
tools: ["Read", "Grep", "Glob", "Bash"]
3747
---
3848

39-
You are an expert plugin validator specializing in comprehensive validation of Claude Code plugin structure, configuration, and components.
49+
You are an expert plugin and marketplace validator specializing in comprehensive validation of Claude Code plugin structure, configuration, components, and plugin marketplaces.
4050

4151
**Your Core Responsibilities:**
52+
4253
1. Validate plugin structure and organization
4354
2. Check plugin.json manifest for correctness
4455
3. Validate all component files (commands, agents, skills, hooks)
4556
4. Verify naming conventions and file organization
46-
5. Check for common issues and anti-patterns
47-
6. Provide specific, actionable recommendations
57+
5. Validate marketplace.json schema and plugin entries
58+
6. Check for common issues and anti-patterns
59+
7. Provide specific, actionable recommendations
60+
61+
## Detection: Plugin vs. Marketplace
4862

49-
**Validation Process:**
63+
First, determine what type of validation is needed:
64+
65+
- **Marketplace**: `.claude-plugin/marketplace.json` exists at repository root
66+
- **Plugin**: `.claude-plugin/plugin.json` exists (may be inside a marketplace's `plugins/` directory)
67+
- **Both**: Repository is a marketplace containing plugins (validate both)
68+
69+
**Plugin Validation Process:**
5070

5171
1. **Locate Plugin Root**:
5272
- Check for `.claude-plugin/plugin.json`
@@ -133,15 +153,66 @@ You are an expert plugin validator specializing in comprehensive validation of C
133153
- Hooks don't have obvious security issues
134154
- No secrets in example files
135155

156+
**Marketplace Validation Process:**
157+
158+
When `.claude-plugin/marketplace.json` is detected, perform marketplace-specific validation:
159+
160+
1. **Validate Marketplace Schema**:
161+
- Check JSON syntax
162+
- Verify required fields:
163+
- `name`: kebab-case string, 3-50 characters
164+
- `owner`: object with at least `name` field
165+
- `plugins`: non-empty array
166+
- Validate optional `metadata` object:
167+
- `description`: string
168+
- `version`: semver format
169+
- `pluginRoot`: valid relative path
170+
171+
2. **Validate Plugin Entries**:
172+
- For each entry in `plugins` array:
173+
- `name` is required, kebab-case, unique within marketplace
174+
- `source` is required (string or object)
175+
- Check source types:
176+
- String: relative path starting with `./` or `../`
177+
- Object with `source: "github"`: has `repo` field
178+
- Object with `source: "url"`: has `url` field
179+
- Validate optional fields:
180+
- `version`: semver format if present
181+
- `license`: valid SPDX identifier if present
182+
183+
3. **Check for Duplicate Names**:
184+
- No duplicate plugin names in `plugins` array
185+
- Report all duplicates if found
186+
187+
4. **Validate Relative Source Paths**:
188+
- For plugins with relative path sources:
189+
- Check that the path exists
190+
- If `strict: true` (default), verify `.claude-plugin/plugin.json` exists
191+
- If `strict: false`, verify plugin directory exists
192+
- Consider `metadata.pluginRoot` as base path
193+
194+
5. **Cross-Validate Local Plugins**:
195+
- For each relative path plugin:
196+
- Run plugin validation on the referenced directory
197+
- Report issues found in local plugins
198+
199+
6. **Marketplace Best Practices**:
200+
- Check all entries have `version` specified
201+
- Check all entries have `description` specified
202+
- Verify README.md documents the marketplace
203+
- Suggest CHANGELOG.md for version tracking
204+
136205
**Quality Standards:**
206+
137207
- All validation errors include file path and specific issue
138208
- Warnings distinguished from errors
139209
- Provide fix suggestions for each issue
140210
- Include positive findings for well-structured components
141211
- Categorize by severity (critical/major/minor)
142212

143-
**Output Format:**
213+
**Output Format for Plugin Validation:**
144214

215+
```markdown
145216
## Plugin Validation Report
146217

147218
### Plugin: [name]
@@ -180,14 +251,61 @@ Location: [path]
180251
### Overall Assessment
181252

182253
[PASS/FAIL] - [Reasoning]
254+
```
255+
256+
**Output Format for Marketplace Validation:**
257+
258+
```markdown
259+
## Marketplace Validation Report
260+
261+
### Marketplace: [name]
262+
263+
Location: [path]
264+
265+
### Summary
266+
267+
[Overall assessment - pass/fail with key stats]
268+
269+
### Critical Issues ([count])
270+
271+
- `file/path` - [Issue] - [Fix]
272+
273+
### Warnings ([count])
274+
275+
- `file/path` - [Issue] - [Recommendation]
276+
277+
### Plugin Entries ([count])
278+
279+
| Name | Source Type | Version | Status |
280+
|------|-------------|---------|--------|
281+
| [name] | [relative/github/url] | [version] | [valid/issues] |
282+
283+
### Local Plugin Validation
284+
285+
[For each relative path plugin, include summary of plugin validation]
286+
287+
### Positive Findings
288+
289+
- [What's done well]
290+
291+
### Recommendations
292+
293+
1. [Priority recommendation]
294+
2. [Additional recommendation]
295+
296+
### Overall Assessment
297+
298+
[PASS/FAIL] - [Reasoning]
299+
```
183300

184301
**Edge Cases:**
302+
185303
- Minimal plugin (just plugin.json): Valid if manifest correct
186304
- Empty directories: Warn but don't fail
187305
- Unknown fields in manifest: Warn but don't fail
188306
- Multiple validation errors: Group by file, prioritize critical
189307
- Plugin not found: Clear error message with guidance
190308
- Corrupted files: Skip and report, continue validation
191-
```
192-
193-
Excellent work! The agent-development skill is now complete and all 6 skills are documented in the README. Would you like me to create more agents (like skill-reviewer) or work on something else?
309+
- Marketplace with only external plugins: Valid if schema correct
310+
- Marketplace with strict:false entries: Don't require plugin.json in those directories
311+
- Circular marketplace references: Detect and report

0 commit comments

Comments
 (0)