mirror of
https://github.com/addyosmani/agent-skills.git
synced 2026-08-12 18:07:26 +02:00
The path fix has no regression guard: nothing in CI resolves references/ links, so all 18 were broken while CI stayed green. validate-artifact- paths.js is scoped to spec/plan/todo artifacts and says in its own header that it is not a general markdown path linter. Add validate-reference-links.js, which resolves every `references/*.md` link in skills/*/SKILL.md against that skill's own directory. This accepts both conventions in CLAUDE.md: shared checklists reached via ../../references/, and a skill's own colocated references/ directory. Scope stays narrow on purpose. Skills legitimately name paths that do not exist yet -- tasks/todo.md, PERF.md, docs/ideas/[idea-name].md -- and a general markdown linter would fail the build on them. A test pins that. Proven against the pre-fix tree: 18 error(s), exit 1, matching the 18 links fixed in the previous commit. After the fix: 0 error(s), exit 0. 7 unit tests cover the regression itself, colocated references/, markdown-link syntax, a renamed target, multiple violations in one skill, and the non-reference paths that must be ignored. Wired into the validate-skills job, alongside the other skill-content checks. Known limitation: fenced code blocks are not stripped, so a SKILL.md that documents the anti-pattern inside a fence would be flagged. Nothing does today. Sharing stripFencedCodeBlocks looks right once #444 lands. Refs #468 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>