name: SkillCheck

# Validates every skills/<name>/SKILL.md against the project authoring standard
# (SKILL-AUTHORING-STANDARD.md). Errors fail the build; warnings are advisory.

on:
  push:
    branches: [main]
    paths:
      - 'skills/**'
      - 'skill-tiers.json'
      - 'scripts/skillcheck.mjs'
      - '.github/workflows/skillcheck.yml'
  pull_request:
    paths:
      - 'skills/**'
      - 'skill-tiers.json'
      - 'scripts/skillcheck.mjs'
      - '.github/workflows/skillcheck.yml'

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up Node
        uses: actions/setup-node@v4
        with:
          node-version: '20'

      - name: Run SkillCheck
        run: node scripts/skillcheck.mjs
