Commit Graph
3 Commits
Author SHA1 Message Date
Mahipal 796d96c413 fix: replace three hand-rolled YAML parsers with a shared PyYAML loader
index.json shipped 604 of 817 descriptions truncated to their first line.
The cause was the inline regex parser in update-index.yml: it reconstructed
multi-line descriptions only for the YAML block-scalar styles ('>' and '|')
and silently dropped continuation lines for every other style.

A census of the corpus explains the blast radius:

  block scalar   (description: >-)    43
  single-quoted multiline            278
  plain unquoted multiline           496
  single-line                          0

So 774 of 817 skills (94.7%) used a style the parser mishandled. Commit
d56fc0a7 had fixed only the 43 block-scalar files, and CONTRIBUTING.md
recommends that one working style, which is why it stayed hidden.

- add tools/skill_frontmatter.py, the single PyYAML-backed loader
- add tools/generate-index.py so generation is testable outside CI, with
  a --check mode for use as a gate
- delete the hand-rolled parsers from validate-skill.py (98 lines) and
  validate-agentskills.py, routing both through the shared loader
- implement the reserved-word check that agentskills-skill.schema.json
  names validate-agentskills.py as the enforcement point for

Verified by a differential harness against yaml.safe_load ground truth:
index-vs-source mismatches 606 -> 0.
2026-08-23 17:15:12 +02:00
Mahipal 88f408ada3 Correct agentskills.io validator/schema to match the standard
The standard requires only name+description; additional top-level keys are
permitted metadata. Fixes:
- validator no longer counts extra top-level keys as violations (reports them
  as informational only).
- angle-bracket check now ignores YAML block-scalar indicators (`>`, `>-`,
  `|`), which were false-positiving on multi-line descriptions; no skill has
  genuine angle-bracket content.
- schema additionalProperties false -> true to match.

Audit result: 817/817 compliant.
2026-08-02 09:53:50 -07:00
Mahipal 9bd6051d84 Add agentskills.io compliance schema and validator
- tools/agentskills-skill.schema.json: strict JSON Schema for the
  agentskills.io SKILL.md frontmatter standard (name+description required;
  optional license/compatibility/metadata/allowed-tools; no other top-level
  keys).
- tools/validate-agentskills.py: read-only compliance validator (also checks
  name==directory and the no-angle-brackets rule).
2026-08-02 09:32:13 -07:00