fix(skill-installer): add --force flag to allow reinstall/update#137
Open
skylarkoo7 wants to merge 1 commit intoopenai:mainfrom
Open
fix(skill-installer): add --force flag to allow reinstall/update#137skylarkoo7 wants to merge 1 commit intoopenai:mainfrom
skylarkoo7 wants to merge 1 commit intoopenai:mainfrom
Conversation
The installer currently aborts when a skill directory already exists, with no way to update or recover from a broken installation. - install-skill-from-github.py: add --force flag that removes the existing skill directory before reinstalling; error message now hints at the flag when the destination exists - list-skills.py: add --show-path flag to display install location and detect broken installs (missing SKILL.md); surface this in both text and JSON output modes - SKILL.md: document --force and --show-path in Scripts and Behavior sections
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
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