File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ __pycache__/
44* .pyc
55.env
66.vscode /
7+ * .zip
You can’t perform that action at this time.
0 commit comments