- plugin-create/SKILL.md: fix ${CLAUDE_PLUGIN_ROOT} path (create-plugin → plugin-create, 4 occurrences)
- plugin-create/SKILL.md: delegate reserved name validation to new references/reserved-names.md (complete list)
- plugin-create/SKILL.md: add displayName reminder in step 4, full-validation pointer in step 7
- plugin-create/references/reserved-names.md: complete reserved name list extracted from claude-code.md
- plugin-create/references/manifest-fields.md: quick-ref for both plugin.json manifests and marketplace entry
- plugin-create/META.md: update stale when: and references: fields to reflect post-migration paths
- plugin-create/assets/plugin-template/hooks.json: unify empty hooks schema to {} (was [])
- write-skill/SKILL.md: fix YAML frontmatter parse error — wrap description in >- block scalar
- validate.sh: strip backtick spans before ../ check to eliminate documentation false positives
- inventory.sh: same backtick-span fix, applied to both outer check and per-line reporting
- tests/test_scripts.sh: fix SCRIPTS_DIR path to skills/marketplace-architect/scripts/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6.8 KiB
name, description, metadata
| name | description | metadata | ||
|---|---|---|---|---|
| plugin-create | Use when the user wants to create a new plugin in the marketplace — scaffold the directory structure, generate plugin.json manifests for Claude Code and Copilot CLI, and register the plugin in marketplace.json. Triggers: "create a new plugin", "add a plugin called X", "scaffold a plugin", "new plugin for Y". Do NOT use when auditing or refactoring existing plugins (use /marketplace-architect), authoring skill content inside a plugin (use /write-skill), adopting an external plugin into the marketplace (use /marketplace-architect), or validating existing manifests without creating anything (use /marketplace-architect). |
|
Required inputs
- Plugin name — kebab-case slug; ask if not stated. Validate: lowercase letters, digits, hyphens only; not already present in
plugins/or.claude-plugin/marketplace.json; not a reserved name. Loadreferences/reserved-names.mdfor the full reserved list. - Plugin description — one sentence; ask if not stated.
- Author name — ask if not stated.
- Author email — ask if not stated; used in the Copilot root
plugin.json. - Author URL — ask if not stated; used in Claude's
.claude-plugin/plugin.json.
Constraints
- Load the plugin template from
assets/plugin-template/bundled inside this skill (${CLAUDE_PLUGIN_ROOT}/skills/plugin-create/assets/plugin-template/). Stop if the path is missing — do not generate files from memory. - Plugin name must be kebab-case and not a reserved name — see
references/reserved-names.mdfor the full list; halt and ask for a replacement before Gate A if violated. - Do not write any file until Gate A (plan approval) and Gate B (file contents approval) are both explicitly confirmed.
- Replace all five placeholder markers —
PLUGIN_NAME,PLUGIN_DESCRIPTION,AUTHOR_NAME,AUTHOR_EMAIL,AUTHOR_URL— in every copied file before Gate B review. No marker may appear in written output. - Do not generate skill content —
skills/is scaffolded as an empty directory with README only. Direct the user to/write-skillto add skills. - Do not set
versionin bothplugin.jsonand the marketplace entry —plugin.jsonwins silently and blocks updates for existing users. - Update
.github/plugin/marketplace.jsononly if it already exists — do not create it. - Do not auto-invoke
/marketplace-architect— hand off by name at the end; let the user trigger it.
Process
-
Collect inputs. Ask for plugin name, description, author name, author email, and author URL — one question at a time. Validate the plugin name: kebab-case format, not already present in
plugins/or.claude-plugin/marketplace.json, not a reserved name (loadreferences/reserved-names.mdto check). If any validation fails, stop and ask for a replacement before continuing. -
Check template. Load the bundled template from
assets/plugin-template/inside this skill (${CLAUDE_PLUGIN_ROOT}/skills/plugin-create/assets/plugin-template/). If the path is missing, stop and report it — do not proceed or generate files from memory. -
Gate A — plan review. Present: the list of files that will be written (derived from
assets/plugin-template/withPLUGIN_NAMEsubstituted into filenames), the newplugins/<name>/directory path, the marketplace entry that will be added to.claude-plugin/marketplace.json, and whether.github/plugin/marketplace.jsonwill also be updated. Wait for explicit approval — do not proceed on "looks good" or silence. -
Copy and substitute. Copy
assets/plugin-template/toplugins/<name>/. In every copied file, replace all occurrences ofPLUGIN_NAME,PLUGIN_DESCRIPTION,AUTHOR_NAME,AUTHOR_EMAIL, andAUTHOR_URLwith the collected values. Rename any file or directory whose name containsPLUGIN_NAME. Note: after substitution,displayNamein.claude-plugin/plugin.jsonwill equal the kebab slug — remind the user to update it to a human-readable string (e.g. "My Plugin") before publishing. -
Gate B — file contents review. Show every file with its full substituted content. Wait for explicit approval — do not write until confirmed.
-
Write files. Write all substituted files to
plugins/<name>/. Append the new plugin entry to.claude-plugin/marketplace.json. If.github/plugin/marketplace.jsonexists, append the same entry there. -
Validate. Run
claude plugin validate .fromplugins/<name>/. Report all output inline — do not suppress warnings. If the command is unavailable, note it and suggest the user run it manually after local install. For full cross-tool and marketplace validation, direct the user to run/marketplace-architect validateafter the plugin is installed. -
Hand off. Print: "Plugin
<name>created and registered inmarketplace.json. Fill in skill and agent content, then run/marketplace-architectto audit the full marketplace."
Output format
plugins/<name>/— directory tree copied fromassets/plugin-template/with all placeholders substituted.claude-plugin/marketplace.json— updated with the new plugin entry.github/plugin/marketplace.json— updated with the same entry, only if it already existed- Inline validation report from
claude plugin validate .
Failure handling
assets/plugin-template/not found at${CLAUDE_PLUGIN_ROOT}/skills/plugin-create/assets/plugin-template/— stop, report the path, do not generate from memory.- Plugin name already exists in
plugins/ormarketplace.json— stop, report the conflict, ask for a different name. - Reserved name detected — stop, report the name and the reserved list, ask for a replacement before continuing.
claude plugin validate .unavailable — report that automated validation was skipped; suggest running it manually withclaude --plugin-dir ./plugins/<name>.
Self-check
- Plugin name validated: kebab-case, not reserved, not already present in
plugins/ormarketplace.json assets/plugin-template/verified to exist at${CLAUDE_PLUGIN_ROOT}/skills/plugin-create/assets/plugin-template/before any file generation- Gate A presented with file list and marketplace entry — explicit approval received
- All five markers substituted in all files — none appear in written output
- Gate B presented with full substituted file contents — explicit approval received
- Files written only after Gate B approval
.github/plugin/marketplace.jsonupdated only if it already existed — not createdclaude plugin validate .run and results reported; or unavailability noted- Hand-off message printed directing user to
/marketplace-architect - No skill content generated —
skills/is empty with README only