From claude-plugins-validation
Add plugin dependencies to a target plugin (explicit --add specs or --from copy from another plugin's plugin.json). Use when adding/copying plugin.json::dependencies entries with atomic rollback on regression. Used dynamically via the-skills-menu (TRDD-478d9687).
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-plugins-validation:add-dependencyWhen to use
When the cpv-main-menu user picks Create → Add dependencies, or any flow needs to add/copy plugin.json::dependencies entries with atomic rollback on regression
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Adds one or more plugin dependencies to a target plugin's `plugin.json::dependencies` array. Two input modes that can be combined; the engine deduplicates by name (last-write-wins), sorts the result alphabetically, writes atomically, and rolls back from a `.bak` if the post-write validation introduces any new CRITICAL/MAJOR finding. Loaded by `cpv-main-menu-agent` via the Create → Add dependenc...
Adds one or more plugin dependencies to a target plugin's plugin.json::dependencies array. Two input modes that can be combined; the engine deduplicates by name (last-write-wins), sorts the result alphabetically, writes atomically, and rolls back from a .bak if the post-write validation introduces any new CRITICAL/MAJOR finding. Loaded by cpv-main-menu-agent via the Create → Add dependencies menu branch.
uv on PATH.claude-plugin/plugin.json--from git URLs: network access and git on PATHmarketplace.json::allowCrossMarketplaceDependenciesOn allowlist updated--dry-run to preview the diff against plugin.json.--add (explicit specs) and/or --from (copy from another plugin).~1.2.0, ^2.0, >=1.4).validate_plugin --strict.validate_plugin --strict emits a WARNING that the dependency auto-tracks the latest upstream tag. The only valid resolution is to pin a semver range (name@@~1.2.0); there is no config opt-out (cpv.allow_unversioned_dependencies was removed in TRDD-02e1672b and is now ignored with a [RC-DEPRECATED-OPTOUT] deprecation WARNING if present).Copy this checklist and track your progress:
--from source confirmedvalidate_plugin --strict re-run on targetplugin.json::dependencies array, sorted alphabetically, deduplicated by name..bak left next to plugin.json after a successful update so a human can roll back manually if needed.--from source unreadable, 3 on rollback after regression, 4 on atomic-write failure.| Error | Resolution |
|---|---|
| Exit 1: invalid args | Check --add spec syntax (see Spec Syntax) |
Exit 2: --from source unreachable | Verify path or git URL, check network |
| Exit 3: rollback after regression | Inspect new CRITICAL/MAJOR finding, narrow the spec, retry |
| Exit 4: atomic write failed | Disk full or permission denied — fix and re-run |
| WARNING: unversioned dependency auto-tracks latest tag | Pin a semver range (name@@~1.2.0) — the only valid resolution; there is no config opt-out |
| MAJOR cross-marketplace blocked | Add marketplace name to marketplace.json::allowCrossMarketplaceDependenciesOn |
# Explicit single dep, version-pinned
uv run python "${CLAUDE_PLUGIN_ROOT}/scripts/add_dependencies.py" /path/to/my-plugin \
--add dev-browser@@~1.2.0
# Always preview first with --dry-run
uv run python "${CLAUDE_PLUGIN_ROOT}/scripts/add_dependencies.py" /path/to/my-plugin \
--add dev-browser \
--dry-run
See Spec Syntax for the full add-spec table and additional examples (cross-marketplace, --from URL, combined).
add spec syntax · Full examples
plugin-dependencies.md docsplugin-management skill — show dependency tree + runtime errors before addingplugin-validation-skill — run validate_plugin --strict on the target after addingnpx claudepluginhub emasoft/emasoft-plugins --plugin claude-plugins-validationProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.