convert-markdown

convert-markdown is a command for Claude Code from davistroy/claude-marketplace. It costs 11 tokens per session (2,677 once invoked), scanned B, original, MIT.

A command that turns a Markdown file—a plain-text document with simple formatting marks—into a Microsoft Word .docx file. It can include a table of contents, a custom Word style, and highlighted code blocks.

In plain words
What is it for?
Use it to convert guides, reports, READMEs, and other Markdown files into Word documents, with options to preview the conversion or adjust styling.
Why use it?
It avoids manually rebuilding document formatting when a Markdown document needs to be shared or edited in Word.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the personal-plugin plugin — 29 skills, 23 commands, 10 agents, 2 hooks shipped together

Good fit Use it to convert guides, reports, READMEs, and other Markdown files into Word documents, with options to preview the conversion or adjust styling.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/davistroy/claude-marketplace/convert-markdown
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.

Clone the repo
git clone --depth 1 https://github.com/davistroy/claude-marketplace

Made for: Claude Code.

Or install personal-plugin, the plugin that ships this one along with the rest of its 29 skills, 23 commands, 10 agents, 2 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/davistroy/claude-marketplace/convert-markdown/github.svg)](https://agentmods.dev/commands/davistroy/claude-marketplace/convert-markdown)
Your own site
<a href="https://agentmods.dev/commands/davistroy/claude-marketplace/convert-markdown"><img src="https://agentmods.dev/badge/commands/davistroy/claude-marketplace/convert-markdown/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 convert-markdown

Your own site · 80×15
<a href="https://agentmods.dev/commands/davistroy/claude-marketplace/convert-markdown"><img src="https://agentmods.dev/badge/commands/davistroy/claude-marketplace/convert-markdown.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,677 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00011 $0.02677
Opus 5 $0.00005 $0.01339
Sonnet 5 $0.00002 $0.00535
Haiku 4.5 $0.00001 $0.00268

Measured 10d ago against content hash 46c2166438f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

convert-markdown scanned grade B with 1 finding 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 10d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

Linux: sudo apt install pandoc (Debian/Ubuntu)
plugins/personal-plugin/commands/convert-markdown.md · 306 lines

How it starts

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

Markdown to Word Conversion

Convert a markdown file into a professionally formatted Microsoft Word document (.docx).

Input Validation

Required Arguments:

  • <markdown-file> - Path to the markdown file to convert

Optional Arguments:

  • <output-file> - Desired output filename (defaults to same name with .docx extension)
  • --no-toc - Skip table of contents generation
  • --style <path> - Use a custom reference document (.docx) for Word styling
  • --dry-run - Show the pandoc command that would be run without executing it
  • --highlight <style> - Syntax highlighting style for code blocks (default: tango). Options: pygments, tango, espresso, zenburn, kate, monochrome, breezedark, haddock

Validation: If the markdown file path is missing, display:

Usage: /convert-markdown <markdown-file> [output-file] [--no-toc] [--style <path>] [--dry-run] [--highlight <style>]

Examples:
  /convert-markdown docs/api-guide.md
  /convert-markdown README.md documentation.docx
  /convert-markdown report.md --no-toc
  /convert-markdown report.md --style company-template.docx
  /convert-markdown report.md --dry-run

Instructions

Step 1: Identify Source File

If the user hasn't provided a markdown file path, ask them to specify:

  • The path to the markdown file to convert
  • Optional: desired output filename (defaults to same name with .docx extension)

Verify the source file exists. If not:

Error: Source file not found: [path]

Please check the file path and try again.

Step 2: Validate Prerequisites

CRITICAL: Check that pandoc is installed BEFORE any processing:

# Check for pandoc
pandoc --version

If the pandoc check fails (command not found), display this error and stop:

Error: Required dependency 'pandoc' not found

/convert-markdown requires pandoc for document conversion.

Installation instructions:
  Windows:  winget install pandoc
            choco install pandoc
  macOS:    brew install pandoc
  Linux:    sudo apt install pandoc       (Debian/Ubuntu)
            sudo dnf install pandoc       (Fedora)
            sudo pacman -S pandoc         (Arch)

After installing, run the command again.

Read the full file on GitHub · 306 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. 10d ago First seen · 306 lines · 11 tokens per session scan B 46c2166438f6

Subscribe to this mod's changes

convert-markdown is a command published in the GitHub repository davistroy/claude-marketplace (5 stars, last pushed 2d ago), licensed MIT. It adds 11 tokens to every session and 2,677 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.