to-markdown

to-markdown is a skill for Claude Code from Mathews-Tom/armory. It costs 71 tokens per session (1,773 once invoked), scanned A, original, MIT.

A file and URL converter that extracts readable Markdown, plain text formatted for documents, from PDFs, Word files, spreadsheets, presentations, web pages, images, audio, CSV files, and YouTube. It uses OCR, which reads text in images, when needed.

In plain words
What is it for?
Use it to extract text from documents, pages, screenshots, recordings, spreadsheets, or videos, including preparing material for retrieval-augmented generation (RAG), where an AI answers using supplied documents.
Why use it?
It turns varied source material into a consistent format that people and language-model pipelines can search or process. It also handles static and JavaScript-rendered web pages through different fetching methods.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the armory plugin — 96 skills shipped together

Good fit Use it to extract text from documents, pages, screenshots, recordings, spreadsheets, or videos, including preparing material for retrieval-augmented generation (RAG), where an AI answers using supplied documents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mathews-tom/armory/to-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.

Any agent
npx skills add Mathews-Tom/armory --skill to-markdown
Clone the repo
git clone --depth 1 https://github.com/Mathews-Tom/armory

Made for: Claude Code.

Or install armory, the plugin that ships this one along with the rest of its 96 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/mathews-tom/armory/to-markdown/github.svg)](https://agentmods.dev/skills/mathews-tom/armory/to-markdown)
Your own site
<a href="https://agentmods.dev/skills/mathews-tom/armory/to-markdown"><img src="https://agentmods.dev/badge/skills/mathews-tom/armory/to-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 to-markdown

Your own site · 80×15
<a href="https://agentmods.dev/skills/mathews-tom/armory/to-markdown"><img src="https://agentmods.dev/badge/skills/mathews-tom/armory/to-markdown.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,773 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00071 $0.01773
Opus 5.5 $0.00028 $0.00709
Sonnet 5.5 $0.00014 $0.00355
Haiku 4.5 $0.00007 $0.00177

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

Security

Grade A, and why

to-markdown 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 1mo 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.

skills/to-markdown/SKILL.md · 165 lines

How it starts

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

To Markdown

Convert any file or URL to clean Markdown using MarkItDown as the conversion engine, with a lightweight fetch layer for URLs.

Reference Files

File Purpose
references/formats.md Per-format handling notes, internal engines, known gaps
references/fetch.md URL fetch layer: trafilatura + Playwright strategies
references/install.md Dependency install guide for all variants

Decision Tree

Determine the input type before touching any tool:

Input type?
  Local file path        -> markitdown directly
  URL
    YouTube URL          -> markitdown directly (transcript extraction built-in)
    Static page          -> trafilatura fetch -> markitdown on HTML result
    JS-rendered / auth   -> Playwright fetch -> markitdown on result
  Pasted HTML string     -> markitdown directly on string

Do not use web_fetch or WebFetch for URLs — route through the fetch layer described in references/fetch.md to preserve the conversion pipeline.

Core Conversion Workflow

Step 1: Ensure dependencies

uv pip show markitdown || uv pip install 'markitdown[all]' trafilatura

See references/install.md for selective installs and full dependency table.

Step 2: Convert

from markitdown import MarkItDown

md = MarkItDown(enable_plugins=False)
result = md.convert("path/to/file.pdf")
print(result.text_content)

Step 3: Workflow

  1. Detect input type (file path, URL, raw HTML).
  2. If URL, run fetch layer first (see references/fetch.md).
  3. Run markitdown conversion on the local file or fetched content.
  4. Post-process if needed (strip boilerplate, trim to main content).
  5. Write output or return inline per output conventions below.

Output Conventions

Context Output behaviour
Single file, user wants file Write <input_stem>.md to same directory
Single file, inline request Return Markdown in conversation
Batch (multiple files) Write each to <stem>.md, summarise what was produced
URL Write <slug>.md to current directory or return inline
Piped into another workflow Return result.text_content string only

Read the full file on GitHub · 165 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 165 lines · 71 tokens per session scan A 445375ac8061

Subscribe to this mod's changes

to-markdown is a skill published in the GitHub repository Mathews-Tom/armory (334 stars, last pushed 2d ago), licensed MIT. It adds 71 tokens to every session and 1,773 once invoked, about $0.0003 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-09-05.

Related

Other skills, from other repositories

kb-retriever

A retrieval and question-answering assistant for a local folder of documents, including Markdown, text, PDFs, and spreadsheets.

ConardLi/garden-skills · 105 tokens

voice-extractor

Capture a user's real writing voice from 5-20 prior samples, store a local voice.yaml fingerprint, and enforce it on newsjack drafts so AI tells disappear. Measures voice with named stylometry lenses (Burrows's Delta function-word vector, MATTR lexical diversity, sentence-length burstiness, Biber Dimension-1 register…

elvisun/newsjack · 90 tokens

dataset-datasheet

Document a dataset so others know what it is, how it was made, and when not to use it. Use when asked to write a datasheet for a dataset, document training/eval data, or assess whether a dataset is fit for a use. Produces a datasheet — motivation, composition, collection process, preprocessing, recommended uses &…

mohitagw15856/pm-claude-skills · 81 tokens

model-card

Document a deployed ML/AI model so others can use it responsibly. Use when asked to write a model card, document a model's intended use and limitations, or prepare an AI model for review/launch. Produces a complete model card — intended use, training data, evaluation metrics across slices, limitations, ethical…

mohitagw15856/pm-claude-skills · 73 tokens

bailian-kb

A command-line manager for Alibaba Cloud Bailian knowledge bases, which are collections of documents prepared for search and question answering. It handles the stored documents, search services, text chunks, and data-centre files rather than everyday searches.

modelstudioai/cli · 235 tokens

managedcode-markitdown

Use ManagedCode.MarkItDown when a .NET application needs deterministic document-to-Markdown conversion for ingestion, indexing, summarization, or content-processing workflows. USE FOR: ManagedCode.MarkItDown integration; document ingestion flows; Office or rich-text conversion to Markdown; indexing and summarization…

managedcode/dotnet-skills · 113 tokens