Home / Market / web to markdown

web to markdown

Use ONLY when the user explicitly says: 'use the skill web-to-markdown ...' (or 'use a skill web-to-markdown ...'). Converts webpage URLs to clean Markdown by calling the local web2md CLI (Puppeteer + Readability), suitable for JS-rendered pages.

skill★ 347850 dlgithubMITInstall in CosmosUpstream Source

Documentation & Preview

web-to-markdown

Convert web pages to clean Markdown using local browser automation with Puppeteer and Readability.

Purpose

This skill enables Claude Code to convert web pages (including JavaScript-rendered content) into clean, readable Markdown format by leveraging the web2md CLI tool. It's particularly useful for extracting article content, documentation, or any web content that needs to be processed, archived, or analyzed in Markdown format.

When to Use

Use this skill when you need to:

Important: This skill must be explicitly invoked by the user with phrases like:

This is a hard requirement to prevent accidental usage when simpler tools might suffice.

How It Works

The skill uses the web2md CLI tool which:

  1. Launches a real browser (Chrome/Chromium/Brave/Edge) via Puppeteer
  2. Renders the page including all JavaScript and dynamic content
  3. Extracts main content using Mozilla's Readability library
  4. Converts to Markdown using Turndown with cleaned links
  5. Outputs to stdout or saves to file(s) with optional YAML frontmatter

This approach handles modern single-page applications and JavaScript-rendered content that simple HTTP fetchers cannot process.

Key Features

Prerequisites

The web2md CLI tool must be installed. The skill will check for it and provide installation instructions if needed:

# If available via npm
npm install -g web2md

# If installing from source
git clone <repository-url>
cd web2md
npm install
npm run build
npm link

Usage Examples

Basic Conversion

Convert a single URL and save to a file:

use the skill web-to-markdown to convert https://example.com/article to article.md

This will run:

web2md 'https://example.com/article' --out ./article.md

Auto-Named Output

Convert a URL and let the tool name the file based on page title:

use the skill web-to-markdown to convert https://example.com/article and save to ./output/

This creates a directory and auto-names the file:

mkdir -p ./output
web2md 'https://example.com/article' --out ./output/

Print to Console

Convert and display the Markdown (useful for quick inspection):

use the skill web-to-markdown to convert https://example.com/article and print the result

This will run:

web2md 'https://example.com/article' --print

Interactive Mode (Login Walls)

Handle pages requiring login or human verification:

use the skill web-to-markdown to convert https://example.com/protected-article in interactive mode

This will run:

mkdir -p ./tmp/web2md-profile
web2md 'https://example.com/protected-article' --interactive --user-data-dir ./tmp/web2md-profile --out ./output/

The browser window will appear, allowing you to complete login or verification, then press Enter to continue.

Batch Conversion

Convert multiple URLs:

use the skill web-to-markdown to convert these URLs:
- https://example.com/article1
- https://example.com/article2
- https://example.com/article3
Save them to ./articles/

This will create the directory and run separate commands for each URL:

mkdir -p ./articles
web2md 'https://example.com/article1' --out ./articles/
web2md 'https://example.com/article2' --out ./articles/
web2md 'https://example.com/article3' --out ./articles/

Advanced Wait Strategies

For heavy JavaScript applications:

use the skill web-to-markdown to convert https://app.example.com/dashboard
Wait for the main selector to appear

This will run:

web2md 'https://app.example.com/dashboard' --wait-until domcontentloaded --wait-for 'main' --out ./dashboard.md

Advanced Options

The skill supports various options to handle tricky pages:

Output Format

The generated Markdown includes:

Technical Details

Troubleshooting

Chrome not found:

Page content incomplete:

Login required:

Verification/CAPTCHA:

Version

Current version: 0.1.0

Related Tools

For simpler use cases without JavaScript, consider using Claude Code's built-in WebFetch tool instead.