fix: CI should validate SKILL.md instead of arbitrary .md files (#2)

The validation step used `find ... -name '*.md' | head -1` to pick the
first .md file in each skill directory. On Linux (GitHub Actions), `find`
returns files in inode order — not alphabetical — so auxiliary files like
CREATION-LOG.md or code-quality-reviewer-prompt.md could be picked
instead of SKILL.md. These auxiliary files have no frontmatter, causing
4 false-positive validation errors on every CI run.

Fix: directly target SKILL.md (the canonical skill definition file) and
error if it's missing rather than silently skipping.
This commit is contained in:
jnMetaCode
2026-03-24 07:58:33 +08:00
committed by GitHub
parent 6046c4c334
commit 6471c855ee

View File

@@ -23,9 +23,10 @@ jobs:
run: |
ERRORS=0
for dir in skills/*/; do
SKILL_FILE=$(find "$dir" -maxdepth 1 -name '*.md' | head -1)
if [ -z "$SKILL_FILE" ]; then
echo "::warning::No .md file in $dir"
SKILL_FILE="${dir}SKILL.md"
if [ ! -f "$SKILL_FILE" ]; then
echo "::error::Missing SKILL.md in $dir"
ERRORS=$((ERRORS + 1))
continue
fi