markdownlint-compliance

markdownlint-compliance is a cursor rule for coding agents from cdbattags/ai. It costs 0 tokens per session (534 once invoked), scanned A, original, MIT.

A rule for following markdownlint's standard checks when creating or editing Markdown files. Markdownlint is a tool that flags common formatting problems in Markdown.

In plain words
What is it for?
Use it when editing files such as README documents, Markdown notes, or MDX content, while also checking for any project-specific lint settings.
Why use it?
It helps prevent inconsistent formatting and avoid errors caused by missing spaces, list separation, or code-block language labels.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/cdbattags/ai/markdownlint-compliance
Clone the repo
git clone --depth 1 https://github.com/cdbattags/ai

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for markdownlint-compliance

README.md
[![agentmods](https://agentmods.dev/badge/rules/cdbattags/ai/markdownlint-compliance.svg)](https://agentmods.dev/rules/cdbattags/ai/markdownlint-compliance)
Your own site
<a href="https://agentmods.dev/rules/cdbattags/ai/markdownlint-compliance"><img src="https://agentmods.dev/badge/rules/cdbattags/ai/markdownlint-compliance.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 534 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00534
Opus 5 $0.00000 $0.00267
Sonnet 5 $0.00000 $0.00107
Haiku 4.5 $0.00000 $0.00053

Measured 4d ago against content hash 9e469d43c1aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

markdownlint-compliance scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/rules/markdownlint-compliance.mdc · 81 lines

What it actually says

Markdownlint Compliance

When creating or editing Markdown files (.md, .mdc, .mdx), follow the markdownlint default rules unless a workspace .markdownlint.json / .markdownlint.jsonc / .markdownlint.yaml overrides them.

Before Writing Markdown

Check for a workspace config:

  • .markdownlint.json or .markdownlint.jsonc in the workspace root
  • markdownlint.config in .vscode/settings.json

If one exists, follow its overrides. If not, use defaults.

Rules the AI Commonly Violates

Rule What Fix
MD031 Fences need blank lines Blank line above/below fences
MD032 Lists need blank lines Blank line above/below lists
MD040 Fences need language tag Add bash, json, etc.
MD034 No bare URLs in prose Wrap in <url> or [text](url)

Quick Reference

<!-- ✅ GOOD: blank lines around fences and lists -->
Some text.

- Item one
- Item two

More text.

```bash
echo "has a language tag"
```

<!-- ❌ BAD: missing blank lines, no language tag -->
Some text.
- Item one
- Item two
More text.
```
echo "no language tag"
```

Auto-Fix

Most whitespace-related violations can be fixed automatically:

npx markdownlint-cli2 "path/to/file.md" --fix

Auto-fixable rules: MD009, MD010, MD012, MD022, MD023, MD027, MD030, MD031, MD032, MD047.

Not auto-fixable (must fix manually): MD013 (line length), MD036 (emphasis as heading), MD040 (code fence language), MD034 (bare URLs).

For bulk fixes across a directory:

npx markdownlint-cli2 "docs/**/*.md" --fix

After Editing Markdown

  1. Run auto-fix: npx markdownlint-cli2 "path/to/file.md" --fix
  2. Run ReadLints on the file to catch remaining violations
  3. Manually fix anything --fix couldn't resolve
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 81 lines · 0 tokens per session scan A 9e469d43c1aa

Subscribe to this mod's changes

markdownlint-compliance is a cursor rule published in the GitHub repository cdbattags/ai (4 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 534 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.