Skip to content

Commit 328e332

Browse files
ci: add SKILL.md frontmatter validation workflow + gitignore *.zip
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f9b469a commit 328e332

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Validate SKILL.md Frontmatter
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
validate-skills:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Validate SKILL.md frontmatter
16+
run: |
17+
ERRORS=0
18+
CHECKED=0
19+
20+
for skill in plugins/*/skills/*/SKILL.md; do
21+
[ -f "$skill" ] || continue
22+
CHECKED=$((CHECKED + 1))
23+
24+
# Extract YAML frontmatter (between first pair of --- delimiters)
25+
frontmatter=$(sed -n '/^---$/,/^---$/p' "$skill" | sed '1d;$d')
26+
27+
if [ -z "$frontmatter" ]; then
28+
echo "ERROR: $skill - missing YAML frontmatter"
29+
ERRORS=$((ERRORS + 1))
30+
continue
31+
fi
32+
33+
missing=""
34+
echo "$frontmatter" | grep -q '^name:' || missing="$missing name"
35+
echo "$frontmatter" | grep -q '^description:' || missing="$missing description"
36+
echo "$frontmatter" | grep -q '^triggers:' || missing="$missing triggers"
37+
38+
if [ -n "$missing" ]; then
39+
echo "ERROR: $skill - missing required fields:$missing"
40+
ERRORS=$((ERRORS + 1))
41+
fi
42+
done
43+
44+
echo ""
45+
echo "Checked $CHECKED SKILL.md files"
46+
if [ "$ERRORS" -gt 0 ]; then
47+
echo "FAILED: $ERRORS file(s) with invalid frontmatter"
48+
exit 1
49+
else
50+
echo "PASSED: All SKILL.md files have valid frontmatter"
51+
fi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ __pycache__/
44
*.pyc
55
.env
66
.vscode/
7+
*.zip

0 commit comments

Comments
 (0)