About markdownlint
A markdownlint skill for configuring, running, and troubleshooting Markdown linting in projects. It guides package-manager detection, rule selection, exclusions, fixes, and integration.
Key features
- 01Detects the project's package manager
- 02Guides setup and configuration
- 03Explains rules and ignored files
- 04Covers fixes and integrations
Use cases
- 01Set up markdownlint in a project
- 02Choose or adjust lint rules
- 03Exclude generated Markdown files
- 04Diagnose linting or hook issues
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ perdolique/ workflow --skill markdownlintAfter installing, type/markdownlintin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/fixing.mdignoring.mdintegration.mdrules.mdsetup.mdtroubleshooting.mdDetails
From the project READMEMarkdownlint
Package manager detection
Before any operation, detect which package manager the project uses:
-
Check for lock files:
pnpm-lock.yaml→ usepnpmyarn.lock→ useyarnpackage-lock.json→ usenpmbun.lockb→ usebun
-
Check
packageManagerfield in package.json:"packageManager": "[email protected]" -
If no indicators, ask the user which package manager they prefer
Throughout this skill, commands use pnpm as examples. Replace with the detected package manager:
pnpm add -D→npm install --save-dev/yarn add -D/bun add -dpnpm run→npm run/yarn run/bun runpnpm install→npm install/yarn install/bun install
Operation selection guide
Read the reference matching the requested work:
| Operation | Reference |
|---|---|
| Installation, configuration files, scripts, and verification instructions | Setup |
| Rule names, codes, options, enabling, or disabling rules | Rules |
| Ignored files, folders, patterns, and checking exclusions | Ignoring |
| Diagnosing violations, automatic fixes, and remaining manual fixes | Fixing |
| Scripts, hooks, CI, and editor integration | Integration |
| Missing files, failed hooks, installation errors, or performance problems | Troubleshooting |
For a request spanning several operations, read the main reference first, then the related references needed to complete and verify the setup.
Quick reference: Common commands
# Install
pnpm add -D markdownlint markdownlint-cli
# Run linting
pnpm run lint:markdown
# Auto-fix issues
vpx markdownlint '**/*.md' --fix
# Lint specific file
vpx markdownlint README.md
# Lint specific directory
vpx markdownlint 'docs/**/*.md'
Quick reference: Config file basics
.markdownlint.yaml in project root:
$schema: ./node_modules/markdownlint/schema/markdownlint-config-schema.json
# Disable a rule
line-length: false
# Enable a rule
no-duplicate-heading: true
# Configure a rule
heading-style:
style: "atx"
.markdownlintignore in project root (gitignore syntax):
node_modules
dist/
build/
CHANGELOG.md
Default configuration philosophy
When setting up markdownlint, use this opinionated default configuration:
$schema: ./node_modules/markdownlint/schema/markdownlint-config-schema.json
line-length: false # Modern editors handle wrapping
Keep the standard rules enabled and disable line-length in this default configuration because:
- Modern editors and viewers handle text wrapping automatically
- Fixed line length creates unnecessary friction in most projects
- Semantic issues are more valuable to catch than presentation issues
Customize other rules when the user requests it or established project requirements call for it.