skills/markdownlint/SKILL.md
Configure, manage, and troubleshoot markdownlint in projects. Use when user wants to setup/install/configure markdownlint, add/remove/modify linting rules, fix markdown validation issues, customize .markdownlint.yaml, update ignore patterns, integrate with tools (Husky, CI), or troubleshoot markdown linting errors. Use even when user mentions markdown formatting problems, quality issues, or style consistency without explicitly saying "markdownlint".
npx skillsauth add perdolique/workflow markdownlintInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before any operation, detect which package manager the project uses:
Check for lock files:
pnpm-lock.yaml → use pnpmyarn.lock → use yarnpackage-lock.json → use npmbun.lockb → use bunCheck packageManager field 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 installIdentify what the user needs and read the appropriate reference file:
Initial Setup → Read references/setup.md
Modifying Rules → Read references/rules.md
Updating Ignore Patterns → Read references/ignoring.md
Fixing Violations → Read references/fixing.md
Integration Management → Read references/integration.md
Troubleshooting → Read references/troubleshooting.md
# Install
pnpm add -D markdownlint markdownlint-cli
# Run linting
pnpm run lint:markdown
# Auto-fix issues
markdownlint '**/*.md' --fix
# Lint specific file
markdownlint README.md
# Lint specific directory
markdownlint 'docs/**/*.md'
.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
User: "Add markdownlint to my project"
Action: Read references/setup.md and follow Steps 1-9 for complete initial setup.
User: "Stop complaining about duplicate headings"
Action: Read references/rules.md → Removing rules section. Add no-duplicate-heading: false to .markdownlint.yaml.
User: "I have 50 markdown errors, fix them"
Action: Read references/fixing.md → Auto-fixing section. Run markdownlint '**/*.md' --fix, show diff, handle remaining errors.
User: "Don't lint the dist folder"
Action: Read references/ignoring.md. Add dist/ to .markdownlintignore.
User: "Add markdown linting to GitHub Actions"
Action: Read references/integration.mdtions"
Action: Read references/integration.md → CI integration section. Create workflow file with pnpm setup and linting step.
For complex requests that span multiple operations:
Example: "Set up markdownlint with strict rules and CI"
User mentions installation, setup, "add markdownlint": → references/setup.md
User mentions specific rules, MD codes, enabling/disabling: → references/rules.md
User mentions ignoring files, excluding folders: → references/ignoring.md
User has errors and wants to fix them: → references/fixing.md
User mentions npm scripts, husky, pre-commit, CI, GitHub Actions: → references/integration.md
User reports issues, things not working, errors: → references/troubleshooting.md
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
Rationale: Start permissive, enable rules gradually. The line-length rule is disabled by default because:
Only add more rules if user explicitly requests them or if the project needs stricter validation.
development
Plan and drive non-trivial coding work from ambiguous request to scoped implementation and verification. Use when the user asks to plan before coding, plan then implement, split work into iterations or PR-sized tasks, tackle a risky multi-file feature, refactor, migration, or recover after failed work. Do not use for simple one-step edits, commit or PR creation, pure framework/domain conventions, or repo-specific roadmap docs where a more specific planning skill applies.
development
TypeScript coding conventions for writing, reviewing, and refactoring typed code. Use when working on `.ts`, `.tsx`, or files that embed TypeScript such as Vue, Astro, or Svelte components. Also use for TypeScript snippets, typed refactors, and review comments about code organization or function structure.
development
Write and maintain Vitest unit tests for TypeScript code. Use when the user needs unit coverage for utilities, services, or stores, or asks for Vitest-based tests with mocks, spies, and assertions.
development
Create GitHub pull requests from code changes via API or generate PR content in chat. Use when user wants to create/open/submit PR, mentions pull request/PR/merge request/code review, or asks to show/generate/display/output PR content in chat (give me PR, PR to chat, send PR to chat, etc).