agentleFS
y-miyazakiy-miyazaki/config/.agents/skills/markdown-validation/SKILL.md

markdown-validation

Skill1 starsChanged 8 days agoApache-2.0View on GitHub

Validate Markdown syntax, formatting, and links using markdownlint-cli2 and markdown-link-check. Use when committing docs changes, checking broken links, or validating Markdown in pull requests.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    run scoped markdown checks for specific docs paths

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Input

  • Path (optional): one .md file or a directory to scan recursively; defaults to the current directory (globs are not accepted)
  • Validation script: <skill-dir>/scripts/validate.sh, run with the repository root as the working directory
  • markdownlint-cli2 config (optional): discovered by markdownlint-cli2 from the working directory
  • markdown-link-check config (optional): .markdown-link-check.json in the working directory

Output Specification

Return structured Markdown in accordance with references/common-output-format.md. That file is the source of truth for the output contract.

Structured validation results from two tools: markdownlint-cli2 → markdown-link-check.

Execution Scope

  • Always use scripts/validate.sh for the pass/fail result. Run individual tool commands only to get details for a tool the script reported as failed (Workflow step 2).
  • Script runs markdownlint-cli2, then markdown-link-check; both run even when the first fails. Link checking stops at the first file with a broken link.
  • Do not modify Markdown files.
  • External link checking depends on network connectivity

USE FOR:

  • validate markdown syntax and links before commit
  • investigate markdown CI failures
  • run scoped markdown checks for specific docs paths

DO NOT USE FOR:

  • review prose quality or content strategy
  • validate non-markdown files
  • replace YAML/JSON/Terraform validation workflows

Reference Files Guide

  • common-checklist.md (always read)
  • common-output-format.md (always read)
  • common-troubleshooting.md (read on failure)
  • common-individual-commands.md (read on debugging)

Workflow

  1. From the repository root, run bash <skill-dir>/scripts/validate.sh [path] (omit path to scan the whole working directory).
  2. For each failed tool, get details per common-individual-commands.md: re-run markdownlint-cli2 <files> (the script hides its output), and re-run markdown-link-check on every target file (the script stops at the first broken file, so later files are unchecked). Map rule IDs and broken links to checklist ItemIDs and prefix each finding in ## Error Details with its ItemID, so the report names which checklist item failed.
  3. Report failed/skipped tools per references/common-output-format.md.

Error Handling

ConditionSeverityAction
scripts/validate.sh missingFatalStop; report missing script
No .md files under target pathInfoReport both tools as ⊘ Skipped (no .md files) in ## Tool Results; Status ✅ PASS; stop
markdownlint-cli2 or link-check tool missingRecoverableReport that tool as skipped in ## Tool Results
External link timeout or transient networkRecoverableReport the link-check failure; note in ## Error Details that it is network-only
Single tool fails, other succeedsRecoverableReport both tools in ## Tool Results; include the failed tool's output in ## Error Details
All tools failFatalStatus: ❌ FAIL with per-tool output in ## Error Details
common-checklist.md unavailableFatalStop; report missing dependency
common-output-format.md unavailableRecoverableNote missing file; emit ## Summary, ## Tool Results, and ## Error Details only

Examples

  • Prompt: Validate the Markdown files under docs/
  • Command (from the repository root): bash <skill-dir>/scripts/validate.sh docs/
  • Result: Structured report per references/common-output-format.md; mark network-only link failures as such in ## Error Details.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.