markdown

Markdown linting and automated fixing using markdownlint-cli2. Use when Claude needs to: (1) Check markdown files for style issues, (2) Fix markdown formatting problems, (3) Ensure markdown follows best practices, (4) Validate markdown documents, or (5) Apply consistent markdown styling

242 stars

Best use case

markdown is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Markdown linting and automated fixing using markdownlint-cli2. Use when Claude needs to: (1) Check markdown files for style issues, (2) Fix markdown formatting problems, (3) Ensure markdown follows best practices, (4) Validate markdown documents, or (5) Apply consistent markdown styling

Markdown linting and automated fixing using markdownlint-cli2. Use when Claude needs to: (1) Check markdown files for style issues, (2) Fix markdown formatting problems, (3) Ensure markdown follows best practices, (4) Validate markdown documents, or (5) Apply consistent markdown styling

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "markdown" skill to help with this workflow task. Context: Markdown linting and automated fixing using markdownlint-cli2. Use when Claude needs to: (1) Check markdown files for style issues, (2) Fix markdown formatting problems, (3) Ensure markdown follows best practices, (4) Validate markdown documents, or (5) Apply consistent markdown styling

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/markdown/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/46ki75/markdown/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/markdown/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How markdown Compares

Feature / AgentmarkdownStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Markdown linting and automated fixing using markdownlint-cli2. Use when Claude needs to: (1) Check markdown files for style issues, (2) Fix markdown formatting problems, (3) Ensure markdown follows best practices, (4) Validate markdown documents, or (5) Apply consistent markdown styling

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Markdown Lint

Automated markdown validation and fixing using markdownlint-cli2.

## Workflow Overview

```text
1. Run auto-fix     → markdownlint-cli2 --fix <file>
2. Check remaining  → markdownlint-cli2 <file>
3. Fix manually     → str_replace for structural issues
4. Verify           → markdownlint-cli2 <file> (should show 0 errors)
```

**Expected results**: Auto-fix resolves 70-90% of issues. Remaining 3-5
issues require manual correction.

## Basic Commands

```bash
# Auto-fix single file
markdownlint-cli2 --fix document.md

# Check file
markdownlint-cli2 document.md

# Multiple files
markdownlint-cli2 --fix file1.md file2.md

# All markdown in directory
markdownlint-cli2 --fix "**/*.md"

# With custom config
markdownlint-cli2 --config .markdownlint.json document.md
```

## File Paths

```bash
# Uploaded files
markdownlint-cli2 --fix /mnt/user-data/uploads/document.md

# Working directory
markdownlint-cli2 --fix /home/claude/document.md

# Output to user
cp /path/to/fixed.md /mnt/user-data/outputs/
```

## Manual Fixes Required

Auto-fix cannot resolve these issues - they need Claude's judgment:

### MD025 - Multiple H1 Headers

**Why**: Requires understanding document hierarchy  
**Fix**: Convert extra H1s to appropriate level

```markdown
# Main Title

# Second Title → Change to: ## Second Title
```

### MD036 - Emphasis as Header

**Why**: Requires determining author intent  
**Fix**: Replace bold/italic with proper header

```markdown
**Section Title** → Change to: ## Section Title
```

### MD013 - Line Too Long

**Why**: Requires deciding where to break content  
**Fix**: Wrap at natural points (spaces, punctuation)

```markdown
This is a very long line exceeding 80 characters that needs wrapping.
↓
This is a very long line exceeding 80 characters that needs
wrapping.
```

**Exception**: URLs typically exempt

### MD041 - Missing First Line Header

**Why**: Requires structural decision  
**Fix**: Add H1 at start or restructure

## Execution Pattern

### For Uploaded Files

```bash
# 1. Auto-fix
markdownlint-cli2 --fix /mnt/user-data/uploads/document.md

# 2. Check remaining
markdownlint-cli2 /mnt/user-data/uploads/document.md
# Output: "Summary: 3 error(s)"
# Lists specific errors like "MD025/single-title Multiple top-level headings"

# 3. Manual fixes (example)
str_replace "# Extra Title" → "## Extra Title"

# 4. Verify
markdownlint-cli2 /mnt/user-data/uploads/document.md
# Output: "Summary: 0 error(s)"

# 5. Output
cp /mnt/user-data/uploads/document.md /mnt/user-data/outputs/
```

### For New Content

```bash
create_file /home/claude/doc.md "content..."
markdownlint-cli2 --fix /home/claude/doc.md
markdownlint-cli2 /home/claude/doc.md
# Fix remaining issues if any
cp /home/claude/doc.md /mnt/user-data/outputs/
```

## Configuration

Create `.markdownlint.json` to customize rules:

```json
{
  "default": true,
  "MD013": { "line_length": 120 },
  "MD033": false
}
```

**Common adjustments**:

- `"MD013": false` - Disable line length checking
- `"MD013": { "line_length": 120 }` - Increase limit to 120
- `"MD013": { "code_blocks": false }` - Exclude code blocks
- `"MD033": false` - Allow HTML
- `"MD041": false` - Don't require first line header

**Config file search order**:

1. `.markdownlint-cli2.jsonc`
2. `.markdownlint-cli2.yaml`
3. `.markdownlint.jsonc` / `.markdownlint.json`
4. `.markdownlint.yaml` / `.markdownlint.yml`

## Reporting to User

Provide clear summary of fixes:

```text
✅ Markdown linting complete!

Initial: 18 errors
After auto-fix: 4 errors
Manual fixes:
  • MD025: Converted 2 H1 headers to H2
  • MD036: Replaced bold with proper header
  • MD013: Wrapped long line

Final: 0 errors
```

## Error Count Interpretation

**Before auto-fix**:

- 0-5: Minor issues
- 6-15: Moderate issues
- 16+: Significant issues

**After auto-fix**:

- 0-2: Excellent
- 3-5: Typical
- 6+: Check if config needed

## Common Fix Patterns

```bash
# Multiple H1s - analyze structure first
# If sections: convert to H2
str_replace "# Introduction" → "## Introduction"

# If subsections: convert to H3
str_replace "# Details" → "### Details"

# Emphasis as headers - determine appropriate level
str_replace "**Important**" → "## Important"
str_replace "_Note_" → "### Note"

# Long lines - break at natural points
# After conjunctions: and, but, or
# After punctuation: , . ;
# Preserve URLs on single line
```

## Troubleshooting

**Auto-fix not working**:

```bash
# Check file exists
view /path/to/file.md

# Verify permissions
ls -l /path/to/file.md

# Use absolute path
markdownlint-cli2 --fix /full/path/to/file.md
```

**Too many errors after auto-fix**:

```bash
# Create relaxed config
echo '{"MD013": false, "MD041": false}' > .markdownlint.json
markdownlint-cli2 --config .markdownlint.json --fix file.md
```

**Specific rule causing issues**:

- Disable in config: `"MD013": false`
- Or adjust parameters: `"MD013": { "line_length": 120 }`

## When NOT to Lint

Skip linting when:

- Code examples intentionally violate rules
- Embedded HTML/JSX required (disable MD033)
- Generated docs with different conventions
- Legacy docs where changes break references

Use custom config to disable problematic rules.

## Quick Rule Reference

Most common rules Claude will encounter:

- **MD001** - Header increment by one level
- **MD004** - Consistent list markers
- **MD009** - No trailing spaces
- **MD010** - No hard tabs
- **MD012** - No multiple blank lines
- **MD013** - Line length (default: 80)
- **MD018** - Space after # in headers
- **MD022** - Blank lines around headers
- **MD025** - Single H1 only
- **MD031** - Blank lines around code
- **MD032** - Blank lines around lists
- **MD034** - Bare URLs in <>
- **MD036** - No emphasis as headers
- **MD040** - Language for code blocks

Full rule documentation: <https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md>

Related Skills

woocommerce-markdown

242
from aiskillstore/marketplace

Guidelines for creating and modifying markdown files in WooCommerce. Use when writing documentation, README files, or any markdown content.

obsidian-markdown

242
from aiskillstore/marketplace

Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.

baoyu-url-to-markdown

242
from aiskillstore/marketplace

Fetch any URL and convert to markdown using Chrome CDP. Supports two modes - auto-capture on page load, or wait for user signal (for pages requiring login). Use when user wants to save a webpage as markdown.

baoyu-markdown-to-html

242
from aiskillstore/marketplace

Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, PlantUML, footnotes, alerts, and infographics. Use when user asks for "markdown to html", "convert md to html", "md转html", or needs styled HTML output from markdown.

baoyu-format-markdown

242
from aiskillstore/marketplace

Formats plain text or markdown files with frontmatter, titles, summaries, headings, bold, lists, and code blocks. Use when user asks to "format markdown", "beautify article", "add formatting", or improve article layout. Outputs to {filename}-formatted.md.

baoyu-danger-x-to-markdown

242
from aiskillstore/marketplace

Convert X (Twitter) tweet or article URL to markdown. Uses reverse-engineered X API (private). Requires user consent before use.

markdown-toc

242
from aiskillstore/marketplace

Use when generating or updating Table of Contents in markdown files. Supports multiple files, glob patterns, configurable header levels, and various insertion modes. Triggered by "generate toc", "update toc", "table of contents", "add toc to markdown".

markdown-pro

242
from aiskillstore/marketplace

Professional Markdown documentation skill for creating polished README files, changelogs, contribution guides, and technical documentation. Use for: (1) README generation with badges and sections, (2) Automated changelog from git history, (3) Table of contents generation, (4) Contribution guidelines, (5) Technical documentation formatting, (6) Code documentation with syntax highlighting

markdown-url

242
from aiskillstore/marketplace

Route any website you need to visit through markdown.new by prefixing the URL. **WHEN TO USE:** - You would normally open a website link to read content (docs, blog posts, changelogs, GitHub issues, etc.) - You need a cleaner, Markdown-friendly view for copying notes or summarizing

azure-quotas

242
from aiskillstore/marketplace

Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".

DevOps & Infrastructure

raindrop-io

242
from aiskillstore/marketplace

Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.

Data & Research

zlibrary-to-notebooklm

242
from aiskillstore/marketplace

自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。