Skip to content

fix: support check/update for local skills#642

Open
elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
elliotllliu:fix/check-update-local-skills
Open

fix: support check/update for local skills#642
elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
elliotllliu:fix/check-update-local-skills

Conversation

@elliotllliu
Copy link
Contributor

Summary

Fixes #522

skills check and skills update now work with locally installed skills.

Problem

Local skills (installed via npx skills add ./path) were always skipped by check and update because:

  1. getSkipReason() returned 'Local path' for all local sources
  2. The check loop required skillFolderHash and skillPath — but local skills had neither stored at install time
  3. GitHub API (fetchSkillFolderHash) was the only hash comparison method

Solution

At install time (add.ts)

  • Compute a folder hash for local skills using computeSkillFolderHash() and store it in skillFolderHash

At check/update time (cli.ts)

  • Local skills with a stored hash are no longer skipped
  • Fresh hash is computed from the source path and compared against the stored hash
  • If the source path no longer exists, an error is reported instead of silently skipping

Skip message improvement

  • Local skills without a stored hash (installed before this fix) show: 'Local path (no hash recorded — reinstall to enable tracking)'

Testing

  • pnpm build
  • pnpm test ✅ (375/375 tests pass)

Local skills were always skipped by `skills check` and `skills update`
because these commands only used GitHub API for hash comparison.

Changes:
- Compute and store a folder hash when installing local skills via
  `computeSkillFolderHash()`, so changes can be detected later
- In check/update, compare the stored hash against a freshly computed
  hash from the source path instead of calling GitHub API
- Local skills without a stored hash show an improved skip message
  suggesting reinstall to enable tracking

Closes vercel-labs#522
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.

[Bug]: skills check and skills update fails for local skills

1 participant