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β
15permissions:
16 contents: read
17β
18jobs:
19 validate:
20 name: Validate skill files
21 runs-on: ubuntu-latest
22 steps:
23 - name: Checkout
24 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
25 with:
26 persist-credentials: false
27β
28 - name: Setup Node
29 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
30 with:
31 node-version: 20
32β
33 - name: Install intent CLI
34 run: npm install -g @tanstack/intent@0.0.41
35β
36 - name: Find and validate skills
37 run: |
38 # Find all directories containing SKILL.md files
39 SKILLS_DIR=""
40 if [ -d "skills" ]; then
41 SKILLS_DIR="skills"
42 elif [ -d "packages" ]; then
43 # Monorepo β find skills/ under packages
44 for dir in packages/*/skills; do
45 if [ -d "$dir" ]; then
46 echo "Validating $dir..."
47 intent validate "$dir"
48 fi
49 done
50 exit 0
51 fi
52β
53 if [ -n "$SKILLS_DIR" ]; then
54 intent validate "$SKILLS_DIR"
55 else
56 echo "No skills/ directory found β skipping validation."
57 fi