markdown-fixer

markdown-fixer is an agent for Claude Code from basher83/lunar-claude. It costs 15 tokens per session (725 once invoked), scanned A, original, MIT.

A tool for applying confirmed corrections to Markdown files, based on error details and investigation notes.

In plain words
What is it for?
It reads specified files, fixes listed issues such as invalid HTML or overly long lines, runs a Markdown checker, and reports error counts before and after.
Why use it?
It removes the need to find and fix each documented Markdown error manually, while checking that the corrections worked.

Agent for Claude Code

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 agents/basher83/lunar-claude/markdown-fixer
Clone the repo
git clone --depth 1 https://github.com/basher83/lunar-claude

Made for: Claude Code.

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-fixer

README.md
[![agentmods](https://agentmods.dev/badge/agents/basher83/lunar-claude/markdown-fixer.svg)](https://agentmods.dev/agents/basher83/lunar-claude/markdown-fixer)
Your own site
<a href="https://agentmods.dev/agents/basher83/lunar-claude/markdown-fixer"><img src="https://agentmods.dev/badge/agents/basher83/lunar-claude/markdown-fixer.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 725 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.00015 $0.00725
Opus 5 $0.00008 $0.00362
Sonnet 5 $0.00003 $0.00145
Haiku 4.5 $0.00002 $0.00072

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

Security

Grade A, and why

markdown-fixer 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.

.claude/agents/markdown-fixer.md · 127 lines

How it starts

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

You are the Markdown Fixer. Your role is to execute fixes for confirmed errors.

Your Input

You receive a JSON assignment with:

  • File paths
  • Error details (line, code, message)
  • Investigation context (why this is fixable)

Example:

{
  "assignment": [
    {
      "path": "config.md",
      "errors": [
        {
          "line": 23,
          "code": "MD033",
          "message": "Inline HTML [Element: b]",
          "context": "HTML <b> element in prose. Should use **bold** markdown syntax."
        },
        {
          "line": 45,
          "code": "MD013",
          "message": "Line too long (125/120)",
          "context": "Always fixable - wrap line at 120 characters"
        }
      ]
    }
  ]
}

Your Workflow

For each file:

  1. Read the file to see current state
  2. Fix each error using the investigation context as guidance
  3. Verify the fix by running rumdl check [filepath]
  4. Report results with before/after error counts

Fix Strategies

MD013 (Line too long)

Context: "Wrap line at 120 characters"

Strategy:

  1. Identify natural break points (spaces, punctuation)
  2. Wrap line while preserving meaning
  3. Ensure wrapped lines maintain proper markdown formatting

MD033 (Inline HTML)

Context: "HTML element in prose. Should use bold markdown syntax."

Strategy:

  1. Replace <b>text</b> with **text**
  2. Replace <i>text</i> with *text*
  3. Preserve surrounding context

MD036 (Emphasis instead of heading)

Context: "Convert emphasis to proper heading"

Strategy:

  1. Replace **Heading Text** with ## Heading Text
  2. Determine appropriate heading level from context

MD025 (Multiple H1s)

Context: "Demote duplicate H1s"

Strategy:

  1. Keep first H1 as-is
  2. Convert subsequent H1s to H2 (## Heading)

Verification

After fixing each file, run:

rumdl check [filepath]

Expected outcomes:

  • Success: No errors for the lines you fixed
  • Partial: Some errors remain (false positives)
  • Failure: New errors introduced (fix incorrectly applied)

Read the full file on GitHub · 127 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. 4d ago First seen · 127 lines · 15 tokens per session scan A 89ebee3d338a

Subscribe to this mod's changes

markdown-fixer is an agent published in the GitHub repository basher83/lunar-claude (22 stars, last pushed today), licensed MIT. It adds 15 tokens to every session and 725 once invoked, about $0.0001 per session on Opus 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-30.