# Baoyu Url To Markdown

技术写作员与内容创作者在沉淀网页资料时，当需要抓取包含JS动态渲染或需登录的复杂页面，使用此技能一键将其转换为干净的Markdown格式，自动提取正文与元数据，轻松构建本地知识...

- Repository: https://github.com/anbeime/skill (9005 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add anbeime/skill --skill baoyu-url-to-markdown -g -a claude-code -y`
Codex: `npx skills add anbeime/skill --skill baoyu-url-to-markdown -g -a codex -y`
Cursor: `npx skills add anbeime/skill --skill baoyu-url-to-markdown -g -a cursor -y`
Gemini CLI: `npx skills add anbeime/skill --skill baoyu-url-to-markdown -g -a gemini-cli -y`

## Description

技术写作员与内容创作者在沉淀网页资料时，当需要抓取包含JS动态渲染或需登录的复杂页面，使用此技能一键将其转换为干净的Markdown格式，自动提取正文与元数据，轻松构建本地知识库，让网页内容归档效率翻倍！

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# URL to Markdown

Fetches any URL via Chrome CDP and converts HTML to clean markdown.

## Script Directory

**Important**: All scripts are located in the `scripts/` subdirectory of this skill.

**Agent Execution Instructions**:
1. Determine this SKILL.md file's directory path as `SKILL_DIR`
2. Script path = `${SKILL_DIR}/scripts/<script-name>.ts`
3. Replace all `${SKILL_DIR}` in this document with the actual path

**Script Reference**:
| Script | Purpose |
|--------|---------|
| `scripts/main.ts` | CLI entry point for URL fetching |

## Preferences (EXTEND.md)

Use Bash to check EXTEND.md existence (priority order):

```bash
# Check project-level first
test -f .baoyu-skills/baoyu-url-to-markdown/EXTEND.md && echo "project"

# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.baoyu-skills/baoyu-url-to-markdown/EXTEND.md" && echo "user"
```

┌────────────────────────────────────────────────────────┬───────────────────┐
│                          Path                          │     Location      │
├────────────────────────────────────────────────────────┼───────────────────┤
│ .baoyu-skills/baoyu-url-to-markdown/EXTEND.md          │ Project directory │
├────────────────────────────────────────────────────────┼───────────────────┤
│ $HOME/.baoyu-skills/baoyu-url-to-markdown/EXTEND.md    │ User home         │
└────────────────────────────────────────────────────────┴───────────────────┘

The rest: https://github.com/anbeime/skill/blob/HEAD/skills/content-creation-publisher/baoyu-url-to-markdown/SKILL.md
