markdown-linter

Lint Markdown files for formatting issues, broken links, and style consistency.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "markdown-linter" with this command: npx skills add derick001/markdown-linter-cli

Markdown Linter

What This Does

A CLI tool to lint Markdown files for common formatting issues, style consistency, and broken links. Helps maintain documentation quality by catching errors before publication.

Key features:

  • Header hierarchy validation - ensure proper nesting (no skipped levels)
  • Image alt text checking - flag images without descriptive alt text
  • Internal link validation - check that internal links (within same doc) point to existing anchors
  • Line length checking - warn about lines exceeding configurable length (default 80 chars)
  • Trailing whitespace detection - find and report trailing spaces/tabs
  • List consistency - ensure consistent list markers (-, *, +) within same document
  • Code block language - recommend adding language specification to code blocks
  • Empty link detection - flag links with empty text or URLs
  • Duplicate headers - warn about duplicate header text within same file
  • External link checking - optionally validate external URLs (requires network)

How To Use

Run the skill with:

./scripts/main.py run --input path/to/file.md

Or lint multiple files:

./scripts/main.py run --input "*.md"

Options

  • --input: Path to Markdown file(s) (supports glob patterns)
  • --max-line-length: Maximum allowed line length (default: 80)
  • --check-external-links: Enable external URL validation (default: false)
  • --ignore-rules: Comma-separated list of rule IDs to ignore

Output

Returns JSON with linting results:

{
  "file": "example.md",
  "issues": [
    {
      "line": 10,
      "column": 1,
      "rule": "MD001",
      "severity": "warning",
      "message": "Header levels should only increment by one level at a time",
      "fix": "Change ## to #"
    }
  ],
  "summary": {
    "total_issues": 5,
    "errors": 2,
    "warnings": 3
  }
}

Limitations

  • External link checking requires network connectivity and may be slow
  • Readability scores are not currently implemented
  • Some Markdown extensions (tables, footnotes) may not be fully validated
  • Large files (>10k lines) may take longer to process
  • Anchor detection for internal links works only for simple anchor patterns

Examples

Basic linting:

./scripts/main.py run --input README.md

With custom line length:

./scripts/main.py run --input docs/*.md --max-line-length 100

With external link validation:

./scripts/main.py run --input "**/*.md" --check-external-links

Rule Reference

  • MD001: Header hierarchy violation
  • MD002: Missing image alt text
  • MD003: Broken internal link
  • MD004: Line too long
  • MD005: Trailing whitespace
  • MD006: Inconsistent list markers
  • MD007: Code block missing language
  • MD008: Empty link
  • MD009: Duplicate header
  • MD010: Broken external link (if enabled)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Zoom

Zoom API integration with managed OAuth. Manage meetings, webinars, recordings, and user profiles. Use this skill when users want to schedule meetings, manag...

Registry SourceRecently Updated
General

Kleinanzeigen.de Helper

Erstelle und verwalte Verkaufsanzeigen speziell auf kleinanzeigen.de. Verwende diesen Skill wenn der Human sagt, er will etwas auf kleinanzeigen.de verkaufen...

Registry SourceRecently Updated
General

Poku

Sends and receives phone calls and messages (like SMS, WhatsApp, Slack), and reserves dedicated phone numbers using the Poku API. Example use cases: calling...

Registry SourceRecently Updated
General

IMAP/SMTP Email - Maddy Fix

Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Sup...

Registry SourceRecently Updated