html-to-markdown-fetching-and-converting-urls
Skill881 starsChanged 4 months agoMITView on GitHub
Use when fetching a live URL and converting it to Markdown. Covers --url, custom user agents, preprocessing for noisy pages, and the --json ConversionResult shape.
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-converting-htmlSkill
- html-to-markdown-extracting-metadataSkill
- html-to-markdown-extracting-tablesSkill
- html-to-markdownSkill
- html-to-markdown-using-the-mcp-serverSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Use this when the user gives a URL instead of HTML and wants the page as Markdown (or its metadata/tables).
- Very specific: line 54
Add --json to get the full structured result instead of plain Markdown:
≈ “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:f46c6d2411f814c68ba4f0cb91b2efe2104f01ae7129dd2b84e0fa6ef94169e2
Source-Hash: blake3:993543f9225ea202d6e97003900394a417d430ff4e7e1a9412b8f7a844713c9f
Schema-Version: v1
-->Fetching and converting URLs
Use this when the user gives a URL instead of HTML and wants the page as
Markdown (or its metadata/tables). The CLI fetches the page over HTTP and
converts it in one step via --url. --url conflicts with a positional FILE.
For crawling many pages or following links, use crawlberg instead — this
skill is for a single URL.
Fetch and convert
# Fetch a URL, print Markdown to stdout
html-to-markdown --url https://example.com
# Save to a file
html-to-markdown --url https://example.com -o page.md
# Custom User-Agent (default mimics a real browser)
html-to-markdown --url https://example.com --user-agent "MyBot/1.0"--user-agent requires --url.
Clean noisy pages
Real web pages carry navigation, ads, cookie banners, and forms. Preprocess before converting:
html-to-markdown --url https://example.com/article --preprocess --preset aggressive
# Keep the nav or forms if the page content lives there
html-to-markdown --url https://example.com --preprocess --keep-navigationPresets: minimal, standard (default), aggressive. --preset and the
--keep-* flags require --preprocess.
JSON output (ConversionResult)
Add --json to get the full structured result instead of plain Markdown:
html-to-markdown --url https://example.com --json{
"content": "# Title\n\nContent\n",
"metadata": {
"document": { "title": "...", "language": "en" },
"headers": [],
"links": [],
"images": [],
"structured_data": []
},
"tables": [],
"images": [],
"warnings": []
}Useful combinations (all require --json):
# Page title + outline, no Markdown body
html-to-markdown --url https://example.com --json --no-content \
| jq '{title: .metadata.document.title, headings: [.metadata.headers[].text]}'
# Include the document-structure tree
html-to-markdown --url https://example.com --json --include-structure | jq '.document'
# Extract inline image data
html-to-markdown --url https://example.com --json --extract-inline-images | jq '.images | length'Surface warnings
html-to-markdown --url https://example.com --show-warnings > page.md
# non-fatal warnings (truncation, malformed markup) go to stderrExit codes
| Code | Meaning |
| 0 | Success |
| 1 | Conversion or I/O error (including a failed fetch) |
| 2 | Invalid arguments |
See references/cli-reference.md for the full flag set and
JSON shape.
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.

