Claude-skill-registry building-skills-marketplace
Use when creating new Claude Code skills, setting up marketplace repositories, or packaging skills for distribution - complete workflow from skill creation to marketplace publication
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/building-skills-marketplace" ~/.claude/skills/majiayu000-claude-skill-registry-building-skills-marketplace && rm -rf "$T"
skills/data/building-skills-marketplace/SKILL.mdBuilding Skills & Marketplace
Overview
Complete workflow for creating professional Claude Code skills and publishing them via marketplace, following superpowers pattern.
Core principle: Skills require testing BEFORE writing (RED-GREEN-REFACTOR). Marketplaces require two repositories (catalog + content).
When to Use
Use this skill when:
- "Create a new skill" or "build a skill"
- "Set up marketplace" or "publish skills"
- "Package skill for distribution"
- "Add skill to marketplace"
- Refactoring existing skills to marketplace standards
When NOT to Use
Don't use for:
- Using existing skills (that's different)
- General Claude Code questions
- Non-skill related tasks
Quick Reference: Two-Repository Structure
| Repository | Purpose | Contains |
|---|---|---|
| Marketplace | Plugin catalog | , README, LICENSE |
| Skills | Actual skills | , , manifest.json, docs |
Installation flow:
/plugin marketplace add owner/marketplace-repo /plugin install plugin-name@marketplace-repo
Essential Workflow: Create New Skill
Step 1: Write Pressure Tests FIRST (RED Phase)
# Create test scenarios (3+ with multiple pressures) # DO NOT write skill yet - watch agents fail first! # Example pressures to combine: # - Time pressure (production down) # - Sunk cost (already invested effort) # - Authority (senior dev requested) # - Exhaustion (debugging for hours)
Document baseline behavior - capture agent quotes showing violations.
Step 2: Write Minimal Skill (GREEN Phase)
Structure:
skills/[category]/[skill-name]/ ├── SKILL.md # <1000 words (ideally <500) ├── reference.md # Heavy reference (unlimited) ├── examples.md # Real workflows ├── troubleshooting.md # Error diagnosis └── TEST_RESULTS.md # Required testing docs
SKILL.md template:
--- name: skill-name description: Use when [triggers/symptoms] - [what it does] --- # Skill Name ## ⚠️ VERIFICATION REQUIRED (if platform-specific) ## Overview ## When to Use ## When NOT to Use ## Quick Reference ## Essential Patterns ## Common Mistakes ## Additional Resources
Step 3: Test and Refactor (REFACTOR Phase)
# Run pressure tests WITH skill # Identify new rationalizations # Add explicit counters # Re-test until bulletproof
Step 4: Add Slash Command
Create:
commands/[skill-name].md
--- description: [Brief description for /help] location: plugin --- Use the [skill-name] skill to help with [task].
Update manifest:
{ "skills": [{ "name": "skill-name", "path": "skills/category/skill-name", "command": "commands/skill-name.md" }] }
Essential Workflow: Create Marketplace
Repository 1: Marketplace Catalog
Structure:
marketplace-repo/ ├── .claude-plugin/ │ └── marketplace.json # CRITICAL: Correct schema ├── README.md ├── LICENSE └── .gitignore
marketplace.json schema:
{ "name": "marketplace-name", "owner": { "name": "Your Name", "email": "you@example.com" }, "metadata": { "description": "Brief description", "version": "1.0.0" }, "plugins": [ { "name": "plugin-name", "source": { "source": "url", "url": "https://github.com/owner/skills-repo.git" }, "description": "Max 125 chars description", "version": "1.0.0", "keywords": ["keyword1", "keyword2"], "strict": true } ] }
Repository 2: Skills Collection
Structure:
skills-repo/ ├── .claude-plugin/ │ └── manifest.json ├── skills/ │ ├── TEMPLATE/ │ ├── deployment/ │ ├── infrastructure/ │ ├── development/ │ └── workflows/ ├── commands/ # IMPORTANT: Slash commands ├── README.md ├── CONTRIBUTING.md ├── LICENSE └── RELEASE-NOTES.md
manifest.json:
{ "name": "plugin-name", "version": "1.0.0", "marketplace": "owner/marketplace-repo", "skills_directory": "skills", "commands_directory": "commands", "skills": [ { "name": "skill-name", "category": "deployment", "path": "skills/deployment/skill-name", "command": "commands/skill-name.md", "tested": true } ] }
Essential Workflow: Git Tagging & Version Management
CRITICAL: Claude Code's plugin system installs plugins by cloning git repositories at specific tags, NOT from the main branch. Every plugin listed in marketplace.json MUST have a matching git tag in its repository.
Version Matching Requirement
The
version field in marketplace.json MUST match a git tag in the plugin repository:
// marketplace.json { "plugins": [ { "name": "my-plugin", "version": "1.0.0", // <-- Must match git tag "source": { "url": "https://github.com/owner/my-plugin.git" } } ] }
The plugin repository MUST have a
v1.0.0 or 1.0.0 git tag (both formats work).
Creating Tags for New Plugins
Before adding a plugin to marketplace.json:
# 1. Navigate to plugin repository cd /path/to/plugin-repo # 2. Create and push tag (use v prefix or not - both work) git tag v1.0.0 git push origin v1.0.0 # 3. Verify tag exists git ls-remote --tags origin # Should show: refs/tags/v1.0.0 # 4. NOW add to marketplace.json with matching version
Updating Plugin Versions
When you update a plugin and increment its version in marketplace.json, you MUST create a new matching git tag:
# 1. Make changes in plugin repository cd /path/to/plugin-repo # 2. Commit changes git add . git commit -m "Update feature X" # 3. Create NEW version tag git tag v1.1.0 git push origin v1.1.0 # 4. Update marketplace.json to reference new version # Change "version": "1.0.0" → "version": "1.1.0" # 5. Commit marketplace.json change cd /path/to/marketplace-repo git add .claude-plugin/marketplace.json git commit -m "Update my-plugin to v1.1.0" git push
Troubleshooting: Plugin Installation Fails
If users report "can't install plugin from marketplace", check:
-
Tag exists:
git ls-remote --tags https://github.com/owner/plugin.git -
Version matches marketplace.json:
- marketplace.json says
"version": "1.0.0" - Repository must have
orv1.0.0
tag1.0.0
- marketplace.json says
-
Fix missing tag:
cd /path/to/plugin-repo git tag v1.0.0 # Use version from marketplace.json git push origin v1.0.0
Tag Format
Both formats work:
(recommended, standard convention)v1.0.0
(also works)1.0.0
Choose one format and be consistent across your plugins.
Common Mistakes
1. Wrong marketplace.json schema - Must have
owner object, metadata object, source.url not repository
2. No slash commands - Skills won't show in /help without commands/
3. Testing after writing - Violates TDD, leads to untested skills
4. Over 1000 words - Move heavy content to supporting files
5. Missing verification - Platform-specific skills need safeguards
6. No TEST_RESULTS.md - Required documentation missing
7. No git tags or version mismatch - CRITICAL: Every plugin version in marketplace.json must have matching git tag in plugin repository. See "Git Tagging & Version Management" section above
8. Not restarting after install - Slash commands only load at Claude Code startup
9. Using /plugin update for versions - Only works for NEW plugins, not version updates. Use uninstall/reinstall instead
Critical Schema Requirements
Marketplace Catalog Schema
Required fields:
- stringname
- object withowner
andnameemail
- object withmetadata
anddescriptionversion
- array of plugin objectsplugins[]
Plugin object:
- stringname
- object withsource
andsource: "url"url
- string (max 125 chars)description
- semantic versionversion
- array of stringskeywords
- booleanstrict
Skills Plugin Manifest
Required fields:
- plugin namename
- semantic versionversion
- "skills"skills_directory
- "commands"commands_directory
- "owner/marketplace-repo"marketplace
- array with path and commandskills[]
Verification Checklist
Before publishing:
- Skill tested with 3+ pressure scenarios
- TEST_RESULTS.md with agent quotes exists
- Word count <1000 (check:
)wc -w SKILL.md - Slash command created in commands/
- manifest.json links skill to command
- marketplace.json has correct schema
- Both repos have LICENSE (MIT recommended)
- README has installation instructions
- CRITICAL: Create git tags BEFORE users install:
Why: Plugin system fetches specific git tags, NOT main branch# Skills repo git tag -a v1.0.0 -m "Description" && git push origin v1.0.0 # Marketplace repo git tag -a v1.0.0 -m "Description" && git push origin v1.0.0
Installation Testing
CRITICAL: Always test clean install with restart
# 1. Uninstall for clean test /plugin uninstall plugin-name # 2. Install from marketplace /plugin install plugin-name@marketplace-repo # 3. RESTART Claude Code (slash commands load at startup) exit claude # 4. Verify installation /help # Should show ALL slash commands ls ~/.claude/plugins/cache/plugin-name/ # Check files installed cat ~/.claude/plugins/cache/plugin-name/.claude-plugin/manifest.json # Check version
Installation path:
~/.claude/plugins/cache/[plugin-name]/ (NOT ~/.claude/skills/)
Version updates:
/plugin update only checks for NEW plugins. To get version updates:
/plugin uninstall plugin-name /plugin install plugin-name@marketplace # Fetches latest git tag exit && claude # Restart for slash commands
Best Practices
- Test with RED-GREEN-REFACTOR - No exceptions
- Create slash commands - All skills need
for discoverability/command - Follow schema exactly - marketplace.json must match superpowers pattern
- Version everything - Git tag releases (v1.0.0, v1.0.1, etc.)
- Document testing - TEST_RESULTS.md is mandatory
- Two repos - Catalog (marketplace) + Content (skills)
Additional Resources
Templates:
- See skills/TEMPLATE/ for skill template
- See marketplace schema above for catalog template
Examples:
- Railway skill: Tested, verified, with slash command
- Superpowers: github.com/obra/superpowers-marketplace
Testing:
- superpowers:writing-skills - TDD methodology
- superpowers:testing-skills-with-subagents - Pressure testing
Remember:
- Git tags MANDATORY: Every plugin version in marketplace.json MUST have matching git tag in plugin repo (v1.0.0 or 1.0.0)
- Version updates = new tags: When incrementing plugin version, create new git tag BEFORE updating marketplace.json
- Skills require testing FIRST (RED-GREEN-REFACTOR)
- Marketplaces require TWO repositories (catalog + content)
- Slash commands are MANDATORY for
visibility/help - Restart Claude Code required for slash commands to appear
doesn't update versions - use uninstall/reinstall/plugin update