Markdownlint
Markdown linting and style checking with markdownlint.
Installation
First, install the Han CLI tool:
npm install -g @thebushidocollective/hanThen install the plugin:
han plugin install buki-markdownlintOverview
Markdown linting and style checking with markdownlint.
Hooks
This plugin provides validation hooks that run markdownlint checks:
Stop & SubagentStop Hooks
Runs markdownlint-cli2 in all directories with a package.json file to validate Markdown files.
The hooks will:
- Discover all directories containing
package.json - Run
markdownlint-cli2on all**/*.mdfiles (excludingnode_modules) - Stop on the first failure with
--fail-fast - Exit with code 2 if any linting errors are found
Usage
Install this plugin in your Claude Code configuration to automatically validate Markdown files on Stop and SubagentStop events.
Configuration
You can configure markdownlint by adding a .markdownlint.json or .markdownlint.jsonc file to your project root.
Example .markdownlint.json:
{
"default": true,
"MD013": false,
"MD041": false
}
License
Licensed under MIT - see repository for details.
Skills
markdownlint-configuration
Configure markdownlint rules and options including rule management, configuration files, inline comments, and style inheritance.
markdownlint-custom-rules
Create custom linting rules for markdownlint including rule structure, parser integration, error reporting, and automatic fixing.
markdownlint-integration
Integrate markdownlint into development workflows including CLI usage, programmatic API, CI/CD pipelines, and editor integration.
Hooks
Stop
Runs when the main Claude Code agent has finished responding.
npx @thebushidocollective/han@latest hook run --fail-fast --dirs-with .markdownlint-cli2.*,.markdownlint.* -- npx markdownlint-cli2 --fix "**/*.md" "#node_modules"SubagentStop
Runs when a Claude Code subagent (Task tool call) has finished responding.
npx @thebushidocollective/han@latest hook run --fail-fast --dirs-with .markdownlint-cli2.*,.markdownlint.* -- npx markdownlint-cli2 --fix "**/*.md" "#node_modules"