You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gh skill update help incorrectly promises to preserve locally added files #14647
gh skill update --help says that --force refreshes locally modified skill files but “does not remove extra files added locally.” On 2.102.0, applying an update replaces all contents of the installed skill directory, deleting locally added files. This also happens during a version update without --force.
A user relying on that sentence can lose notes or scripts they added to a skill directory. The documented --force --all example describes restoring modified files without explaining that additional files are discarded.
Affected version
gh version 2.102.0 (2026-09-30)
https://github.com/cli/cli/releases/tag/v2.102.0
A version update reproduces this without --force: install gh with --pin v2.100.0, add LOCAL-NOTES.md, then run gh skill update gh --dir "$dir" --unpin --all.
Expected vs actual behavior
Expected from the help: LOCAL-NOTES.md remains alongside the refreshed SKILL.md.
Actual: LOCAL-NOTES.md is deleted; only SKILL.md remains in this reproduction.
Please correct the help to explain that applying any update replaces the installed directory's contents with the upstream skill, discarding local modifications and additional files. The --force description should separately explain that it also applies this replacement when the upstream version has not changed.
I'm suggesting bug, priority-3, and gh-skill for maintainer review. This looks like a genuine documentation defect rather than a code regression: gh skill update --help says --force "does not remove extra files added locally," but swapDirectoryContents in update.go#L468-L506 always moves every existing entry in the skill directory aside and replaces it wholesale with the freshly staged contents, for both --force updates and normal version updates — so any extra locally-added file in the skill directory is discarded regardless of --force. The fix is updating the help text (not the behavior, which an existing test asserts is intentional) to accurately describe that any update replaces the installed directory's contents, and that --force specifically means this replacement also happens when the remote version hasn't changed. I didn't find an exact duplicate; related but distinct issues are #14190, #13542, and #13370 (also about gh skill update/install but not this specific help-text inaccuracy).
Activity
cli-triage commentedon Oct 12, 2026
I'm suggesting
bug,priority-3, andgh-skillfor maintainer review. This looks like a genuine documentation defect rather than a code regression:gh skill update --helpsays--force"does not remove extra files added locally," butswapDirectoryContentsin update.go#L468-L506 always moves every existing entry in the skill directory aside and replaces it wholesale with the freshly staged contents, for both--forceupdates and normal version updates — so any extra locally-added file in the skill directory is discarded regardless of--force. The fix is updating the help text (not the behavior, which an existing test asserts is intentional) to accurately describe that any update replaces the installed directory's contents, and that--forcespecifically means this replacement also happens when the remote version hasn't changed. I didn't find an exact duplicate; related but distinct issues are #14190, #13542, and #13370 (also aboutgh skill update/installbut not this specific help-text inaccuracy).