Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

markdownlint-cli

$ markdownlint Community Low Risk
Igor Shubovych · Code & DevOps · MIT · macos / linux / windows

Classic Node.js CLI wrapper for the markdownlint engine that validates Markdown headings, lists, links, and fenced code blocks. Supports machine-readable --json diagnostics and deterministic --fix formatting.

FCRS-1.0 Score
84 /100
Good
Medium Confidence
Zero-Friction Install
brew install markdownlint-cli
CLI vs MCP Decision CLI Only

Lints and auto-fixes workspace Markdown files locally with zero network overhead.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Supports --json structured output, stdin -s, --config, and deterministic exit codes.

  • markdownlint --json writes structured JSON arrays to stderr/stdout
Trust & Safety 22 / 25

Read-only by default; mutates files only when --fix is explicitly provided.

  • Non-destructive default lint mode; explicit --fix opt-in
Setup & Portability 13 / 15

Cross-platform via Homebrew, npm, and npx, requiring Node.js.

  • Easy installation via brew or npx markdownlint-cli
Utility & Efficiency 12 / 15

Widely adopted in pre-commit and CI docs checks, though markdownlint-cli2 is faster on huge repos.

  • Covers 40+ standard Markdown rules with auto-fix support
Maintenance & Lineage 8 / 10

Well-known community CLI (igorshubovych/markdownlint-cli) under MIT license.

  • Actively used MIT project at igorshubovych/markdownlint-cli
Docs & Verifiability 8 / 10

Clear README CLI flag table and upstream markdownlint rule references.

  • Documented flags in GitHub README and --help

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

Offline local Markdown linter; no credentials stored or required.

Side Effects
Read-Only Local Write
Cost & Quotas

MIT open-source npm package; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# markdownlint-cli (markdownlint) Agent Rules
- Run `markdownlint --json` first to inspect violations before calling `--fix`.
- Quote glob patterns and pass `--ignore node_modules` if needed.

Agent-Ready Command Recipes

Safe Read-Only Queries

Lint Markdown files with JSON output
markdownlint --json "docs/**/*.md"

Emits JSON violation arrays with rule names, line numbers, and error details without editing files.

Controlled Writes & Previews

Auto-fix fixable Markdown lint violations
markdownlint --fix "docs/**/*.md"

Applies safe rule fixes in place across matched Markdown files.

Strengths for Agents

  • + Native --json diagnostics include rule IDs, line numbers, and fixable error ranges.
  • + --fix cleanly resolves whitespace, list marker, and heading spacing issues.

Caveats & Pitfalls

  • ! Note that --json writes JSON to stderr in some versions; redirect 2>&1 when parsing.
  • ! Slower and less flexible on complex glob configs than newer markdownlint-cli2.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI