Add ESLint plugins for Agent Skills frontmatter validation#67
Merged
Conversation
7de2892 to
8a19f6a
Compare
8a19f6a to
b408c45
Compare
Adds two new packages that compose to validate SKILL.md files: - @gtbuchanan/eslint-plugin-md-frontmatter — generic. One rule `md-frontmatter/schema` validates Markdown YAML frontmatter against any JSON Schema via ajv, mapping each error to the YAML node range for inline reporting. - @gtbuchanan/eslint-plugin-agent-skills — focused. Exports `skillFrontmatterSchema` (the Agent Skills JSON Schema, with `$id` set to a future canonical URL) and ships `agent-skills/name-matches-dir` for the one spec constraint pure schemas can't express (name === parent directory name). Wires both into eslint-config for `**/skills/*/SKILL.md` alongside core `max-lines: 500` for file-length enforcement per the spec. Adds ajv ^8.20.0 to the workspace catalog. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
b408c45 to
9fc2a16
Compare
This was referenced Apr 25, 2026
gtbuchanan
added a commit
that referenced
this pull request
Apr 28, 2026
Strip the auto-generated `a135a59:` commit prefix from the Initial release entries in eslint-config, tsconfig, and vitest-config. The hash references the changesets pipeline-bootstrap commit (PR #1), not an actual release — nothing has been published to npm yet, and `changeset version` only appends new entries, so it would never overwrite these stale prefixes. Also drop the orphaned `Patch Changes` block from eslint-config that referenced @gtbuchanan/oxlint-config@0.1.0; that package was replaced by regular ESLint in #43. Aligns these stubs with the bare `- Initial release` form used by the newer packages added in #67.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new packages that compose to validate
SKILL.mdfiles at lint time:@gtbuchanan/eslint-plugin-md-frontmatter— generic. One rule,md-frontmatter/schema, validates Markdown YAML frontmatter against any JSON Schema via ajv. Each error is mapped back to the offending YAML node range for inline reporting.@gtbuchanan/eslint-plugin-agent-skills— focused. Ships:skillFrontmatterSchema— the Agent Skills JSON Schema as a real.jsonfile with$idset to a future canonical URL.agent-skills/name-matches-dir— the one spec constraint pure schemas can't express.configs.recommended— a ready-to-spread flat-config block that wires both plugins plus coremax-lines: 500for**/skills/*/SKILL.md. One-line setup for consumers:[...configs.recommended].eslint-configdelegates toconfigs.recommended.ajv ^8.20.0added to the workspace catalog.resolveJsonModule: truemoved to the shared@gtbuchanan/tsconfig/node.jsonso consumers get JSON imports by default.Plugin-level
RuleTesterunit tests (test/*.test.tsper package) cover rule behavior. End-to-end coverage ineslint-config/e2e/skill.test.tsexercises the fully-wired pipeline against synthetic SKILL.md fixtures.CHANGELOG.mdstubs added to both new packages matching the existing format. No changeset — these will land as initial 0.1.0 entries on first release.Relates to #41 — sets up the lint-side validation that #41 calls out as a CI checklist item. Follow-up rules tracked in #68.
Test plan
pnpm install && pnpm check— 32/32 turbo tasks greenpnpm test:e2e— 24 e2e tests pass (18 existing + 6 new SKILL.md cases)description, unknown extra field, mismatched parent dir):packages/cli/skills/gtb-build-pipeline/SKILL.mdlints cleansrc/schema.jsonis shipped in theeslint-plugin-agent-skillstarball (verified viatar -tzf)🤖 Generated with Claude Code