markdown-formatting

Format and lint Markdown and MDX files against markdownlint rules.

85|7|Updated Jul 2, 2015
One-click install
npx skills add https://github.com/denolfe/dotfiles --skill markdown-formatting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: markdown-formatting
Source: https://github.com/denolfe/dotfiles/tree/main/claude/skills/markdown-formatting
Command: npx skills add https://github.com/denolfe/dotfiles --skill markdown-formatting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Markdown and MDX files in large docs repositories often suffer from inconsistent formatting, trailing spaces, and rule violations that stall reviews. This Skill automates formatting and linting to enforce best practices and reduce manual cleanup.

Core Features & Use Cases

  • Automated Formatting: Apply consistent Markdown styles across your docs using markdownlint rules.
  • Linting & Fixes: Detect and auto-fix common issues (MD001, MD013, MD033, etc.) to improve readability and quality.
  • Documentation Standards: Helps maintain uniform docs in team projects and CI pipelines, saving time in code review.
  • Use Case: When you have a large docs repository with MDX files, run this Skill to automatically fix formatting and surface lingering issues for review.

Quick Start

Install markdownlint if needed:

  • pnpm add -D markdownlint
  • or npm install -g markdownlint Then run:
  • markdownlint --fix "**/*.{md,mdx}"
  • markdownlint README.md docs//*.md content//*.mdx

Frequently Asked Questions about markdown-formatting

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

FAQPage Schema
How do I automatically fix markdown formatting issues in my documentation?

Markdown formatting can be automatically fixed using markdownlint with the --fix flag. Run `markdownlint --fix "**/*.{md,mdx}"` to apply consistent styles, fix trailing spaces, and correct rule violations across your docs repository in one pass.

What markdown linting rules does markdownlint enforce?

Markdownlint enforces standard markdown rules including MD001 (heading levels), MD013 (line length), MD033 (inline HTML), and others to ensure consistent formatting. It detects violations and can auto-fix many common issues to improve readability and maintain documentation standards.

Can I lint both markdown and MDX files together?

Yes, markdownlint supports both .md and .mdx files. Use `markdownlint "**/*.{md,mdx}"` to lint MDX alongside markdown, making it ideal for large documentation repositories that mix both formats.

Do I need to configure markdownlint before linting my docs?

Markdownlint recognizes common config file formats and works out of the box with default rules. Install via `pnpm add -D markdownlint` or `npm install -g markdownlint`, then run immediately. Custom rules can be configured if needed for team standards.

How does markdown linting reduce code review time?

Automated markdown linting and auto-fix eliminates manual formatting cleanup during reviews. By enforcing consistent styles, fixing trailing spaces, and catching rule violations upfront, reviewers focus on content quality rather than formatting issues.

What's the difference between linting and auto-fixing markdown?

Linting detects and reports markdown violations without changing files. Auto-fix applies corrections automatically. Markdownlint supports both: use `markdownlint` to report issues or `markdownlint --fix` to resolve them automatically.