web-to-markdown

Fetch web pages and save them as local Markdown files.

2|Updated Dec 19, 2025
One-click install
npx skills add https://github.com/rungchan2/frontend-skills --skill web-to-markdown-rungchan2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-to-markdown
Source: https://github.com/rungchan2/frontend-skills/tree/main/skills/web-to-markdown
Command: npx skills add https://github.com/rungchan2/frontend-skills --skill web-to-markdown-rungchan2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Converts web documentation, blog posts, and reference pages into local Markdown files so developers and writers can archive, reference, and version-control external content without manual copy/paste.

Core Features & Use Cases

  • Tries Cloudflare Markdown-for-Agents via the Accept: text/markdown header for high-quality native markdown when available.
  • Falls back to HTML fetch with heuristic extraction of main/article/body, strips nav/footer/scripts, and converts to Markdown with support for headings, code blocks, tables, links, and images.
  • Emits files into the project's docs/ directory with source and timestamp metadata; ideal for archiving API docs, technical guides, or blog posts for offline review and repository inclusion.

Quick Start

Fetch the page at https://react.dev/reference/react/useState and save it as a Markdown file in the project's docs/ directory.

Frequently Asked Questions about web-to-markdown

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert web pages to Markdown files for local documentation?

To convert web pages to Markdown files, fetch the URL and save the extracted content as an annotated .md file in your project's docs/ directory. It tries Cloudflare's text/markdown header first, falling back to HTML extraction and regex-based conversion.

Can I scrape documentation pages and save them as Markdown without external dependencies?

Yes, you can scrape documentation pages and save them as Markdown using only the Python standard library. The tool fetches HTML, strips nav/footer/scripts, and converts headings, code blocks, tables, links, and images into Markdown format.

Does converting HTML to Markdown require a Cloudflare API key?

Converting HTML to Markdown does not require a Cloudflare API key. An optional CLOUDFLARE_API_KEY enables higher-quality native Markdown retrieval via the Accept: text/markdown header, but the tool falls back to standard HTML extraction without it.

What's the best way to archive API references and blog posts into a repository?

The best way to archive API references and blog posts is to fetch the web pages and write them as Markdown files with source and timestamp metadata into the docs/ directory, enabling offline review and version control without manual copy/paste.

Why does my web-to-markdown conversion include navigation and footer text?

Web-to-markdown conversion might include stray navigation text if the heuristic extraction fails to isolate the main content. The tool attempts to strip nav, footer, and script tags before converting HTML to Markdown, but complex page layouts can affect extraction accuracy.

When should I not use automated HTML to Markdown conversion for archiving content?

You should not use automated HTML to Markdown conversion when a web page relies heavily on dynamic JavaScript rendering, as the standard library fetch only captures static HTML and may miss dynamically loaded content.