LaunchKit · 2026
Back to Skills

Convert HTML pages to clean, agent-friendly markdown using Readability + Turndown.

0
0 downloads
by @saikatkumardey

Setup & Installation

openclaw skills install @saikatkumardey/html2md

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install html2md

What This Skill Does

Converts HTML pages to clean markdown using Mozilla Readability for content extraction and Turndown for conversion. Strips navigation, ads, footers, cookie banners, and other noise. Supports URL fetching, local files, stdin, token budgeting, and JSON output.

Readability-based extraction removes nav and ad noise that raw HTML fetchers leave in, so token usage stays low and content arrives clean for LLM consumption.

When to use it

  • Extracting article content from news sites for LLM summarization
  • Converting documentation pages to markdown for offline reference
  • Feeding cleaned web content to sub-agents in research pipelines
  • Token-budgeted page extraction to fit LLM context windows
  • Batch scraping blog posts in cron-based agent workflows

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: Summarize the key points from https://paulgraham.com/greatwork.html, keeping it under 2000 tokens

AGENT
  1. 1Run html2md --max-tokens 2000 https://paulgraham.com/greatwork.html
  2. 2Readability isolates the main article body, discarding nav, footers, and sidebars
  3. 3Turndown converts the cleaned HTML to markdown
  4. 4Post-processing removes remaining noise and truncates at the 2000-token budget
  5. 5Agent receives clean markdown and generates the summary
OUTPUT

Clean markdown of the article body truncated to 2000 tokens, ready for summarization