-
-
Notifications
You must be signed in to change notification settings - Fork 44
54 lines (47 loc) · 1.41 KB
/
validate-skills.yml
File metadata and controls
54 lines (47 loc) · 1.41 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
# 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/**'
jobs:
validate:
name: Validate skill files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- 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..."
bunx @tanstack/intent@latest validate "$dir"
fi
done
exit 0
fi
if [ -n "$SKILLS_DIR" ]; then
bunx @tanstack/intent@latest validate "$SKILLS_DIR"
else
echo "No skills/ directory found — skipping validation."
fi