Skip to content

feat: add pre-commit hook to enforce skill standards #28

@galligan

Description

@galligan

Problem

Skills drift from standards over time, requiring periodic audits (like #23-26).

Proposal

Add a pre-commit hook that validates skill compliance:

Checks to enforce

  • name: in frontmatter matches directory name (kebab-case)
  • description: starts with "This skill should be used when..."
  • SKILL.md is under 500 lines
  • All files referenced in SKILL.md exist (references/, examples/)

Implementation

Could be a simple bash script or TypeScript validator in scripts/validate-skills.ts that runs on *.md changes in */skills/ directories.

Example output

❌ baselayer/skills/typescript-dev/SKILL.md
   - description doesn't start with "This skill should be used when..."
   - 523 lines (max 500)

✅ baselayer/skills/bun-dev/SKILL.md

Related

Prevents recurrence of issues like #23, #24, #25

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions