markdownlint-custom-rules

Create custom markdownlint rules with markdown-it or micromark parsers and fixInfo reporting.

187|20|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/TheBushidoCollective/han --skill markdownlint-custom-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: markdownlint-custom-rules
Source: https://github.com/TheBushidoCollective/han/tree/main/jutsu/jutsu-markdown/skills/markdownlint-custom-rules
Command: npx skills add https://github.com/TheBushidoCollective/han --skill markdownlint-custom-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill explains how to create custom markdownlint rules, hook into markdown-it or micromark parsers, and report errors with fix information.

Core Features & Use Cases

  • Rule object structure: Define names, description, tags, parser, and function.
  • Parser integration: Choose markdownit or micromark for detailed analysis.
  • Error reporting: Provide line-based feedback and optional fixInfo.

Quick Start

Create a simple markdownlint rule that flags any blockquotes in a document.

Frequently Asked Questions about markdownlint-custom-rules

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

FAQPage Schema
How do I create custom linting rules for markdownlint?

Custom markdownlint rules require a rule object with names, description, tags, parser, and function properties. Define the function to inspect parsed markdown tokens and report errors using onError callbacks with optional fixInfo to suggest corrections.

Can I use markdown-it or micromark parsers with custom markdownlint rules?

Yes, markdownlint custom rules support markdown-it, micromark, or no parser. Choose based on your analysis depth: markdown-it and micromark provide token-level detail for complex rule logic, while none works for simpler pattern matching.

How do I report errors and fixes in custom markdownlint rules?

Report errors using onError callbacks that pass line number and error details. Include fixInfo objects to provide automated fix suggestions, enabling markdownlint to offer corrections for violations your rule detects.

What's the difference between asynchronous and synchronous markdownlint rules?

Synchronous rules execute immediately and return results inline. Asynchronous rules handle operations like external API calls or file I/O by returning promises, letting markdownlint wait for completion before reporting errors.

Do I need parser integration to enforce project-specific Markdown conventions?

Parser integration is optional but recommended for enforcing conventions beyond basic syntax. Using markdown-it or micromark gives access to token structures, enabling rules that enforce style, structure, and semantic patterns specific to your project.

Can custom markdownlint rules handle complex parsing requirements?

Yes, the advanced rule structure supports detailed token analysis through markdown-it or micromark, enabling rules to enforce complex conventions like heading hierarchies, link validation, and content structure patterns across markdown documents.