radius-markdown-lint

Lint and fix Markdown files using markdownlint-cli2 and markdown-table-formatter.

1.7k|135|Updated Feb 20, 2021
One-click install
npx skills add https://github.com/radius-project/radius --skill radius-markdown-lint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: radius-markdown-lint
Source: https://github.com/radius-project/radius/tree/main/.github/skills/radius-markdown-lint
Command: npx skills add https://github.com/radius-project/radius --skill radius-markdown-lint

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires markdownlint-cli2, markdown-table-formatter.

What problem does it solve?

Markdown files in a repository often accumulate formatting inconsistencies, misaligned tables, and markdownlint rule violations that fail CI checks. This Skill checks and automatically fixes Markdown formatting using the repository's configured linting toolchain, so contributors can clean up .md files after editing without memorizing tool flags.

Core Features & Use Cases

  • Rule-based linting: Runs markdownlint-cli2 against the repository's .markdownlint-cli2.yaml config, with auto-fix support for fixable violations.
  • Table formatting: Normalizes Markdown table alignment and padding with markdown-table-formatter in check or fix mode.
  • Scoped execution: Targets only changed files (via git diff) or specific globs, avoiding pitfalls like markdown-table-formatter traversing node_modules.
  • Use Case: After editing documentation in the Radius repo, run this Skill to check your changed .md files, auto-fix table alignment and lint violations, and get a report of any issues requiring manual edits.

Quick Start

Lint and fix the Markdown files I just changed in this repository using the radius-markdown-lint skill.

Frequently Asked Questions about radius-markdown-lint

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

FAQPage Schema
How do I lint Markdown files with markdownlint-cli2?

Run markdownlint-cli2 with a file glob and the config flag pointing to .markdownlint-cli2.yaml. Add the --fix flag to automatically correct fixable violations, then re-run the check to confirm a clean result.

How do I fix Markdown table alignment automatically?

Use markdown-table-formatter with a file glob to reformat tables in place, normalizing column alignment and padding. Run it with the --check flag first to see which tables need reformatting without modifying files.

How do I lint only the Markdown files I changed in git?

Use git diff --name-only --diff-filter=d HEAD '*.md' to list changed Markdown files, then pass those paths to markdownlint-cli2 and markdown-table-formatter instead of linting the entire repository.

Why does markdown-table-formatter process node_modules files?

markdown-table-formatter does not read .gitignore, so passing a broad glob like .*.md causes it to traverse node_modules. Scope it to specific files or directories such as docs*.md to avoid this.

Which markdownlint rules cannot be auto-fixed?

Not every markdownlint rule supports automatic fixing; remaining violations after --fix must be edited manually following the rule messages. The MD013 line-length rule is disabled in this repository, so prose should not be hard-wrapped.