文件历史

4 次代码提交

作者 SHA1 备注 提交日期
Joan Leon 94eb14c74b refactor(validate-skills): extract lint rules into scripts/lib/skill-lint.js
Split the skill validation rules out of the validate-skills.js CLI into a
shared, importable scripts/lib/skill-lint.js: a pure lintSkillContent() with
no I/O plus a thin lintSkill() file wrapper. validate-skills.js becomes a thin
CLI over the lib. No behavior change to the validator's output or exit codes;
this only makes the rules unit-testable for a follow-up test battery.
2026-07-10 00:49:00 +02:00
An-idd 11bfec4d1f feat(scripts): enforce naming + description-trigger rules in skill validator
The validator claims to check skills "against the rules in
docs/skill-anatomy.md", but two rules that doc marks as Required were
never enforced:

- Directory names must be lowercase-hyphen-separated (Naming Conventions).
  Previously only `name === dirName` was checked, so `My_Skill/` passed.
- Descriptions must say *when* to use the skill, not just what it does
  (Required vs Recommended). Formalized in #167 but the validator was
  never updated to match.

Adds both as blocking checks. All 24 existing skills pass, so this is a
non-breaking guardrail. Closes the remaining gap in #233 (frontmatter,
name-match, and section checks already shipped in the original validator).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 10:53:21 +08:00
Swing-G 50d115dc15 fix(scripts): report unexpected fs errors as structured validator output 2026-06-12 11:12:23 +08:00
Dawid Piaskowski 41d15b8d64 Add CI skill validator
- scripts/validate-skills.js: zero-dependency Node.js validator that
  checks every skill for valid frontmatter, description length (≤1024),
  required sections (Overview, When to Use, Common Rationalizations,
  Red Flags, Verification), and dead cross-skill references
- Skills with type:meta or exempt:sections in frontmatter skip section
  checks; applied to using-agent-skills (meta) and idea-refine (legacy
  structure predating the anatomy spec)
- CI: validate-skills job runs before plugin-manifest validation and
  blocks merge on any error; uses Node 20, no npm install required
2026-04-11 12:52:26 +02:00