Skip to content

ci: add minimal validation for SKILL.md required frontmatter#117

Open
buzuweidao wants to merge 3 commits intobinance:mainfrom
buzuweidao:ci/validate-skill-frontmatter
Open

ci: add minimal validation for SKILL.md required frontmatter#117
buzuweidao wants to merge 3 commits intobinance:mainfrom
buzuweidao:ci/validate-skill-frontmatter

Conversation

@buzuweidao
Copy link
Copy Markdown

What changed

Added a minimal CI guard for skill metadata quality:

  • scripts/validate-skills-frontmatter.sh
  • .github/workflows/validate-skills.yml

The check validates that every skills/**/SKILL.md includes frontmatter and these required fields:

  • name
  • description
  • metadata
  • metadata.version
  • metadata.author

Why

This repository has high PR volume. A lightweight automated check catches common formatting omissions before manual review.

Scope

Process/CI only. No API/runtime behavior changes.

@@ -0,0 +1,14 @@
name: Validate Skills

on:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a path filter to the workflow to skip unnecessary runs on PRs that don't touch skills?

i.e.

on:                                                                                                               
  pull_request: 
    paths:
      - 'skills/**'
      - 'scripts/validate-skills-frontmatter.sh' 

echo "[ERROR] Missing metadata.version in $file"
fail=1
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider also validating the directory structure. Several open PRs place skills at skills/<skill-name>/ instead of the required skills/<namespace>/<skill-name>/.

i.e.

if [[ "$(echo "$file" | tr '/' '\n' | wc -l)" -lt 4 ]]; then
  echo "[ERROR] Skill must be under skills/<namespace>/<skill-name>/SKILL.md: $file"
  fail=1
fi                                                                                                                

@dimitrisn442 dimitrisn442 self-assigned this Apr 17, 2026
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.

2 participants