{"data":{"slug":"github-anbeime-skill-skills-content-creation-publisher-baoyu-url-to-markdown-e0735d58020b","title":"Convert URLs to Clean Markdown with Chrome CDP","summary":"Convert web pages, including login-required and dynamically rendered content, to clean markdown with metadata using Chrome CDP. Output includes YAML front matter with metadata and markdown content saved in a structured directory.","url":"https:\/\/skillshunter.net\/skills\/github-anbeime-skill-skills-content-creation-publisher-baoyu-url-to-markdown-e0735d58020b","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-anbeime-skill-skills-content-creation-publisher-baoyu-url-to-markdown-e0735d58020b","markdown_url":"https:\/\/skillshunter.net\/skills\/github-anbeime-skill-skills-content-creation-publisher-baoyu-url-to-markdown-e0735d58020b.md","download_url":"https:\/\/skillshunter.net\/skills\/github-anbeime-skill-skills-content-creation-publisher-baoyu-url-to-markdown-e0735d58020b\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Ensure Chrome is installed and accessible, or set the `URL_CHROME_PATH` environment variable to a custom Chrome executable path. For login-required or dynamically rendered pages, use the `--wait` flag and press Enter when the page is ready.","instructions":"---\nname: baoyu-url-to-markdown\ndescription: \u6280\u672f\u5199\u4f5c\u5458\u4e0e\u5185\u5bb9\u521b\u4f5c\u8005\u5728\u6c89\u6dc0\u7f51\u9875\u8d44\u6599\u65f6\uff0c\u5f53\u9700\u8981\u6293\u53d6\u5305\u542bJS\u52a8\u6001\u6e32\u67d3\u6216\u9700\u767b\u5f55\u7684\u590d\u6742\u9875\u9762\uff0c\u4f7f\u7528\u6b64\u6280\u80fd\u4e00\u952e\u5c06\u5176\u8f6c\u6362\u4e3a\u5e72\u51c0\u7684Markdown\u683c\u5f0f\uff0c\u81ea\u52a8\u63d0\u53d6\u6b63\u6587\u4e0e\u5143\u6570\u636e\uff0c\u8f7b\u677e\u6784\u5efa\u672c\u5730\u77e5\u8bc6\u5e93\uff0c\u8ba9\u7f51\u9875\u5185\u5bb9\u5f52\u6863\u6548\u7387\u7ffb\u500d\uff01\n---\n\n# URL to Markdown\n\nFetches any URL via Chrome CDP and converts HTML to clean markdown.\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts\/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `SKILL_DIR`\n2. Script path = `${SKILL_DIR}\/scripts\/<script-name>.ts`\n3. Replace all `${SKILL_DIR}` in this document with the actual path\n\n**Script Reference**:\n| Script | Purpose |\n|--------|---------|\n| `scripts\/main.ts` | CLI entry point for URL fetching |\n\n## Preferences (EXTEND.md)\n\nUse Bash to check EXTEND.md existence (priority order):\n\n```bash\n# Check project-level first\ntest -f .baoyu-skills\/baoyu-url-to-markdown\/EXTEND.md && echo \"project\"\n\n# Then user-level (cross-platform: $HOME works on macOS\/Linux\/WSL)\ntest -f \"$HOME\/.baoyu-skills\/baoyu-url-to-markdown\/EXTEND.md\" && echo \"user\"\n```\n\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502                          Path                          \u2502     Location      \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 .baoyu-skills\/baoyu-url-to-markdown\/EXTEND.md          \u2502 Project directory \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 $HOME\/.baoyu-skills\/baoyu-url-to-markdown\/EXTEND.md    \u2502 User home         \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502  Result   \u2502                                  Action                                   \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Found     \u2502 Read, parse, apply settings                                               \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Not found \u2502 Use defaults                                                              \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\n**EXTEND.md Supports**: Default output directory | Default capture mode | Timeout settings\n\n## Features\n\n- Chrome CDP for full JavaScript rendering\n- Two capture modes: auto or wait-for-user\n- Clean markdown output with metadata\n- Handles login-required pages via wait mode\n\n## Usage\n\n```bash\n# Auto mode (default) - capture when page loads\nnpx -y bun ${SKILL_DIR}\/scripts\/main.ts <url>\n\n# Wait mode - wait for user signal before capture\nnpx -y bun ${SKILL_DIR}\/scripts\/main.ts <url> --wait\n\n# Save to specific file\nnpx -y bun ${SKILL_DIR}\/scripts\/main.ts <url> -o output.md\n```\n\n## Options\n\n| Option | Description |\n|--------|-------------|\n| `<url>` | URL to fetch |\n| `-o <path>` | Output file path (default: auto-generated) |\n| `--wait` | Wait for user signal before capturing |\n| `--timeout <ms>` | Page load timeout (default: 30000) |\n\n## Capture Modes\n\n| Mode | Behavior | Use When |\n|------|----------|----------|\n| Auto (default) | Capture on network idle | Public pages, static content |\n| Wait (`--wait`) | User signals when ready | Login-required, lazy loading, paywalls |\n\n**Wait mode workflow**:\n1. Run with `--wait` \u2192 script outputs \"Press Enter when ready\"\n2. Ask user to confirm page is ready\n3. Send newline to stdin to trigger capture\n\n## Output Format\n\nYAML front matter with `url`, `title`, `description`, `author`, `published`, `captured_at` fields, followed by converted markdown content.\n\n## Output Directory\n\n```\nurl-to-markdown\/<domain>\/<slug>.md\n```\n\n- `<slug>`: From page title or URL path (kebab-case, 2-6 words)\n- Conflict resolution: Append timestamp `<slug>-YYYYMMDD-HHMMSS.md`\n\n## Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `URL_CHROME_PATH` | Custom Chrome executable path |\n| `URL_DATA_DIR` | Custom data directory |\n| `URL_CHROME_PROFILE_DIR` | Custom Chrome profile directory |\n\n**Troubleshooting**: Chrome not found \u2192 set `URL_CHROME_PATH`. Timeout \u2192 increase `--timeout`. Complex pages \u2192 try `--wait` mode.\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n","use_cases":["Archiving web content for local knowledge bases","Extracting data from login-protected pages","Creating markdown documentation from web resources"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/anbeime\/skill\/blob\/7d96c7f464535c90bd6efde99821a9d3446bf0cb\/skills\/content-creation-publisher\/baoyu-url-to-markdown\/SKILL.md","source_commit":"7d96c7f464535c90bd6efde99821a9d3446bf0cb","license":null,"version":null,"listing_approved_at":"2026-11-22","created_at":"2026-11-21T16:58:55.000000Z","updated_at":"2026-11-22T11:18:35.000000Z","seo_title":"Convert URLs to Markdown with Metadata","seo_description":"Effortlessly convert web pages to clean markdown with metadata, supporting dynamic content and login-required pages using Chrome CDP.","seo_keywords":["url to markdown","web content archiving","dynamic page scraping","login page extraction","markdown documentation"]}}