feat(skills): add port skills remove command#67
Merged
Conversation
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
approved these changes
May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
port skills remove— the symmetric inverse ofport skills add. Lets users prune skill groups, individual skills, and AI tool targets from the saved selection without re-runninginit.SelectAll/SelectAllGroups/SelectAllUngroupedinto explicit lists before pruning, and warns the user that future Port-side additions will no longer auto-sync..cursor/skills/so locally synced Port skills stay out of git.Test plan
go test ./...is greenport skills remove --helpshows the new command and flagsport skills remove --group <id>drops the group from config and prunes the folder on diskport skills remove --tool Cursoruninstalls the Cursor hook and deletes~/.cursor/skills/port/port skills remove(interactive) only lists items currently in the selectionSelectAllGroups: true,remove --group Xmaterializes the selection and prints the warning--skill <required-id>is reported as Skippedunknown selection: group:...