[MODEL] All models
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Other unexpected behavior
What You Asked Claude to Do
Description
Claude frequently generates Markdown files that violate commonlint rules, specifically MD022 and MD033, even when producing otherwise well-structured documents.
This impacts readability and markdownlint-cli2 is unable to fix many of these errors, often causing claude to skip pre commit hooks that run the linter.
What Claude Actually Did
Every markdown file I've generated with claude has these specific linting errors, here's an example from the claude-plugins-official repository:
https://github.com/anthropics/claude-plugins-official/tree/main/plugins/lua-lsp
Claude outputs Markdown with:
- Missing blank lines around headings (MD022)
- Inline HTML usage without proper handling or escaping (MD033)
Expected Behavior
Claude should generate markdown documents following official markdown styling rules
Files Affected
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
Install a markdown lsp plugin and open markdown documents in claude-plugins-official repository, most documents have these issues in that repo.
You can try to add rules for this to a CLAUDE.md file, but they are not followed consistently. It leads to massive low value diffs in markdown heavy repos when it goes un noticed
Claude Model
Sonnet
Relevant Conversation
Impact
Critical - Data loss or corrupted project
Claude Code Version
2.0.75 and all previous versions
Platform
Anthropic API
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗