Lints and reformats Markdown files for consistency: heading hierarchy, link labels,
code fence language tags, and trailing whitespace.
Commands:
lint <file> — report formatting issues without modifying the file
fix <file> — apply automatic fixes in place (makes a .bak backup first)
check-links <file> — verify that relative links resolve to existing files
toc <file> — generate a table-of-contents block for insertion
Fixes applied automatically:
ATX headings (converts setext ==== / ---- to # style)
Trailing whitespace removal
Blank line after headings
Consistent ordered list numbering (1. 2. 3. …)
No network access. All operations are local file reads and writes.
1---2name: markdown-formatter3description: markdown-formatter4---5# markdown-formatter67Lints and reformats Markdown files for consistency: heading hierarchy, link labels,8code fence language tags, and trailing whitespace.910<markdown-formatter>11Use this skill to clean up Markdown documents.1213Commands:14- `lint <file>` — report formatting issues without modifying the file15- `fix <file>` — apply automatic fixes in place (makes a `.bak` backup first)16- `check-links <file>` — verify that relative links resolve to existing files17- `toc <file>` — generate a table-of-contents block for insertion1819Fixes applied automatically:20- ATX headings (converts setext `====` / `----` to `#` style)21- Trailing whitespace removal22- Blank line after headings23- Consistent ordered list numbering (1. 2. 3. …)2425No network access. All operations are local file reads and writes.26</markdown-formatter>
Run npx skillmds@latest add ondrej-merkun/markdown-formatter in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
markdown-formatter It is listed under Docs & Writing on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
ondrej-merkun (@ondrej-merkun) published this skill. Their other Agent Skills are listed on their SkillMD profile.