Systematically fix linting issues in markdown files using markdownlint-cli2. This skill should be used when needing to scan, diagnose, and fix markdown formatting issues in projects with one or more .md files, with special attention to ordered list numbering (MD029) errors.
Automatically fix markdown linting errors across your project. Use when you need to scan for issues, apply auto-fixes, and guide manual corrections for complex errors like ordered list numbering (MD029).
/plugin marketplace add s2005/markdown-linter-fixer-skill/plugin install markdown-linter-fixer@markdown-linter-fixer-marketplaceThis skill is limited to using the following tools:
references/MD029-Fix-Guide.mdreferences/MD036-Guide.mdSystematically fix linting issues in *.md files using markdownlint-cli2 through a structured workflow that diagnoses, fixes automatically where possible, and guides manual fixes when needed.
Use this skill when:
Check if markdownlint-cli2 is installed:
markdownlint-cli2 --version
If missing, install it globally via npm:
npm install -g markdownlint-cli2
Handle any permission or installation errors by suggesting:
npm install --save-dev markdownlint-cli2npx markdownlint-cli2Look for existing markdown configuration files in the project root:
.markdownlint-cli2.jsonc.markdownlint.json.markdownlint.yaml.markdownlint.yml.markdownlintrcIf none exist, create .markdownlint-cli2.jsonc with:
{
"config": {
"MD013": false
},
"ignores": []
}
This disables max line length warnings while keeping other rules active. The ignores array can be used to exclude specific files from linting (e.g., example files with intentional errors).
IMPORTANT - Configuration Policy:
.markdownlint-cli2.jsoncignores array based on:
.gitignore file (files already ignored by git)Run linter on root-level markdown files:
markdownlint-cli2 "*.md"
Document all issues found, including:
Scan all markdown files including subdirectories:
markdownlint-cli2 "**/*.md"
This includes files in directories like:
docs/guides/Create a complete inventory of all issues across the project.
Group all identified linting errors by error code:
Common error types:
Document patterns such as:
Run the auto-fix command to correct all auto-fixable issues:
markdownlint-cli2 "**/*.md" --fix
This command will:
Watch for:
Document what was fixed automatically versus what remains.
For remaining MD029 (ordered list item prefix) issues:
Load and consult references/MD029-Fix-Guide.md for detailed guidance on:
Key insight: MD029 errors often occur when code blocks, paragraphs, or other content between list items lack proper indentation (typically 4 spaces), causing markdown parsers to break list continuity.
For issues not auto-fixed:
Confirm all issues are resolved:
markdownlint-cli2 "**/*.md"
If no errors appear, linting is complete. If errors remain, document them for additional manual fixes.
Provide a comprehensive summary including:
Files Processed
Issues Fixed by Type
Remaining Issues (if any)
Completion Status
Always maintain the original meaning and structure of markdown content. Fix formatting without altering the author's intended message.
Respect existing markdown configuration files. Don't override project-specific linting rules unless explicitly requested.
Work from automatic fixes first, then manual fixes. This maximizes efficiency and reduces the risk of introducing errors.
Provide clear, detailed reports at each phase so users understand:
When encountering errors:
User request: "Set up markdown linting for my documentation"
Process:
.markdownlint-cli2.jsonc with MD013 disabledUser request: "Fix all markdown linting errors in my project"
Process:
User request: "I have ordered list numbering issues in my markdown files" or "My lists with code blocks are showing MD029 errors"
Process:
Comprehensive guide for handling MD029 (ordered list item prefix) errors, focusing on the root cause: improper indentation. This reference provides:
Load this file when MD029 errors persist after auto-fix, or when user needs guidance on fixing ordered list issues. The guide is particularly valuable when lists contain code blocks or mixed content.
Comprehensive style guide for avoiding MD036 (no emphasis as heading) errors. This reference provides:
Load this file when creating new markdown documentation or when encountering MD036 errors. Use as a reference to maintain consistent heading structure and avoid using bold text as heading substitutes.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.