Open History to see the last commit
1# validate-skills.yml — Drop this into your library repo's .github/workflows/
2#
3# Validates skill files on PRs that touch the skills/ directory.
4# Ensures frontmatter is correct, names match paths, and files stay under
5# the 500-line limit.
6
7name: Validate Skills
8
9on:
10 pull_request:
11 paths:
12 - 'skills/**'
13 - '**/skills/**'
14
15jobs:
16 validate:
17 name: Validate skill files
18 runs-on: ubuntu-latest
19 steps:
20 - name: Checkout
21 uses: actions/checkout@v4
22
23 - name: Setup Node
24 uses: actions/setup-node@v4
25 with:
26 node-version: 20
27
28 - name: Install intent CLI
29 run: npm install -g @tanstack/intent
30
31 - name: Find and validate skills
32 run: |
33 # Find all directories containing SKILL.md files
34 SKILLS_DIR=""
35 if [ -d "skills" ]; then
36 SKILLS_DIR="skills"
37 elif [ -d "packages" ]; then
38 # Monorepo — find skills/ under packages
39 for dir in packages/*/skills; do
40 if [ -d "$dir" ]; then
41 echo "Validating $dir..."
42 intent validate "$dir"
43 fi
44 done
45 exit 0
46 fi
47
48 if [ -n "$SKILLS_DIR" ]; then
49 intent validate "$SKILLS_DIR"
50 else
51 echo "No skills/ directory found — skipping validation."
52 fi