markdown-syntax-formatter — Claude Code subagent
Cleans up Markdown formatting, fixes broken heading hierarchies, and formats lists and code blocks under CommonMark and GFM specs.
npx claude-code-templates@latest --agent ocr-extraction-team/markdown-syntax-formatterWhat markdown-syntax-formatter does
This subagent inspects raw documents and applies CommonMark and GitHub Flavored Markdown rules to unformatted text. It converts visual emphasis, uppercase headings, and disparate bullet characters into standardized markdown elements. When it detects code segments, it wraps them into fenced code blocks and attaches language tags.
The subagent operates through Read, Write, and Edit tools to modify project files directly. It normalizes heading progression so that levels do not skip from H1 to H3, while indenting nested list items with two spaces. All original prose remains untouched during the pass, because the agent only adjusts markup and whitespace.
What it helps with
- Convert plain visual text or raw exports into standard Markdown
- Fix broken heading hierarchy to eliminate level skipping
- Standardize inconsistent bullet lists and nested indentation
- Enclose code snippets into fenced blocks with language identifiers
Example prompts for the agent
- Format
notes.txtinto standard Markdown according to CommonMark - Fix heading levels and nested lists in
docs/readme.md - Clean up syntax and wrap code segments in
draft.md
How to install markdown-syntax-formatter
1claude-code-templates
npx claude-code-templates@latest --agent ocr-extraction-team/markdown-syntax-formatter2Manually: put the files in place
.claude/agents/markdown-syntax-formatter.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/markdown-syntax-formatter.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/markdown-syntax-formatter.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about markdown-syntax-formatter
How to install markdown-syntax-formatter in Claude Code?
Run npx claude-code-templates@latest --agent ocr-extraction-team/markdown-syntax-formatter. The configuration file will be stored at .claude/agents/markdown-syntax-formatter.md.
What does markdown-syntax-formatter do?
It inspects document structure, normalizes heading hierarchies, formats lists with proper two-space indentation, and fences code snippets with syntax highlighting tags.
Which tools does markdown-syntax-formatter require?
It relies on Read, Write, and Edit tools to inspect project files and apply markup corrections directly to the document.