Skip to content

fix: CI validates wrong .md file — should target SKILL.md#2

Merged
jnMetaCode merged 1 commit intomainfrom
fix/ci-skill-file-detection
Mar 23, 2026
Merged

fix: CI validates wrong .md file — should target SKILL.md#2
jnMetaCode merged 1 commit intomainfrom
fix/ci-skill-file-detection

Conversation

@jnMetaCode
Copy link
Owner

Summary

  • CI 每次都失败,原因是 find ... -name '*.md' | head -1 在 Linux 上拿到的不一定是 SKILL.md
  • 辅助文件(如 CREATION-LOG.mdcode-quality-reviewer-prompt.md)没有 frontmatter,导致 4 个误报
  • 修复:直接检查 SKILL.md,如果缺失则报错

Root Cause

# Before: find returns files in inode order on Linux, not alphabetical
SKILL_FILE=$(find "$dir" -maxdepth 1 -name '*.md' | head -1)
# Could return CREATION-LOG.md instead of SKILL.md

# After: always target the canonical skill definition file
SKILL_FILE="${dir}SKILL.md"

Verification

Ran the updated validation logic locally against all 20 skill directories — 20/20 pass, 0 errors.

🤖 Generated with Claude Code

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.
@jnMetaCode jnMetaCode merged commit 6471c85 into main Mar 23, 2026
1 check passed
@jnMetaCode jnMetaCode deleted the fix/ci-skill-file-detection branch March 23, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant