Skip to content
Agentmart
Submit a tool

baoyu-url-to-markdown

Fetch any URL and convert to markdown using baoyu-fetch CLI (Chrome CDP with site-specific adapters).

Skill by JimLiu

IndexedMIT★ 26,925
Write a review

Chalk Labs

Need help deploying baoyu-url-to-markdown?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/jimliu-baoyu-url-to-markdown

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

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.

Use cases: documents, web-scraping, document-processing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/baoyu-url-to-markdown

What's inside

Skill name
baoyu-url-to-markdown
Description
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.
License
MIT
Instructions
161 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Instructions read files in your home folder (~/.ssh, ~/.aws…)

Files (48)

  • SKILL.md
  • adapters.md · references/
  • first-time-setup.md · references/config/
  • quality-gate.md · references/
  • baoyu-fetch · scripts/
  • bun.lock · scripts/
  • index.ts · scripts/lib/adapters/generic/
  • index.ts · scripts/lib/adapters/hn/
  • index.ts · scripts/lib/adapters/
  • types.ts · scripts/lib/adapters/
  • article.ts · scripts/lib/adapters/x/
  • index.ts · scripts/lib/adapters/x/
  • login.ts · scripts/lib/adapters/x/
  • match.ts · scripts/lib/adapters/x/
  • payloads.ts · scripts/lib/adapters/x/
  • session.ts · scripts/lib/adapters/x/
  • shared.ts · scripts/lib/adapters/x/
  • single.ts · scripts/lib/adapters/x/
  • thread-loader.ts · scripts/lib/adapters/x/
  • thread.ts · scripts/lib/adapters/x/
  • types.ts · scripts/lib/adapters/x/
  • index.ts · scripts/lib/adapters/youtube/
  • transcript.ts · scripts/lib/adapters/youtube/
  • utils.ts · scripts/lib/adapters/youtube/
  • cdp-client.ts · scripts/lib/browser/
  • chrome-launcher.ts · scripts/lib/browser/
  • cookie-sidecar.ts · scripts/lib/browser/
  • interaction-gates.ts · scripts/lib/browser/
  • network-journal.ts · scripts/lib/browser/
  • page-snapshot.ts · scripts/lib/browser/
  • profile.ts · scripts/lib/browser/
  • session.ts · scripts/lib/browser/
  • cli.ts · scripts/lib/
  • convert.ts · scripts/lib/commands/
  • document.ts · scripts/lib/extract/
  • html-cleaner.ts · scripts/lib/extract/
  • html-extractor.ts · scripts/lib/extract/
  • html-to-markdown.ts · scripts/lib/extract/
  • markdown-renderer.ts · scripts/lib/extract/
  • default-downloader.ts · scripts/lib/media/
  • markdown-media.ts · scripts/lib/media/
  • media-utils.ts · scripts/lib/media/
  • types.ts · scripts/lib/media/
  • defuddle-node.d.ts · scripts/lib/types/
  • shims.d.ts · scripts/lib/types/
  • logger.ts · scripts/lib/utils/
  • url.ts · scripts/lib/utils/
  • package.json · scripts/

SKILL.md (first lines)

# URL to Markdown

## User Input Tools

When this skill prompts the user, follow this tool-selection rule (priority order):

1. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent.
2. **Fallback**: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.
3. **Batching**: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.

Concrete `AskUserQuestion` references below are examples — substitute the local equivalent in other runtimes.

## CLI Setup

The CLI source is vendored in `{baseDir}/scripts/lib`; `scripts/package.json` installs only third-party runtime dependencies.

1. `{baseDir}` = this SKILL.md's directory
2. `${BUN}` = `bun` if installed; otherwise suggest installing Bun
3. If `{baseDir}/scripts/node_modules` is missing: `${BUN} install --cwd {baseDir}/scripts`
4. `${READER}` = `{baseDir}/scripts/baoyu-fetch` (substitute everywhere below)

## Preferences (EXTEND.md)

First one found wins:

| Priority | Path | Scope |
|----------|------|-------|
| 1 | `.baoyu-skills/baoyu-url-to-markdown/EXTEND.md` | Project |
| 2 | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-url-to-markdown/EXTEND.md` | XDG |
| 3 | `$HOME/.baoyu-skills/baoyu-url-to-markdown/EXTEND.md` | User home |

Found → read and apply. Not found → **BLOCKING** first-time setup: ask the questions in [references/config/first-time-setup.md](references/config/first-time-setup.md) (Media, Output, Save — all in one call) before any conversion, write EXTEND.md, confirm "Preferences saved to [path]", then continue. Never create EXTEND.md with silent defaults.

| Key | Default | Values | CLI mapping |
|-----|---------|--------|-------------|
| `download_media` | `ask` | `ask` (prompt each time) / `1` (always) / `0` (never) | `1` → `--download-media` (requires `--output`) |
| `default_output_dir` | empty (= `./url-to-markdown/`) | path or empty | Agent builds `--output <dir>/{domain}/{slug}.md`; not a direct flag |

Value priority: CLI arguments → EXTEND.md → skill defaults.

## Usage

```bash
${READER} <url>                                          # headless, markdown to stdout
${READER} <url> --output article.md --download-media     # save with local media
${READER} <url> --wait-for interaction --output a.md     # login/CAPTCHA: auto-detect and continue
${READER} <url> --wait-for force --output a.md           # manual: Enter to continue
${READER} <url> --format json --output a.json
${READER} <url> --adapter youtube --output transcript.md
```

## Options

| Option | Description |
|--------|-------------|
| `<url>` | URL to fetch |
| `--output <path>` | Output file path (default: stdout) |
| `--format <type>` | `markdown` (default) or `json` |
| `--json` | Shorthand for `--format json` |
| `--adapter <name>` | Force adapter: `x`, `youtube`, `hn`, or `generic` (default: auto-detect) |
| `--headless` | Force headless Chrome |
| `--wait-for <mode>` | `none` (default), `interaction`, or `force` |
| `--wait-for-interaction` | Alias for `--wait-for interaction` |
| `--wait-for-login` | Alias for `--wait-for interaction` |
| `--timeout <ms>` | Page load timeout (default: 30000) |
| `--interaction-timeout <ms>` | Login/CAPTCHA wait timeout (default: 600000 = 10 min) |
| `--interaction-poll-interval <ms>` | Interaction poll interval (default: 1500) |
| `--download-media` | Download images/videos to local `imgs/` and `videos/`, rewrite links. Requires `--output` |
| `--media-dir <dir>` | Base directory for downloaded media (default: `--output` directory) |
| `--cdp-url <url>` | Reuse existing Chrome DevTools Protocol endpoint |
| `--browser-path <path>` | Custom Chrome/Chromium binary path |
| `--chrome-profile-dir <path>` | Chrome user data directory (default: `BAOYU_CHROME_PROFILE_DIR` env or `./baoyu-skills/chrome-profile`) |
| `--debug-dir <dir>` | Write debug artifacts (document.json, markdown.md, page.html, network.json) |

## Quality Gate

Headless capture is provisional: some sites silently return low-quality content with exit code `0`. Inspect the saved markdown after every headless run, using [references/quality-gate.md](references/quality-gate.md) for the checklist, recovery steps, and capture modes.

## Output Path

`baoyu-fetch` does not generate paths; the agent builds one and passes it to `--output`:

1. Base dir: EXTEND.md `default_output_dir` or `./url-to-markdown/`
2. Domain from URL (e.g., `example.com`)
3. Slug from URL path or page title (kebab-case, 2-6 words)
4. Path: `{base_dir}/{domain}/{slug}/{slug}.md` — one directory per URL so media stays isolated
5. On conflict: `{slug}-YYYYMMDD-HHMMSS/{slug}-YYYYMMDD-HHMMSS.md`

Downloaded media goes into subdirectories next to the markdown file.

## Adapters & Media

[references/adapters.md](references/adapters.md): adapter catalog (X, YouTube, Hacker News, generic), media download flow (`ask` / always / never), JSON output schema. Read it for adapter-specific questions or media prompts.

## Environment Variables

| Variable | Description |
|----------|-------------|
| `BAOYU_CHROME_PROFILE_DIR` | Chrome user data directory (or `--chrome-profile-dir`) |

**Troubleshooting**: Chrome not found → `--browser-path`. Timeout → raise `--timeout`. Login/CAPTCHA → `--wait-for interaction`. Debug → `--debug-dir` to inspect captured HTML and network logs.

## Extension Support

Custom configurations via EXTEND.md — see **Preferences** above.

From JimLiu/baoyu-skills, MIT.

More from JimLiu/baoyu-skills

Compare and alternatives

Featured in

Signals

Stars
26,925
Forks
2,950
Open issues
13
Last commit (this folder)
Sep 9, 2026 (1 month ago)
Last release
Jun 18, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

More from JimLiu

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get baoyu-url-to-markdown running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying baoyu-url-to-markdown?

CallGet help
Cite this page

baoyu-url-to-markdown skill. Agent Mart. https://agentmart.dev/skills/jimliu-baoyu-url-to-markdown (last updated 2026-10-24)