html-to-markdown-converting-html
Skill881 starsChanged 4 months agoMITView on GitHub
Use when converting HTML to Markdown, Djot, or plain text. Covers output formats, heading and code-block styles, lists, escaping, wrapping, and HTML preprocessing.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- Goldziher/html-to-markdownedited, first seen Oct 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- Goldziher/html-to-markdown★ 88899% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- apiSkill
- cliSkill
- mcpSkill
- apiSkill
- cliSkill
- mcpSkill
- apiSkill
- cliSkill
- mcpSkill
- html-to-markdown-extracting-metadataSkill
- html-to-markdown-extracting-tablesSkill
- html-to-markdown-fetching-and-converting-urlsSkill
- html-to-markdownSkill
- html-to-markdown-using-the-mcp-serverSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use this when the user wants to turn HTML into clean Markdown (or Djot) — a saved page, an HTML email body, a fragment, or a string.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
AI-RULEZ :: GENERATED FILE — DO NOT EDIT
Content-Hash: blake3:f7de17dbd5516b1e6b26173c3ee40ecea4262a6f5ef168a768eced5bdc7e6126
Source-Hash: blake3:993543f9225ea202d6e97003900394a417d430ff4e7e1a9412b8f7a844713c9f
Schema-Version: v1
-->Converting HTML
Use this when the user wants to turn HTML into clean Markdown (or Djot) — a
saved page, an HTML email body, a fragment, or a string. Conversion is driven by
flags with a positional FILE (stdin is the default input when no file is
given); the only subcommand is mcp (run-as-server, see the
html-to-markdown-using-the-mcp-server skill).
Basic conversion
# File to stdout
html-to-markdown input.html
# File to a file
html-to-markdown input.html -o output.md
# From stdin
cat page.html | html-to-markdown
echo '<h1>Title</h1><p>Body</p>' | html-to-markdownThe default (no --json) prints plain Markdown text. Use --json only when you
need structured metadata/tables (see the html-to-markdown-extracting-metadata and
html-to-markdown-extracting-tables skills).
Output format
html-to-markdown input.html --output-format markdown # default
html-to-markdown input.html --output-format djot # Djot markup
html-to-markdown input.html -f djot # short formTo get plain text (no Markdown syntax), strip tags and treat blocks inline:
html-to-markdown input.html --convert-as-inline --strip-tags "script,style"Heading and code-block styles
| Flag | Values | Default | Effect |
--heading-style | atx, underlined, atx-closed | atx | # h1 vs h1\n=== vs # h1 # |
--code-block-style | backticks, indented, tildes | backticks | Fence style for code blocks |
--code-language / -l | string | "" | Default language for fenced blocks |
html-to-markdown input.html --heading-style underlined --code-block-style tildesLists and text formatting
# Bullet characters cycle by nesting depth; indent width 1–8
html-to-markdown input.html --bullets '*+-' --list-indent-width 2
# Indent with tabs instead of spaces
html-to-markdown input.html --list-indent-type tabs
# Emphasis symbol and escaping
html-to-markdown input.html --strong-em-symbol _ --escape-miscEscaping flags (--escape-asterisks, --escape-underscores, --escape-misc,
--escape-ascii) trade readability for strict CommonMark safety. Use
--escape-ascii only when the output must round-trip through a strict parser.
Wrapping
html-to-markdown input.html --wrap --wrap-width 100 # off by default; 80 if --wrap with no widthPreprocessing (clean noisy pages)
Strip navigation, ads, and forms before converting — essential for scraped web pages:
html-to-markdown input.html --preprocess # standard preset
html-to-markdown input.html --preprocess --preset aggressive # strip more
html-to-markdown input.html --preprocess --keep-navigation # keep <nav>
html-to-markdown input.html --preprocess --keep-forms # keep <form>Presets: minimal, standard (default), aggressive. --preset,
--keep-navigation, and --keep-forms all require --preprocess.
Programmatic equivalents
from html_to_markdown import convert, ConversionOptions, PreprocessingOptions
html = "<h1>Title</h1><p>Body text.</p>"
result = convert(
html,
ConversionOptions(
heading_style="atx",
code_block_style="backticks",
wrap=True,
wrap_width=100,
preprocessing=PreprocessingOptions(enabled=True, preset="aggressive"),
),
)
print(result.content)use html_to_markdown_rs::{convert, ConversionOptions, HeadingStyle};
let options = ConversionOptions::builder().heading_style(HeadingStyle::Atx).wrap(true).build();
let result = convert(html, Some(options))?;See references/cli-reference.md for the full flag set and
references/configuration.md for every option default.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

