baoyu-url-to-markdown

Fetches URLs via Chrome CDP and converts rendered HTML to markdown files.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/chhpt/skills --skill baoyu-url-to-markdown-chhpt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-url-to-markdown
Source: https://github.com/chhpt/skills/tree/main/skills/baoyu-url-to-markdown
Command: npx skills add https://github.com/chhpt/skills --skill baoyu-url-to-markdown-chhpt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires linkedom, @mozilla/readability, turndown, turndown-plugin-gfm, and includes scripts (resource) components.

What problem does it solve? Saving web pages as clean, readable markdown is difficult when sites require JavaScript rendering, user login, or lazy-loaded content. This Skill uses a real Chrome browser via the Chrome DevTools Protocol to fully render any page and convert it into a structured markdown document with metadata. ## Core Features & Use Cases - Full JavaScript Rendering: Launches Chrome via CDP so dynamic, client-side rendered pages are captured completely, with auto-scrolling to trigger lazy-loaded content. - Two Capture Modes: Auto mode captures on network idle for public pages; wait mode pauses for a user signal, enabling capture of login-required or paywalled pages using your own Chrome profile session. - Smart Content Extraction: Combines Mozilla Readability, JSON-LD, Next.js data, and CSS selector fallbacks to extract the main article content, then converts it to GitHub-flavored markdown with YAML front matter (url, title, author, published date). - Use Case: Save a technical blog post behind a login wall as a markdown file for your personal knowledge base by running the script in wait mode, logging in, and pressing Enter to capture. ## Quick Start Ask the agent to save a webpage as markdown by providing the URL, for example: convert https://example.com/article to markdown using the url-to-markdown skill.

Frequently Asked Questions about baoyu-url-to-markdown

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

FAQPage Schema
How do I convert a webpage to markdown with JavaScript rendering?

Run the main.ts script with bun and pass the URL. It launches Chrome via the DevTools Protocol, waits for network idle, auto-scrolls to load lazy content, then extracts the article with Readability and converts it to markdown using Turndown.

How to save a login-required page as markdown?

Use the --wait flag when running the script. Chrome opens with a persistent profile, you log in manually, then press Enter in the terminal to trigger the capture once the page is ready.

Does this work without Chrome installed?

No, a Chrome, Chromium, or Edge executable is required since rendering uses the Chrome DevTools Protocol. If the browser is not found in standard locations, set the URL_CHROME_PATH environment variable to its path.

Why does page capture time out or produce empty content?

Timeouts happen on slow or complex pages; increase the limit with the --timeout option or switch to --wait mode for manual control. Content extraction falls back through Readability, JSON-LD, selectors, and body text, so very sparse pages may yield minimal output.

Where are the converted markdown files saved?

Files are saved under url-to-markdown/<domain>/<slug>.md relative to the working directory, with a timestamp appended on name conflicts. Override the location with the -o flag or the URL_DATA_DIR environment variable.