markdown-formatter

markdown-formatter is a skill for Claude Code, Codex from dunialabs/mcp-servers. It costs 55 tokens per session (764 once invoked), scanned A, original, MIT.

A guide for formatting and checking Markdown, the plain-text format used for README files and documentation. It covers CommonMark and GitHub Flavored Markdown, two widely used Markdown rule sets.

In plain words
What is it for?
Use it to format README files and documentation, fix Markdown issues, and create a table of contents from headings.
Why use it?
It helps find and fix syntax, spacing, list, link, and code-block problems in Markdown files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to format README files and documentation, fix Markdown issues, and create a table of contents from headings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dunialabs/mcp-servers/markdown-formatter
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.

Any agent
npx skills add dunialabs/mcp-servers --skill markdown-formatter
Clone the repo
git clone --depth 1 https://github.com/dunialabs/mcp-servers

Made for: Claude Code, Codex.

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 markdown-formatter

README.md
[![agentmods](https://agentmods.dev/badge/skills/dunialabs/mcp-servers/markdown-formatter/github.svg)](https://agentmods.dev/skills/dunialabs/mcp-servers/markdown-formatter)
Your own site
<a href="https://agentmods.dev/skills/dunialabs/mcp-servers/markdown-formatter"><img src="https://agentmods.dev/badge/skills/dunialabs/mcp-servers/markdown-formatter/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for markdown-formatter

Your own site · 80×15
<a href="https://agentmods.dev/skills/dunialabs/mcp-servers/markdown-formatter"><img src="https://agentmods.dev/badge/skills/dunialabs/mcp-servers/markdown-formatter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 764 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00055 $0.00764
Opus 5.5 $0.00022 $0.00306
Sonnet 5.5 $0.00011 $0.00153
Haiku 4.5 $0.00006 $0.00076

Measured 2mo ago against content hash d543250e33f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

markdown-formatter 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 2mo 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.

mcp-skills/examples/skills/markdown-formatter/SKILL.md · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Markdown Formatter

This skill helps format, validate, and improve markdown documents.

Quick Start

Basic Formatting Rules

  1. Headers: Use ATX-style headers (#, ##, etc.)
  2. Lists: Consistent indentation (2 or 4 spaces)
  3. Code blocks: Always specify language for syntax highlighting
  4. Links: Use descriptive text, not "click here"

Generate Table of Contents

def generate_toc(markdown_content):
    """Generate TOC from markdown headers"""
    lines = markdown_content.split('\n')
    toc = []

    for line in lines:
        if line.startswith('#'):
            level = len(line.split()[0])
            title = line.lstrip('#').strip()
            anchor = title.lower().replace(' ', '-')
            indent = '  ' * (level - 1)
            toc.append(f"{indent}- [{title}](#{anchor})")

    return '\n'.join(toc)

Fix Common Issues

Fix List Indentation

def fix_list_indentation(content):
    """Ensure consistent 2-space indentation"""
    lines = content.split('\n')
    fixed = []

    for line in lines:
        if line.strip().startswith('-') or line.strip().startswith('*'):
            # Count leading spaces
            spaces = len(line) - len(line.lstrip())
            # Normalize to multiple of 2
            normalized = (spaces // 2) * 2
            fixed.append(' ' * normalized + line.lstrip())
        else:
            fixed.append(line)

    return '\n'.join(fixed)

Add Language to Code Blocks

def add_code_language(content, default_lang='bash'):
    """Add language specifier to code blocks"""
    return content.replace('```\n', f'```{default_lang}\n')

Best Practices

  1. One sentence per line: Makes diffs cleaner
  2. Empty line before/after headers: Improves readability
  3. Consistent list markers: Pick - or *, stick with it
  4. Code block languages: Always specify for syntax highlighting
  5. Link references: Use reference-style for repeated URLs

Tools

Read the full file on GitHub · 112 lines

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. 2mo ago First seen · 112 lines · 55 tokens per session scan A d543250e33f1

Subscribe to this mod's changes

markdown-formatter is a skill published in the GitHub repository dunialabs/mcp-servers (7 stars, last pushed 6mo ago), licensed MIT. It adds 55 tokens to every session and 764 once invoked, about $0.0002 per session on Opus 5.5. 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.