| name | link-plugin-marketplace |
| description | Link an existing plugin to an existing marketplace (local or GitHub source). Use when appending an existing plugin to a marketplace.json. Used dynamically via the-skills-menu (TRDD-478d9687). |
| when_to_use | When the cpv-main-menu user picks GitHub setup → Link plugin to marketplace, or any flow needs to append an existing plugin to a marketplace.json |
| user-invocable | false |
link-plugin-marketplace
Overview
Appends an existing plugin to an existing marketplace's marketplace.json, preserving entries for other plugins. If a plugin with the same name is already listed, its entry is replaced in place with fresh metadata (so re-runs stay idempotent — one entry per name, never duplicated). Uses the correct source.source schema key (not the legacy source.type). Loaded dynamically via the-skills-menu, reached via the GitHub setup → Link plugin menu branch.
Prerequisites
uv on PATH
- A local marketplace directory containing
.claude-plugin/marketplace.json (or marketplace.json at root)
- A plugin to link, given as either:
- A local plugin directory path (will be converted to relative-to-marketplace source)
- A GitHub repo slug
owner/repo (emits {source: "github", repo: "owner/repo"})
Instructions
- Confirm the marketplace's
marketplace.json exists at the canonical location.
- Choose the plugin source form: local path or
owner/repo GitHub slug.
- Invoke
manage_plugin.py --link-plugin <marketplace-path> <plugin-spec>.
- The script appends a new entry. Entries for other plugins are left untouched; an existing entry with the same
name is replaced in place with fresh metadata.
- Re-validate the marketplace via
plugin-validation-skill (or validate_marketplace.py --strict).
Copy this checklist and track your progress:
Output
- A new entry appended to
marketplace.json::plugins[].
- For local plugins:
source: "relative-path" with relative path stored.
- For GitHub plugins:
source: "github" with repo: "owner/repo".
Error Handling
| Error | Resolution |
|---|
| Marketplace not found | Verify path; check for .claude-plugin/marketplace.json |
| Plugin already linked | Re-runs are idempotent — the same-name entry is replaced in place (refreshing version/description), never duplicated |
| Local plugin not found | Verify path; .claude-plugin/plugin.json must exist |
| GitHub repo invalid | Verify owner/repo slug exists on GitHub |
| Validator regression after link | Check upstream cross-validation (RC-MKPL-*) findings |
Examples
Link a local plugin into a local marketplace:
uv run python "${CLAUDE_PLUGIN_ROOT}/scripts/manage_plugin.py" \
--link-plugin ~/marketplaces/my-hub ~/src/my-plugin
Link a GitHub plugin into a local marketplace:
uv run python "${CLAUDE_PLUGIN_ROOT}/scripts/manage_plugin.py" \
--link-plugin ~/marketplaces/my-hub Emasoft/claude-plugins-validation
Resources
create-plugin skill — create a new marketplace from scratch
plugin-management skill — full plugin lifecycle management
plugin-validation-skill — validate a GitHub marketplace after linking
marketplace-authoring-contract skill — entry shape rules (name, version, source)