Skip to content

fix: handle dot-prefixed paths in fetchSkillFolderHash#657

Open
elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
elliotllliu:fix/dot-prefixed-skill-hash
Open

fix: handle dot-prefixed paths in fetchSkillFolderHash#657
elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
elliotllliu:fix/dot-prefixed-skill-hash

Conversation

@elliotllliu
Copy link
Contributor

Summary

Fixes #490 — skills under dot-prefixed directories (e.g. .claude/skills/my-skill/) get an empty skillFolderHash, causing skills check and skills update to always report "up to date."

Changes

Two fixes in fetchSkillFolderHash():

  1. Strip leading ./ from the folder path before matching against the GitHub Trees API response, preventing path mismatch on some systems.

  2. 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

  • Skills under .claude/skills/ now get correct skillFolderHash values
  • skills check / skills update correctly detect remote changes
  • Root-level skills and non-dot-prefixed paths continue to work as before

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fetchSkillFolderHash fails for skills in dot-prefixed paths, breaking skills check/update

1 participant