jimliu/baoyu-skills

baoyu-url-to-markdown

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

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-url-to-markdown

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

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:

PriorityPathScope
1.baoyu-skills/baoyu-url-to-markdown/EXTEND.mdProject
2${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-url-to-markdown/EXTEND.mdXDG
3$HOME/.baoyu-skills/baoyu-url-to-markdown/EXTEND.mdUser home

Found → read and apply. Not found → BLOCKING first-time setup: ask the questions in 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.

KeyDefaultValuesCLI mapping
download_mediaaskask (prompt each time) / 1 (always) / 0 (never)1 → --download-media (requires --output)
default_output_dirempty (= ./url-to-markdown/)path or emptyAgent 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

OptionDescription
<url>URL to fetch
--output <path>Output file path (default: stdout)
--format <type>markdown (default) or json
--jsonShorthand for --format json
--adapter <name>Force adapter: x, youtube, hn, or generic (default: auto-detect)
--headlessForce headless Chrome
--wait-for <mode>none (default), interaction, or force
--wait-for-interactionAlias for --wait-for interaction
--wait-for-loginAlias 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-mediaDownload 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 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: 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

VariableDescription
BAOYU_CHROME_PROFILE_DIRChrome 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.

같은 저장소의 Skills

더 많은 Skills

모든 Skills
jimliu
커뮤니티

baoyu-infographic

Generate professional infographics with 21 layout types and 22 visual styles. Analyzes content, recommends layout×style combinations, and generates publication-ready infographics. Use when user asks to create "infographic", "信息图", "visual summary", "可视化", or "高密度信息大图".

1시간 설치 수
1
GitHub Stars
2.8만
업데이트
11월 20일
jimliu
커뮤니티

baoyu-image-gen

AI image generation with OpenAI GPT Image 2.5, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate and Agnes APIs. Supports text-to-image, reference images, aspect ratios, and batch generation from saved prompt files. Sequential by default; use batch parallel generation when the user already has multiple prompts or wants stable multi-image throughput. Use when user asks to generate, create, or draw images.

1시간 설치 수
2
GitHub Stars
2.8만
업데이트
11월 6일
jimliu
커뮤니티

baoyu-translate

This skill should be used when the user asks to "translate", "翻译", "精翻", "translate article", "translate to Chinese", "translate to English", "改成中文", "改成英文", "convert to Chinese", "localize", "本地化", "refined translation", "精细翻译", "proofread translation", "快速翻译", "快翻", "这篇文章翻译一下", or provides a URL/file with translation intent. Supports three modes (quick/normal/refined) with custom glossary support.

1시간 설치 수
2
GitHub Stars
2.8만
업데이트
11월 6일
jimliu
커뮤니티

baoyu-post-to-wechat

Posts content to WeChat Official Account (微信公众号) via API or Chrome CDP. Supports article posting (文章) with HTML, markdown, or plain text input, and image-text posting (贴图, formerly 图文) with multiple images. Markdown article workflows default to converting ordinary external links into bottom citations for WeChat-friendly output. Use when user mentions "发布公众号", "post to wechat", "微信公众号", or "贴图/图文/文章".

1시간 설치 수
1
GitHub Stars
2.8만
업데이트
11월 6일