-
-
Notifications
You must be signed in to change notification settings - Fork 78
57 lines (49 loc) · 1.52 KB
/
validate-skills.yml
File metadata and controls
57 lines (49 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# validate-skills.yml — Drop this into your library repo's .github/workflows/
#
# Validates skill files on PRs that touch the skills/ directory.
# Ensures frontmatter is correct, names match paths, and files stay under
# the 500-line limit.
name: Validate Skills
on:
pull_request:
paths:
- 'skills/**'
- '**/skills/**'
permissions:
contents: read
jobs:
validate:
name: Validate skill files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 20
- name: Install intent CLI
run: npm install -g @tanstack/intent@0.0.41
- name: Find and validate skills
run: |
# Find all directories containing SKILL.md files
SKILLS_DIR=""
if [ -d "skills" ]; then
SKILLS_DIR="skills"
elif [ -d "packages" ]; then
# Monorepo — find skills/ under packages
for dir in packages/*/skills; do
if [ -d "$dir" ]; then
echo "Validating $dir..."
intent validate "$dir"
fi
done
exit 0
fi
if [ -n "$SKILLS_DIR" ]; then
intent validate "$SKILLS_DIR"
else
echo "No skills/ directory found — skipping validation."
fi