markdown-formatter

Format Markdown content to markdownlint-style conventions while preserving YAML frontmatter and code fences.

1|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/minfengyuan/harness-knowledge-base --skill markdown-formatter-minfengyuan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: markdown-formatter
Source: https://github.com/minfengyuan/harness-knowledge-base/tree/main/skills/markdown-formatter
Command: npx skills add https://github.com/minfengyuan/harness-knowledge-base --skill markdown-formatter-minfengyuan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

The Markdown Formatter simplifies the tedious job of aligning Markdown documents with markdownlint-style conventions, preserving the author’s intent while applying safe, deterministic rewrites.

Core Features & Use Cases

  • Safe, deterministic rewrites fix trailing spaces, heading spacing, list indentation, and blockquotes.
  • Diagnostics and previews show potential changes without rewriting files, enabling review and decision making.
  • Works with READMEs and documentation, preserving YAML frontmatter and code fences.

Quick Start

Format a Markdown file to markdownlint-style conventions using the bundled script to produce a clean, standards-compliant version.

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 to match markdownlint conventions?

To format Markdown files to markdownlint conventions, apply safe, deterministic rewrites that fix trailing spaces, heading spacing, list indentation, and blockquotes while preserving the author's original meaning and intent.

Can I preview Markdown formatting changes before applying them?

Yes, you can preview Markdown formatting changes before applying them. Diagnostics and previews show potential modifications without rewriting files, enabling you to review changes and make decisions before committing to the rewrites.

Does Markdown formatting preserve YAML frontmatter and code fences?

Yes, Markdown formatting preserves YAML frontmatter and code fences. Safety rules ensure these structural elements remain untouched during the formatting process, maintaining the integrity of your README documentation and general Markdown artifacts.

What is the best way to fix trailing spaces and list indentation in README docs?

The best way to fix trailing spaces and list indentation in README docs is through deterministic Markdown rewrites aligned with markdownlint style, which normalize these elements safely without altering the original content's meaning.

What are the limitations of automated Markdown formatting?

Automated Markdown formatting cannot resolve every edge case. The formatter surfaces issues that require manual judgment rather than forcing a rewrite, ensuring that ambiguous or complex Markdown structures are left for human review.