mirror of
https://github.com/addyosmani/agent-skills.git
synced 2026-10-26 23:15:04 +00:00
`dirName in SECTION_EXEMPT_SKILLS` walks the prototype chain, and `constructor` satisfies KEBAB_CASE (the `*` quantifier permits a single word). A skill directory named `constructor` therefore resolved to Object.prototype.constructor and was silently exempt from every required-section check — `exempt: true`, zero errors, no sections. The bypass guard missed it for the same reason, since the resolved value is truthy. Both lookups now use Object.hasOwn, which is what the comment above the allowlist already promises: "Exemptions live HERE, not in skill frontmatter, so contributors cannot bypass the validator by editing their own skill file." Adds scripts/lib/skill-lint-test.js — skill-lint.js was the only validator without a test file. Confirmed the prototype-chain test goes red against main; the other six pass either way, so existing behaviour is unchanged. Scope kept to the exemption lookup: #428 already rewrites frontmatter parsing and the cross-reference patterns, so this stays clear of both.