← ClaudeAtlas

markdown-formattinglisted

Format and lint markdown and MDX files using markdownlint with comprehensive rule knowledge for automated and manual fixes. Use when working with .md or .mdx files, formatting documentation, linting markdown/MDX, or when user mentions markdown issues, formatting problems, or documentation standards.
denolfe/dotfiles · ★ 83 · Data & Documents · score 78
Install: claude install-skill denolfe/dotfiles
# Markdown & MDX Formatting & Linting Format and lint markdown and MDX files using markdownlint CLI tools with comprehensive understanding of all markdown rules. ## Quick Start ```bash # Check if markdownlint is available which markdownlint || which markdownlint # Install if needed pnpm add -D markdownlint # or npm install -g markdownlint # Auto-fix files (markdown and MDX) markdownlint --fix "**/*.{md,mdx}" # Check specific files markdownlint README.md docs/**/*.md content/**/*.mdx ``` ## Configuration Detection Check for config files in this order: 1. `.markdownlint.json` 2. `.markdownlint.jsonc` 3. `.markdownlint.yaml` 4. `.markdownlintrc` 5. `markdownlint` key in `package.json` ## Common Workflow 1. **Detect environment**: Check for markdownlint CLI 2. **Find config**: Look for config files 3. **Run linter**: Identify issues 4. **Apply fixes**: Auto-fix or manual 5. **Verify**: Re-run to confirm ## Most Common Issues & Quick Fixes ### Headings - **MD001**: Heading levels increment (# → ## → ### not # → ###) - **MD018/MD019**: Single space after hash (`# Heading` not `#Heading`) - **MD022**: Blank lines around headings - **MD025**: Single H1 per document - **MD041**: First line should be H1 ```markdown <!-- Good heading structure --> # Main Title ## Section ### Subsection Content here... ``` ### Lists - **MD004**: Consistent list markers (all `-` or all `*`) - **MD007**: Nested lists indent 2 spaces - **MD030**: Single space after list marker - **MD032*