html-to-markdown

html-to-markdown is a skill for Claude Code, Codex from appautomaton/markmaton. It costs 38 tokens per session (587 once invoked), scanned A, original, MIT.

A conversion tool for turning a web address or HTML into readable Markdown, with page details, links, images, and quality information. It can capture pages that need a browser to run their JavaScript before converting them.

In plain words
What is it for?
Capturing web pages, extracting their main content, converting HTML to Markdown, and producing either a structured JSON result or just the Markdown text.
Why use it?
It removes the need to separately load dynamic pages and clean up their HTML by hand. The result preserves useful page metadata and inventories linked content and images.

Skill for Claude CodeCodex

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 skills/appautomaton/markmaton/html-to-markdown
Any agent
npx skills add appautomaton/markmaton --skill html-to-markdown
Clone the repo
git clone --depth 1 https://github.com/appautomaton/markmaton

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/appautomaton/markmaton/html-to-markdown.svg)](https://agentmods.dev/skills/appautomaton/markmaton/html-to-markdown)
Your own site
<a href="https://agentmods.dev/skills/appautomaton/markmaton/html-to-markdown"><img src="https://agentmods.dev/badge/skills/appautomaton/markmaton/html-to-markdown.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 587 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.00038 $0.00587
Opus 5 $0.00019 $0.00293
Sonnet 5 $0.00008 $0.00117
Haiku 4.5 $0.00004 $0.00059

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

Security

Grade A, and why

html-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 5d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/capture_html.py, scripts/markmaton_convert.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/html-to-markdown/SKILL.md · 62 lines

How it starts

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

HTML to Markdown

Composes with

  • Called byRECIPES.md parse-jd recipe (step 1). Any capture-a-web-page task in the workspace prefers this over built-in WebFetch.
  • Wraps — nodriver (CDP-based headless browser capture for JS-heavy pages, with Playwright Chromium discovery) and markmaton (HTML→Markdown with main-content extraction, metadata, and link/image inventory). See references/integration-patterns.md for browser-vs-fetch guidance.
  • Outputs — JSON envelope by default (markdown body + metadata + links + images + quality signals). Use --output-format markdown when only the raw Markdown body is needed.

Converts a URL or HTML into clean Markdown plus metadata, links, images, and quality signals.

From a URL

Capture the page and convert in one pipeline:

uv run --script scripts/capture_html.py <url> \
  | uv run --script scripts/markmaton_convert.py --from-capture --output-format json

The capture script outputs a JSON envelope by default. --from-capture reads it and extracts html, url, final_url, and content_type automatically — no context lost, URL typed once.

  • Add --wait-selector <css> or --wait-text <string> to the capture step for pages that need a readiness signal.
  • Prefer a simple fetch over browser capture for static articles, wikis, and server-rendered docs.

From HTML

uv run --script scripts/markmaton_convert.py --html-file page.html \
  --url <url> --output-format json

Or from stdin:

echo "$html" | uv run --script scripts/markmaton_convert.py --url <url>

Pass --url when available — it improves link resolution and canonical metadata.

Key defaults

  • Output: json. Use --output-format markdown for raw Markdown only.
  • Main-content extraction: on. Use --full-content to disable.
  • Capture: always headless. Timeout 10s, override with --timeout.
  • Browser discovery: user's Chrome → user's Chromium → Playwright's Chromium.

References

Read only when needed:

Read the full file on GitHub · 62 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. 5d ago First seen · 62 lines · 38 tokens per session scan A 141f840c60aa

Subscribe to this mod's changes

html-to-markdown is a skill published in the GitHub repository appautomaton/markmaton (5 stars, last pushed 21d ago), licensed MIT. It adds 38 tokens to every session and 587 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

firecrawl-build

Integrate Firecrawl into application code whenever a product, agent, or workflow needs web data inside the app — web search, live search results, page scraping, structured extraction, or browser interaction. Use when building any feature that needs data from the web in code, even if the user does not mention Firecrawl…

firecrawl/firecrawl · 149 tokens

firecrawl-build-scrape

Integrate Firecrawl /scrape into product code for single-page extraction. Use when an app already has a URL and needs markdown, HTML, links, screenshots, metadata, or structured page output. Prefer this skill over broader crawl patterns when the feature is page-level.

firecrawl/firecrawl · 62 tokens

firecrawl-build-interact

Integrate Firecrawl /interact into product code for dynamic pages and browser actions after scraping. Use when a feature needs clicks, form fills, pagination, authentication-aware flows, or other multi-step interactions that plain /scrape cannot complete.

firecrawl/firecrawl · 56 tokens

crw-dynamic-search

Programmatic web search and scrape with context isolation. Use for any research task where you need to search the web, filter results, and extract specific information — without flooding your context window with raw HTML and boilerplate. This is the single biggest token-saver in the crw skill set. Triggered by "search…

us/crw · 143 tokens

youtube

Extract transcripts from YouTube videos via the YouTube caption system.

axoviq-ai/synthadoc · 14 tokens

crw

Scrape, crawl, map, and search the web using fastCRW's native /v1 API. Use when the user needs web page content, site-wide extraction, URL discovery, or web search results. Single binary, 14 MB RAM; /v2 exists separately for Firecrawl migration.

us/crw · 64 tokens