fix(skill-installer): add --force flag to allow reinstall/update #137
+72
−12
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
Fixes #127.
The skill installer currently aborts with a hard error when the destination directory already exists. There is no built-in way to update a skill to a newer version, reinstall after local corruption, or recover from a partially-failed installation. This PR adds a
--forceflag that removes the existing directory before copying the new version in.Changes
scripts/install-skill-from-github.py--forceCLI flag (defaults toFalse, preserving the current safe default)._copy_skill()to accept aforceparameter; whenTruethe existing directory is removed viashutil.rmtreebeforecopytree.main()to respect--forceand surface an actionable hint ("Use --force to remove the existing skill and reinstall") when the flag is absent.--forceis active.scripts/list-skills.py_installed_skills_detail()to return installed skill paths and health status (detects missingSKILL.mdas "broken").--show-pathCLI flag that displays the install directory and health status for each installed skill in both text and JSON output modes.SKILL.md--forcein the Scripts and Behavior and Options sections.--show-pathin the Scripts section.--force.Test plan
--force, verify error message includes the--forcehint--force, verify it reinstalls and prints "Reinstalled"list-skills.py --show-pathand verify paths and status are shown--show-pathreports "broken"--show-path --format jsonincludespathandstatusfields