baoyu-url-to-markdown: a Claude skill that saves any web page as Markdown
Makes Claude open a URL in Chrome and save the page as clean Markdown, with built-in support for X posts, YouTube transcripts and Hacker News threads.
- Installs
- 30.5K
- on skills.sh
- Stars
- 27.2K
- on GitHub
- Files
- 47
- besides SKILL.md
- Updated
- Nov 2026
- last repo commit
baoyu-url-to-markdown fetches a URL with its own baoyu-fetch tool, which drives Chrome, and converts the page to Markdown. It has adapters for X/Twitter, YouTube transcripts and Hacker News threads, and uses Defuddle for any other page. When a page needs a login or CAPTCHA, it opens a visible Chrome window and waits for you.
It starts when you ask to save a web page as Markdown. It needs Bun and Chrome, and on first run it installs its own packages with bun. Before the first conversion Claude must ask you three setup questions (media, output folder and where to keep preferences) and save an EXTEND.md file.
Good for
- Researchers who save articles as Markdown for notes
- People who archive X threads, YouTube transcripts or Hacker News discussions
- Anyone who wants a web page as a file to hand to an AI chat
- Claude Code and Codex users who can run Bun and Chrome locally
Install baoyu-url-to-markdown
Claude Code
- 1
Copy this prompt.
Install the baoyu-url-to-markdown skill in Claude Code. Run this command: npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-url-to-markdown Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
Fetch any URL and convert to markdown using baoyu-fetch CLI (Chrome CDP with site-specific adapters). Built-in adapters for X/Twitter, YouTube transcripts, Hacker News threads, and generic pages via Defuddle. Handles login/CAPTCHA via interaction wait modes. Use when user wants to save a webpage as markdown.
Sections in SKILL.md
- User Input Tools
- CLI Setup
- Preferences (EXTEND.md)
- First-Time Setup ⛔ BLOCKING
- Supported Keys
- Usage
- Options
- Agent Quality Gate
- Output Path Generation
- Adapters & Media
- Environment Variables
- Extension Support
Key facts
- Author
- Jim Liu (宝玉)
- License
- MIT
- Skill version
- 1.61.0
- Installs on skills.sh
- 30,515 as of 2026-11-02
- GitHub stars
- 27,159 as of 2026-11-02 (whole repo)
- Last repo commit
- 2026-11-01
- skills.sh audits
- Gen Agent Trust Hub pass, Socket pass, Snyk warn
What it includes
Asks you questions with the agent's own question tool
When the skill needs an answer from you, it uses a built-in question tool such as AskUserQuestion. If the agent has none, it prints a numbered list and waits for your reply.
User input ruleFinds Bun and installs the script's packages on first run
Claude finds the skill folder, checks that bun is installed (or suggests installing it), and runs bun install on the scripts folder if node_modules is missing.
Runs code ·
CLI setupReads your saved settings from one of three folders
It checks .baoyu-skills/baoyu-url-to-markdown/EXTEND.md in the project, then the XDG config folder, then ~/.baoyu-skills. The first one found wins. Settings are download_media (ask, 1 or 0) and default_output_dir.
Files ·
Preferences (EXTEND.md)Blocks conversion until you answer three questions
If no EXTEND.md exists, Claude must ask about media downloads, the output folder and where to save preferences. It then writes EXTEND.md. It may not create one with silent defaults.
Write ·
First-time setupHeadless Chrome fetch, Markdown printed to the screen
Runs baoyu-fetch with the URL. Chrome runs in the background and the Markdown goes to stdout.
Runs code ·
Default captureWrites the Markdown to a path Claude builds
Adds --output. Claude builds the path itself, by default ./url-to-markdown/{domain}/{slug}/{slug}.md, and adds a timestamp if the file already exists.
Runs code ·
Save to a fileSaves images and videos next to the Markdown file
Adds --download-media, which needs --output. Images go to imgs/ and videos to videos/, and the Markdown links are rewritten to local paths. With the default setting, Claude asks you first.
Runs code ·
Download mediaOpens a visible Chrome window and waits for you
--wait-for interaction detects login, CAPTCHA and Cloudflare gates, waits for you to clear them, then continues. Waits up to 10 minutes by default.
Runs code ·
Wait for login or CAPTCHAOpens Chrome and waits until you press Enter
--wait-for force is for pages that need scrolling, paywall steps or other manual browsing. You press Enter when the page is ready.
Runs code ·
Manual controlReturns structured data instead of Markdown
--format json (or --json) adds fields such as adapter, status, login state, the document, media and the Markdown text.
Runs code ·
JSON outputPicks x, youtube, hn or generic by hand
Adapters are chosen from the URL. --adapter overrides the choice.
Runs code ·
Force an adapterTimeouts, Chrome path, profile folder and debug output
--timeout (30000 ms), --interaction-timeout (600000 ms), --cdp-url to reuse a Chrome, --browser-path, --chrome-profile-dir, --media-dir, --headless and --debug-dir, which writes document.json, markdown.md, page.html and network.json.
Runs code ·
Other optionsTweets, threads and X Articles, with login detection
For x.com and twitter.com. On pages that need a sign-in it returns needs_interaction, and you rerun with --wait-for interaction.
Network ·
X / Twitter adapterTranscript with [MM:SS] stamps and chapter headings
For youtube.com and youtu.be. It needs an exposed caption track. With captions off or restricted playback, you may get only the description.
Network ·
YouTube adapterStory details and nested comment threads
For news.ycombinator.com. It returns title, URL, author, score, comment count and the nested replies, and marks deleted or dead items.
Network ·
Hacker News adapterAny other URL, with Defuddle and a fallback extractor
Uses Defuddle, falls back to Readability, scrolls the page and waits for the network to go idle.
Network ·
Generic adapterClaude checks every headless result before trusting it
Headless Chrome can return login walls or empty shells with exit code 0. Claude checks the title, the body and failure signs, and retries with a wait mode if the page looks wrong.
Quality gateOne variable, plus fixes for common failures
BAOYU_CHROME_PROFILE_DIR sets the Chrome profile folder. Chrome not found: use --browser-path. Timeout: raise --timeout. Login or CAPTCHA: use --wait-for interaction. Debugging: use --debug-dir.
Files ·
Environment and troubleshooting
From the official docs
Permissions
Medium risk
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It saves your X session cookies in its Chrome profile
After a run on an X or Twitter URL, the code copies the auth_token and ct0 cookies into x-session-cookies.json in the profile folder, and restores them on later runs. Keep that folder private and do not sync it. github.com
Some page URLs may go to the defuddle.md service
When local extraction fails or looks incomplete, the code requests https://defuddle.md/ followed by the page URL, so that service sees the URL. Avoid it for private addresses. github.com
It installs packages with bun on first run
SKILL.md has Claude run bun install on the scripts folder. package.json lists 10 third-party packages, including jsdom, defuddle and chrome-launcher. github.com
It launches Chrome and runs a bundled script
baoyu-fetch is a shell wrapper that runs bun on lib/cli.ts. The code starts Chrome with a debugging port on 127.0.0.1 and closes it afterwards. On macOS it can bring a browser window to the front with osascript. If a launch fails and the profile folder has stale Chrome lock files (SingletonLock, SingletonSocket, SingletonCookie, chrome.pid), it deletes them and retries once. github.com
Technical details
| Talks to | The URLs you ask for, and the sites they load. defuddle.md, as a fallback extractor. x.com and twitter.com, YouTube and news.ycombinator.com for the matching adapters |
|---|---|
| Sign-in and keys | The only environment variable SKILL.md lists is BAOYU_CHROME_PROFILE_DIR. Sign-ins happen in the Chrome profile folder. SKILL.md names ./baoyu-skills/chrome-profile as the default, while profile.ts resolves a folder under your OS app-data directory. For X, auth_token and ct0 are also copied to x-session-cookies.json there. |
| Scopes |
|
Questions
What do I get from baoyu-url-to-markdown?
A Markdown file (or printed text) of the page you point at, with title, body and links, plus images and videos if you choose to download them. X posts, YouTube transcripts and Hacker News threads have their own adapters, and any other URL goes through a generic one.
How do I install baoyu-url-to-markdown?
Use the install box at the top of this page. The skill also needs Bun and Chrome on your computer, and it installs its own packages with bun on first run. The repo README advises installing only the skills you need, because the plugin route adds all of the repo's skills.
Does it need an API key or an account?
SKILL.md lists no API key. The only environment variable it names is BAOYU_CHROME_PROFILE_DIR. For pages behind a login or CAPTCHA it opens a visible Chrome window, and you sign in there yourself.
Is baoyu-url-to-markdown safe to run?
It runs a bundled script and a Chrome window on your machine, so read the permissions section first. If you sign in to X in the window it opens, the code also copies the X session cookies into a file in its Chrome profile folder. Use it on URLs you trust and keep that folder private.
Does it work in the Claude app or Codex?
The repo README names Claude Code and Codex. The skill has to run Bun and launch Chrome on your own computer, and the README does not document the Claude app.
Why is the saved page empty or wrong?
Headless Chrome can return a login wall or a blank shell and still exit with code 0. SKILL.md has Claude check the title and body after every run and retry with --wait-for interaction, or --wait-for force for pages that need manual browsing.
Information
updated Nov 2, 2026
- Repository
- jimliu/baoyu-skills
- Folder
skills/baoyu-url-to-markdown
Sources
Docs, issue trackers and discussions this page is built from.
Show all 11Hide
- baoyu-url-to-markdown SKILL.md · github.com
- adapters.md · github.com
- quality-gate.md · github.com
- baoyu-skills README · github.com
- first-time-setup.md · github.com
- baoyu-fetch · github.com
- chrome-launcher.ts · github.com
- cookie-sidecar.ts · github.com
- profile.ts · github.com
- html-to-markdown.ts · github.com
- package.json · github.com