cldpm remove
Remove a shared component from a project.
Usage
cldpm remove <COMPONENT> --from <PROJECT>Description
Removes a shared component from a project by:
- Removing it from
project.jsondependencies - Deleting the symlink from
.claude/ - Updating the per-directory
.gitignore - Optionally removing orphaned dependencies
Arguments
| Argument | Description |
|---|---|
COMPONENT | Component specification (type:name format) |
Options
| Option | Short | Description |
|---|---|---|
--from | -f | Target project name (required) |
--keep-deps | Keep orphaned dependencies | |
--force | Remove even if other components depend on it |
Examples
Basic removal
cldpm remove skill:code-review --from my-projectRemove with short flag
cldpm remove agent:debugger -f my-projectKeep orphaned dependencies
cldpm remove skill:main-skill --from my-project --keep-depsWhen a component has dependencies that no other component uses, CLDPM will prompt to remove them. Use --keep-deps to skip this.
Force removal
cldpm remove skill:shared-util --from my-project --forceIf other components in the project depend on the component being removed, CLDPM will error by default. Use --force to remove anyway.
Dependency Handling
Orphaned Dependencies
When you remove a component, CLDPM checks if any of its dependencies are still used:
$ cldpm remove agent:security-audit --from my-project
✓ Removed agents/security-audit from my-project
Orphaned dependencies:
- skills/vulnerability-scan
- skills/code-review
Remove orphaned dependencies? [Y/n]Protected Dependencies
If a dependency is used by another component, it's kept:
Remove orphaned dependencies? [Y/n] y
✓ Removed skills/vulnerability-scan
! Kept skills/code-review (used by agents/reviewer)Dependent Components
If other components depend on what you're removing:
$ cldpm remove skill:base-util --from my-project
Error: Cannot remove skills/base-util: other components depend on it
- skills/advanced-util
- agents/helper
Use --force to remove anyway.What Happens
-
project.json updated:
{ "dependencies": { "skills": [] // "code-review" removed } } -
Symlink removed:
.claude/skills/code-review # deleted -
.gitignore updated:
# CLDPM shared components (symlinks to shared/) # code-review removed from list
💡
Local (project-specific) components cannot be removed with this command. Delete them directly from .claude/.