Linting Frontmatter

Checks Markdown frontmatter blocks against a required-key list — reports missing keys, empty values, and unknown keys with file and line. Use when frontmatter errors break a site build or a content check fails.

brokenrobot-xyz 53ac447 2 files · 2.2 KB Updated

File contents

Lint frontmatter

Check the frontmatter block of every named Markdown file against the key list the user supplies, and report each violation with its file and line.

Steps

  1. When the user names a directory, list its Markdown files with Glob; otherwise check exactly the files named.
  2. Read each file's frontmatter — the block between the opening --- and the next ---. When a file has no frontmatter block, report the file rather than inventing an empty block, because a fabricated block hides the real defect.
  3. Compare the block's keys against the user's key list: report a missing required key, an empty value, and a key outside the list, each with file and line.
  4. Report one table covering all files. When every file passes, say so and list the files checked.

brokenrobot-xyz/agent-skills/tree/main/plugins/agent-authoring-toolkit/skills/reviewing-claude-skills/evals/files/eval-clean-skill-no-padding/linting-frontmatter commit 53ac447e07

Frequently asked questions

npx skillmds@latest add brokenrobot-xyz/linting-frontmatter