Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
freestylefly avatar

Canghe Url To Markdown

  • 481 installs
  • 424 repo stars
  • Updated June 8, 2026
  • freestylefly/canghe-skills

canghe-url-to-markdown is a Claude Code skill that fetches public URLs through Chrome CDP and converts rendered HTML into clean Markdown with YAML metadata for developers who need citation-ready web captures without manu

About

canghe-url-to-markdown is a utility skill in the freestylefly/canghe-skills repository that launches Chrome via the DevTools Protocol, waits for JavaScript rendering, and writes structured Markdown files. The Bun CLI in scripts/main.ts supports auto capture on network idle and a --wait mode for login-gated or lazy-loaded pages, with a default 30000 ms timeout and optional -o output paths. html-to-markdown.ts runs five extraction strategies—Mozilla Readability, __NEXT_DATA__ parsing, JSON-LD, 14 CSS content selectors, and body fallback—then converts HTML with Turndown and GFM plugins. Output lands under url-to-markdown/<domain>/<slug>.md with six front-matter fields (url, title, description, author, published, captured_at). Developers use it to seed docs, archive articles, and feed summarization pipelines from SPAs and paywalled sessions they open manually.

  • Pulls web pages into agent-friendly Markdown format
  • Improves summarization and diffing against source material
  • Useful for competitive scans and reference libraries
  • Reduces noise from ads, nav chrome, and broken paste formatting

Canghe Url To Markdown by the numbers

  • 481 all-time installs (skills.sh)
  • Ranked #414 of 2,719 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Jul 31, 2026 (Skillselion catalog sync)
npx skills add https://github.com/freestylefly/canghe-skills --skill canghe-url-to-markdown

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs481
repo stars424
Last updatedJune 8, 2026
Repositoryfreestylefly/canghe-skills

How do you convert a JavaScript-rendered webpage to Markdown?

Fetch a public URL and normalize it into Markdown for summarization, citation, competitive notes, or docs seeding without manual copy cleanup.

Who is it for?

Developers who need agent-triggered captures of JS-heavy articles, docs, or competitor pages into repo-ready Markdown without brittle copy-paste.

Skip if: Developers who only need static HTML fetched with curl or who require bulk offline crawling without a local Chrome install.

When should I use this skill?

The user asks to save, archive, convert, or summarize a specific public or login-gated webpage as Markdown inside an AI coding agent.

What you get

A domain-organized .md file with six-field YAML front matter and Turndown-converted article body text.

  • Markdown file with YAML front matter
  • Domain-organized url-to-markdown/ archive paths

By the numbers

  • Bundles 5 TypeScript scripts in the scripts/ directory
  • Uses 5 HTML extraction strategies ranked by Readability, Next.js data, JSON-LD, selectors, and body fallback
  • Outputs 6 YAML front-matter metadata fields per captured page

Files

SKILL.mdMarkdownGitHub ↗

URL to Markdown

Fetches any URL via Chrome CDP and converts HTML to clean markdown.

Script Directory

Important: All scripts are located in the scripts/ subdirectory of this skill.

Agent Execution Instructions: 1. Determine this SKILL.md file's directory path as SKILL_DIR 2. Script path = ${SKILL_DIR}/scripts/<script-name>.ts 3. Replace all ${SKILL_DIR} in this document with the actual path

Script Reference:

ScriptPurpose
scripts/main.tsCLI entry point for URL fetching

Preferences (EXTEND.md)

Use Bash to check EXTEND.md existence (priority order):

# Check project-level first
test -f .canghe-skills/canghe-url-to-markdown/EXTEND.md && echo "project"

# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.canghe-skills/canghe-url-to-markdown/EXTEND.md" && echo "user"

┌────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ .canghe-skills/canghe-url-to-markdown/EXTEND.md │ Project directory │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.canghe-skills/canghe-url-to-markdown/EXTEND.md │ User home │ └────────────────────────────────────────────────────────┴───────────────────┘

┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ Result │ Action │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Found │ Read, parse, apply settings │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Not found │ Use defaults │ └───────────┴───────────────────────────────────────────────────────────────────────────┘

EXTEND.md Supports: Default output directory | Default capture mode | Timeout settings

Features

  • Chrome CDP for full JavaScript rendering
  • Two capture modes: auto or wait-for-user
  • Clean markdown output with metadata
  • Handles login-required pages via wait mode

Usage

# Auto mode (default) - capture when page loads
npx -y bun ${SKILL_DIR}/scripts/main.ts <url>

# Wait mode - wait for user signal before capture
npx -y bun ${SKILL_DIR}/scripts/main.ts <url> --wait

# Save to specific file
npx -y bun ${SKILL_DIR}/scripts/main.ts <url> -o output.md

Options

OptionDescription
<url>URL to fetch
-o <path>Output file path (default: auto-generated)
--waitWait for user signal before capturing
--timeout <ms>Page load timeout (default: 30000)

Capture Modes

ModeBehaviorUse When
Auto (default)Capture on network idlePublic pages, static content
Wait (--wait)User signals when readyLogin-required, lazy loading, paywalls

Wait mode workflow: 1. Run with --wait → script outputs "Press Enter when ready" 2. Ask user to confirm page is ready 3. Send newline to stdin to trigger capture

Output Format

YAML front matter with url, title, description, author, published, captured_at fields, followed by converted markdown content.

Output Directory

url-to-markdown/<domain>/<slug>.md
  • <slug>: From page title or URL path (kebab-case, 2-6 words)
  • Conflict resolution: Append timestamp <slug>-YYYYMMDD-HHMMSS.md

Environment Variables

VariableDescription
URL_CHROME_PATHCustom Chrome executable path
URL_DATA_DIRCustom data directory
URL_CHROME_PROFILE_DIRCustom Chrome profile directory

Troubleshooting: Chrome not found → set URL_CHROME_PATH. Timeout → increase --timeout. Complex pages → try --wait mode.

Extension Support

Custom configurations via EXTEND.md. See Preferences section for paths and supported options.

Related skills

How it compares

Choose canghe-url-to-markdown over plain HTTP fetch or HTML-to-text converters when pages depend on JavaScript rendering, lazy loading, or manual login before capture.

FAQ

Does canghe-url-to-markdown handle JavaScript-rendered pages?

canghe-url-to-markdown launches Chrome through CDP, waits for network idle, auto-scrolls lazy content, then extracts HTML with five strategies before Turndown conversion. Static fetch tools miss SPA-rendered article bodies that this pipeline captures.

How does canghe-url-to-markdown capture login-required pages?

canghe-url-to-markdown supports a --wait mode that opens Chrome and pauses until the developer confirms the page is ready, then captures DOM content. Auto mode captures immediately after load for public static pages.

What metadata does canghe-url-to-markdown include in output files?

canghe-url-to-markdown writes YAML front matter with url, title, description, author, published, and captured_at before the Markdown body. Files save under url-to-markdown/<domain>/<slug>.md with optional -o override.

Automation & Workflowsresearchautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.