Markdown content validator

From lightspeedwp/.github · View interactive version

Markdown content validator is an AI agent skill from the GitHub repository lightspeedwp/.github. validate markdown, template and documentation files for markdown quality, yaml frontmatter schema compliance, required semver version fields, version increments, broken structure, missing metadata, invalid values, and consolidated content quality reporting.

How to use this skill

Skill file

Content File Validator

Use this skill when the user wants one reusable validation pass over documentation, Markdown, templates, or mixed content files that need both structural Markdown checks and YAML frontmatter validation.

When to use this combined validator

Run this skill when the request involves any of the following:

Do not use this skill for general prose critique, broad style editing, or auto-fixing content unless the user explicitly asks for that workflow.

Default scope and file types

By default, scan files/ recursively and include:

Allow configurable include and exclude globs. Use the built-in defaults unless the user narrows the scope.

How Markdown validation works

For Markdown-style files, validate:

Use references/markdown-validation-rules.md as the source of truth for these checks and their intended interpretation.

How frontmatter validation works

For all matching files, validate that:

  1. the file begins with YAML frontmatter at the very top
  2. nothing appears before the opening ---
  3. the frontmatter parses safely as a YAML object
  4. required fields are present
  5. field types, enums, patterns, and property limits satisfy the schema
  6. unknown fields are allowed or rejected according to the schema
  7. per-file-type overrides are applied where the schema defines them

Use references/frontmatter.schema.yaml as the source of truth for metadata rules.

How SemVer version checks work

Every validated document must include:

version: "1.0.0"

Validate version as SemVer MAJOR.MINOR.PATCH.

When --enforce-version-increment and a usable --base-ref are provided:

Use references/semver-versioning-rules.md for the human rules behind version increments.

Inputs to confirm

Before validating, identify:

  1. the target directory to scan
  2. the schema file to use
  3. any include globs that narrow the scan
  4. any exclude globs that should be added to the defaults
  5. whether version increment checks should be enforced
  6. which base Git reference to compare against, when version-increment validation is requested
  7. whether the user wants report-only output or explicit fix suggestions

Default assumptions when the user does not specify them:

Validation workflow

  1. Locate the target directory.
  2. Recursively collect matching files using the configured include and exclude globs.
  3. Validate YAML frontmatter placement and schema compliance.
  4. Validate Markdown structure for Markdown-like files.
  5. Validate the required version field and SemVer pattern.
  6. If version increment enforcement is enabled, compare current files against the supplied base reference when available.
  7. Produce one consolidated Markdown report covering summary metrics, failures, warnings, and suggested fixes.
  8. Only propose rewrites when the user explicitly asks for modification or auto-fix behaviour.

How to customise schemas

Customise metadata rules in references/frontmatter.schema.yaml instead of changing the validator logic.

Use references/schema-customisation.md to adapt:

How to interpret reports

Treat the report in three layers:

Use references/example-validation-report.md when the user wants a concrete example of the consolidated report format.

When to suggest fixes

Suggest fixes when:

Do not invent unknown metadata values or silently bump versions on the user's behalf.

When not to modify files

Never modify files by default.

Do not overwrite files unless the user explicitly asks for rewrite or auto-fix behaviour. Even then:

Supporting Files

_Maintained with ❤️ by the 🚀 LightSpeedWP Automation Team_

Org Profile

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.