CLI Reference
remove

cldpm remove

Remove a shared component from a project.

Usage

cldpm remove <COMPONENT> --from <PROJECT>

Description

Removes a shared component from a project by:

  1. Removing it from project.json dependencies
  2. Deleting the symlink from .claude/
  3. Updating the per-directory .gitignore
  4. Optionally removing orphaned dependencies

Arguments

ArgumentDescription
COMPONENTComponent specification (type:name format)

Options

OptionShortDescription
--from-fTarget project name (required)
--keep-depsKeep orphaned dependencies
--forceRemove even if other components depend on it

Examples

Basic removal

cldpm remove skill:code-review --from my-project

Remove with short flag

cldpm remove agent:debugger -f my-project

Keep orphaned dependencies

cldpm remove skill:main-skill --from my-project --keep-deps

When 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 --force

If 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

  1. project.json updated:

    {
      "dependencies": {
        "skills": []  // "code-review" removed
      }
    }
  2. Symlink removed:

    .claude/skills/code-review  # deleted
  3. .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/.