markdown-formatter

Format, lint, and beautify markdown documents using configurable style guides.

8|2|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/luojiaaoo/xpeech --skill markdown-formatter-luojiaaoo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: markdown-formatter
Source: https://github.com/luojiaaoo/xpeech/tree/main/xpeech/agent/skills/buildin/markdown-formatter
Command: npx skills add https://github.com/luojiaaoo/xpeech --skill markdown-formatter-luojiaaoo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Markdown documents often accumulate inconsistent formatting: mixed list markers, irregular heading styles, trailing whitespace, and uneven spacing. Manually cleaning these issues across many files is tedious and error-prone. ## Core Features & Use Cases - Style-Guided Formatting: Format markdown against CommonMark, GitHub Flavored Markdown, or custom rules with configurable heading, list, code block, emphasis, and link styles. - Linting & Validation: Detect heading hierarchy skips, inconsistent list markers, and other issues without modifying content, returning structured errors and warnings. - Batch Processing: Format multiple markdown files in one call with per-file results and aggregate statistics. - Use Case: After generating documentation with an LLM, run the formatter to normalize headings, fix list markers, remove extra blank lines, and wrap lines at 80 characters before publishing. ## Quick Start Ask the agent to format your markdown content with the GitHub style guide, fixing list markers and normalizing spacing at a maximum line width of 80 characters.

Frequently Asked Questions about markdown-formatter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I format markdown files with a specific style guide?▼

Call formatMarkdown with your markdown content and a style name such as 'github' or 'commonmark'. You can pass options like maxWidth, headingStyle, and listStyle to control line wrapping, heading format, and list markers.

How to lint markdown without changing the content?▼

Use the lintMarkdown function, which checks heading hierarchy, list consistency, and links without modifying the text. It returns structured errors, warnings, and statistics so you can review issues before applying fixes.

Can I format multiple markdown files at once?▼

Yes, formatBatch accepts an array of file paths and processes each file with the same style and options. It returns per-file results, total warning counts, and processing time, continuing past individual file errors.

What markdown styles does the formatter support?▼

The formatter supports CommonMark, GitHub Flavored Markdown, a consistent style, and custom user-defined rules. GitHub style includes fenced code blocks, tables, task lists, strikethrough, and autolinks.

Why does markdown formatting produce unexpected warnings?▼

Warnings appear when the formatter detects issues like unclosed fenced code blocks or heading style mismatches during normalization. Some warnings reflect style choices rather than real errors, so you can disable specific checks in config.json.