Skip to content

feat(skills): add port skills remove command#67

Merged
EricFernandezPort merged 2 commits into
mainfrom
feat/skills-remove-command
May 25, 2026
Merged

feat(skills): add port skills remove command#67
EricFernandezPort merged 2 commits into
mainfrom
feat/skills-remove-command

Conversation

@haimn-support

Copy link
Copy Markdown
Contributor

Summary

  • Adds port skills remove — the symmetric inverse of port skills add. Lets users prune skill groups, individual skills, and AI tool targets from the saved selection without re-running init.
  • Auto-materializes SelectAll / SelectAllGroups / SelectAllUngrouped into explicit lists before pruning, and warns the user that future Port-side additions will no longer auto-sync.
  • Ignores .cursor/skills/ so locally synced Port skills stay out of git.

Test plan

  • go test ./... is green
  • port skills remove --help shows the new command and flags
  • port skills remove --group <id> drops the group from config and prunes the folder on disk
  • port skills remove --tool Cursor uninstalls the Cursor hook and deletes ~/.cursor/skills/port/
  • port skills remove (interactive) only lists items currently in the selection
  • With SelectAllGroups: true, remove --group X materializes the selection and prints the warning
  • Required skill via --skill <required-id> is reported as Skipped
  • Unknown ID errors with unknown selection: group:...

haimn-support and others added 2 commits May 23, 2026 20:16
Symmetric inverse of `port skills add` — prunes skill groups, individual
skills, and AI tool targets from the saved selection without re-running
`init`.

- `Module.RemoveSkills` uninstalls hooks via `RemoveHooks`, deletes
  `skills/port/` only under the removed targets, drops them from
  `skillsCfg.Targets`, applies `RemoveSelection`, saves, then re-syncs
  so removed items are pruned from the remaining targets.
- `RemoveSelection` auto-materializes `SelectAll` / `SelectAllGroups` /
  `SelectAllUngrouped` into explicit lists before pruning. Surfaces
  `Materialized: true` so the CLI warns the user that future Port-side
  additions will no longer auto-sync.
- Required skills/groups are skipped; unknown IDs return an error
  matching the `MergeSelection` pattern.
- Interactive mode lists only items currently in the selection, with a
  confirmation prompt before applying.

Also ignores `.cursor/skills/` so locally synced Port skills stay out
of git.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ction is set

The command-level guard used !HasSelection() alone, blocking `port skills
remove --tool Cursor` for users who have configured targets but no explicit
skill selection. Aligns with the module-level check which correctly uses
!HasSelection() && len(Targets) == 0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: cb0b8ec2b899
@EricFernandezPort EricFernandezPort merged commit ad19010 into main May 25, 2026
4 checks passed
@EricFernandezPort EricFernandezPort deleted the feat/skills-remove-command branch May 25, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants