Skip to content

remove command

FieldValue
Slugcmd-remove
Statusimplemented
Last review2026-08-10

Summary

skli remove uninstalls Packages from the Manifest and, depending on source and flags, optionally deletes files on disk. Selection grammar matches cmd-update / cmd-restore (including install-path form).

  • source=repos: remove Manifest entry (or shrink ides) and delete installed IDE destinations, unless --keep-sources.
  • source=local: remove Manifest entry only, unless --remove-sources (also delete entry.path on disk).

Partial IDE filter removes only selected IDEs; the Manifest entry is deleted when no IDE remains.

User flows

Flow-01 — Remove all Packages

Persona: developer.
Preconditions: ProjectManifest present (project scope).

StepActionExpected resultError
1skli remove --allEvery matching Package processed per source rules; Manifest writtenMissing ProjectManifest
2No matching PackagesInformative message; exit 0

Flow-02 — Filter by IDE / kind / id

StepActionExpected resultError
1skli remove cursor --allEntries intersecting cursor; repos: drop cursor from ides / delete dest; local with ide=cursor: drop entryInvalid IdeId
2skli remove all skill --allAll skillsInvalid kind
3skli remove cursor skill arcade-bootstrapThat id onlyMissing id; no IDE intersection

Flow-03 — Target by install path

StepActionExpected resultError
1skli remove .cursor/skills/arcade-bootstrapResolve path → ide/kind/id; same as explicit form for that IDEUnmatched path; missing entry

Flow-04 — repos keep sources

StepActionExpected resultError
1skli remove cursor skill arcade-bootstrap --keep-sourcesManifest updated/removed; IDE destination files left on diskFlag on explicit local entry

Flow-05 — local remove sources

StepActionExpected resultError
1skli remove cursor rule specs-documentation --remove-sourcesManifest entry removed; entry.path deletedFlag on explicit repos entry; path delete failure

Flow-06 — Global scope

StepActionExpected resultError
1skli remove --all --globalSame against GlobalManifest / global IDE dirs

Flow-07 — Partial IDE shrink (repos)

Preconditions: Entry with ides: [cursor, claude].

StepActionExpected resultError
1skli remove cursor skill fooDelete cursor dest (unless --keep-sources); ides[claude]; entry kept
2skli remove claude skill foo (after step 1)Delete last IDE dest; entry removed from Manifest

Data model

Package entry: config-manifests. Paths: ide-targets.

  • repos: destinations via resolveInstallDirs + packageDestination for targetIdes only. Remaining ides written back; empty ides ⇒ delete entry.
  • local: always delete Manifest entry when ide matches filter; optionally delete resolved entry.path with --remove-sources.

No gitignore changes.

CLI

skli remove --all [options]
skli remove <ide> --all [options]
skli remove <ide|all> <kind> --all [options]
skli remove <ide|all> <kind> <id> [options]
skli remove <install-path> [options]

Arguments (depending on form):
  ide            IdeId CSV, or literal all (all IDEs) when kind is present
  kind           PackageKind: skill | rule | agent
  id             Package id (Manifest map key)
  install-path   Path under an IdeId layout (same as update/restore)

Options:
  -g, --global         Use GlobalManifest and global IDE dirs
  --debug              Diagnostic logs (stderr)
  --all                Select all matching Packages (required unless <id> or <install-path> is given)
  --keep-sources       repos: do not delete install destinations
  --remove-sources     local: also delete entry.path on disk

Invalid combinations (selection same as update; --keep-sources with --remove-sources; wrong flag for explicit entry source) → error, exit ≠ 0.

Business rules

IdRule
BR-cmd-remove-001Both source=repos and source=local Packages can be removed.
BR-cmd-remove-002Project scope: ProjectManifest required (init). --global: GlobalManifest.
BR-cmd-remove-003IDE / kind / id / install-path selection identical to cmd-update BR-004/005/011/012/013, except both sources are eligible.
BR-cmd-remove-004repos without --keep-sources: delete install destinations for targetIdes (force rm; missing path OK).
BR-cmd-remove-005repos: remove targetIdes from ides; if ides empty, delete Manifest entry; otherwise write updated entry.
BR-cmd-remove-006local: when ide matches filter, delete Manifest entry. Without --remove-sources, leave entry.path on disk.
BR-cmd-remove-007--remove-sources on local: delete resolved entry.path (force recursive rm).
BR-cmd-remove-008--keep-sources + --remove-sources together → error.
BR-cmd-remove-009Explicit <id> / path: --keep-sources on local entry → error; --remove-sources on repos entry → error. Broad --all: each flag applies only to matching source (ignore otherwise).
BR-cmd-remove-010Explicit target missing from Manifest → error. Explicit target with no IDE intersection → error.
BR-cmd-remove-011No .gitignore cleanup.

User scenarios

npx @zortracks/skli remove cursor skill arcade-bootstrap uninstalls that repos skill from Cursor dirs and Manifest.
npx @zortracks/skli remove .cursor/skills/arcade-bootstrap same via path.
npx @zortracks/skli remove cursor rule specs-documentation drops the local Manifest reference without deleting the rule file.
npx @zortracks/skli remove --all --keep-sources clears Manifest entries for repos Packages but leaves IDE copies on disk.

Dependencies

Out of scope

  • Cleaning .gitignore entries.
  • list command.
  • Interactive confirm prompts.
  • Linked packages under links — see cmd-unlink.

Acceptance criteria

  • [x] Four filter CLI forms + install-path form work for remove.
  • [x] repos: destinations deleted unless --keep-sources; ides shrunk / entry removed.
  • [x] local: Manifest entry removed; path deleted only with --remove-sources.
  • [x] Flag misuse rules (mutual exclusion; explicit wrong-source) enforced.
  • [x] --global and --debug supported.
  • [x] Listed in skli --help.

Terminology

See domain-glossary. CLI ide selector all is not an IdeId.

Implementation notes

src/commands/remove.ts, src/lib/remove-package.ts / src/lib/remove-cli.ts; reuse selectionFromArgs from src/lib/refresh-package.ts; destinations via src/lib/copy-package.ts + src/lib/ide-targets.ts; Manifest helpers in src/lib/manifests.ts.

Released under the MIT License.