fix: handle dot-prefixed paths in fetchSkillFolderHash#657
Open
elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
Open
fix: handle dot-prefixed paths in fetchSkillFolderHash#657elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
Conversation
Skills installed from repos with dot-prefixed paths (e.g. .claude/skills/my-skill/) would get an empty skillFolderHash, causing 'skills check' and 'skills update' to always report up to date even when the remote changed. Two fixes: 1. Strip leading './' from the folder path before matching against the GitHub Trees API response. 2. When the recursive tree is truncated (large repos), fall back to walking path segments individually via non-recursive tree lookups so deeply nested entries are still found. Fixes vercel-labs#490
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 #490 — skills under dot-prefixed directories (e.g.
.claude/skills/my-skill/) get an emptyskillFolderHash, causingskills checkandskills updateto always report "up to date."Changes
Two fixes in
fetchSkillFolderHash():Strip leading
./from the folder path before matching against the GitHub Trees API response, preventing path mismatch on some systems.Truncated tree fallback — when the recursive tree API response is truncated (large repos), the entry for deeply nested dot-prefixed paths may be missing. The fix walks path segments individually via non-recursive tree lookups.
Testing
.claude/skills/now get correctskillFolderHashvaluesskills check/skills updatecorrectly detect remote changes