Format and validate Markdown files following GitHub Flavored Markdown standards with automated linting and manual semantic review
Format and validate Markdown files following GitHub Flavored Markdown (GFM) standards, VS Code language features, and organizational conventions with automated structural fixes and manual semantic review.
.md)read, edit — core file manipulationexecute — run linting tasks and commandssearch — find markdown files and patternsExecute markdownlint with auto-fix to resolve structural issues:
npx markdownlint-cli2 --no-globs {filepath} --fix
Note: Use --no-globs when linting a single explicit file to prevent unintended glob expansion. For repository-wide linting or CI jobs, omit the flag or use explicit globs/CI-configured file lists.
What auto-fix handles:
* and + to -)What auto-fix does NOT handle (requires manual review):
Review the file for issues that automated linting cannot fix:
Headers:
Bold labels at list start:
Reference syntax:
`#file:path` → #file:pathLists:
Code blocks:
plaintext if unknown)See formatting standards for complete rules.
Run markdownlint without fixes to verify zero errors:
npx markdownlint-cli2 --no-globs {filepath}
Expected output: No errors or warnings
If errors remain:
Verify content-level requirements:
--- separator, "Last updated: {date}" footer (see formatting-standards for exclusions: .github//*.md, README.md, AGENTS.md, .agents//.md, docs/adr/.md)See validation checklist for complete quality checks.
For iterative editing sessions, use watch mode for continuous feedback:
npx markdownlint-cli2 --no-globs {filepath} --watch
This provides real-time linting feedback during edits.
If markdown tooling is not configured in the repository, set up the complete stack:
See setup guide for step-by-step configuration.
Relying solely on automated linting:
Using #file: in entry point files:
Skipping validation after manual edits:
Incorrect reference syntax:
See markdown tooling setup guide for markdownlint-cli2 installation and VS Code extension setup.