AgentSkillsCN

markdown-lint

使用 markdownlint-cli2 对 Markdown 文件进行 lint 检查的指南。当需要对 Markdown 文件进行 lint 检查、修复 Markdown 格式或验证 Markdown 文件时,请使用此指南。

SKILL.md
--- frontmatter
name: markdown-lint
description: Guide for linting markdown files using markdownlint-cli2. Use this when asked to lint markdown, fix markdown formatting, or check markdown files.

Markdown Linting with markdownlint-cli2

Commands

bash
# Lint markdown files
npm run markdown-lint

# Auto-fix markdown issues
npm run markdown-lint:fix

Configuration

Configuration is in .markdownlint-cli2.yaml. See that file for enabled rules and ignored paths.

Rule reference

Workflow

  1. Run npm run markdown-lint to identify issues
  2. Run npm run markdown-lint:fix to auto-fix most issues
  3. Manually fix remaining issues if needed
  4. Verify with npm run markdown-lint