Skip to content

feat: add pre-commit hooks for skills check and update#647

Open
elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
elliotllliu:feat/pre-commit-hook
Open

feat: add pre-commit hooks for skills check and update#647
elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
elliotllliu:feat/pre-commit-hook

Conversation

@elliotllliu
Copy link
Contributor

Summary

Closes #525

Adds .pre-commit-hooks.yaml so external projects can integrate skills checks into their pre-commit workflow.

Hooks

Hook ID Stage Description
skills-check pre-commit Runs npx skills check — fails if updates are available
skills-update manual Runs npx skills update -y — opt-in, no auto-mutation

Usage

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/vercel-labs/skills
    rev: main
    hooks:
      - id: skills-check
# Manual update when needed
pre-commit run --hook-stage manual skills-update

Design decisions

  • skills-check on commit, skills-update as manual — per issue discussion, checking is safe as a gate but updating shouldn't mutate files during every commit
  • language: system — uses the user's existing Node.js/npx installation
  • pass_filenames: false + always_run: true — skills are project-wide, not per-file

Add .pre-commit-hooks.yaml so external projects can integrate
skills checks into their pre-commit workflow:

  - skills-check: runs `npx skills check` on commit (fails if
    updates are available)
  - skills-update: runs `npx skills update -y` as a manual stage

Usage in .pre-commit-config.yaml:

  repos:
    - repo: https://github.com/vercel-labs/skills
      rev: main
      hooks:
        - id: skills-check

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

[Feature]: Offer skills pre-commit hook for external projects

1 participant