baoyu-url-to-markdown
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:
- Determine this SKILL.md file's directory path as
SKILL_DIR - Script path =
${SKILL_DIR}/scripts/<script-name>.ts - 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):
# 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 │ └────────────────────────────────────────────────────────┴───────────────────┘
┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ Result │ Action │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Found │ Read, parse, apply settings │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Not found │ Use defaults │ └───────────┴───────────────────────────────────────────────────────────────────────────┘
EXTEND.md Supports: Default output directory | Default capture mode | Timeout settings
Features
- Chrome CDP for full JavaScript rendering
- Two capture modes: auto or wait-for-user
- Clean markdown output with metadata
- Handles login-required pages via wait mode
Usage
# Auto mode (default) - capture when page loads
npx -y bun ${SKILL_DIR}/scripts/main.ts <url>
# Wait mode - wait for user signal before capture
npx -y bun ${SKILL_DIR}/scripts/main.ts <url> --wait
# Save to specific file
npx -y bun ${SKILL_DIR}/scripts/main.ts <url> -o output.md
Options
| Option | Description |
|---|---|
<url> |
URL to fetch |
-o <path> |
Output file path (default: auto-generated) |
--wait |
Wait for user signal before capturing |
--timeout <ms> |
Page load timeout (default: 30000) |
Capture Modes
| Mode | Behavior | Use When |
|---|---|---|
| Auto (default) | Capture on network idle | Public pages, static content |
Wait (--wait) |
User signals when ready | Login-required, lazy loading, paywalls |
Wait mode workflow:
- Run with
--wait→ script outputs "Press Enter when ready" - Ask user to confirm page is ready
- Send newline to stdin to trigger capture
Output Format
YAML front matter with url, title, description, author, published, captured_at fields, followed by converted markdown content.
Output Directory
url-to-markdown/<domain>/<slug>.md
<slug>: From page title or URL path (kebab-case, 2-6 words)- Conflict resolution: Append timestamp
<slug>-YYYYMMDD-HHMMSS.md
Environment Variables
| Variable | Description |
|---|---|
URL_CHROME_PATH |
Custom Chrome executable path |
URL_DATA_DIR |
Custom data directory |
URL_CHROME_PROFILE_DIR |
Custom Chrome profile directory |
Troubleshooting: Chrome not found → set URL_CHROME_PATH. Timeout → increase --timeout. Complex pages → try --wait mode.
Extension Support
Custom configurations via EXTEND.md. See Preferences section for paths and supported options.
More from azure12355/weilan-skills
browser-agent
AI 驱动的浏览器自动化工具集,包含 agent-browser(无障碍树提取)、actionbook(50+ 网站自动化食谱)、browser-use(Python 自动化库)。使用场景:(1) 抓取需要 JS 渲染的网页内容 (2) 从 X/Twitter、GitHub、Reddit 等平台获取数据 (3) 截图网页 (4) 自动化浏览器操作 (5) 获取网页的无障碍树结构。当用户需要访问动态网页、绕过反爬虫、或执行浏览器自动化时使用此技能。
25drawio-diagrams
专业的 DrawIO 图表生成工具,使用 Material Design 配色和圆角矩形风格。支持 (1) 算法/数据结构图 - DP 状态转移、递归树、排序过程、双指针/滑动窗口 (2) 架构图 - 系统架构、微服务、网络拓扑、组件依赖 (3) 流程图/时序图 - 业务流程、决策流程、审批流程 (4) UML/ER 图 - 类图、实体关系、用例图。当用户提到 "drawio"、"draw.io"、需要绘制流程图、架构图、UML 图、ER 图、DP 状态图、算法可视化时使用此技能。
6github-researcher
GitHub 开源项目深度调研工具。在 GitHub 上搜索、分析特定领域的开源项目,汇总生成结构化调研报告。触发场景:用户要求"调研 GitHub 上的 XXX 工具"、"搜索 XXX 开源项目"、"汇总 GitHub 仓库"、"找 XXX 的开源替代方案"、"对比 GitHub 上的 XXX 项目"、或需要批量分析开源项目并输出报告时使用此 skill。
5diagram-prompter
分析代码库结构并生成各种架构图、流程图、时序图等的 AI 绘图提示词。使用场景:当用户需要为任何代码项目生成可视化图表时,包括系统架构图、模块依赖关系、数据流图、时序图、状态机图、部署架构图等。支持多种图表类型如 Mermaid、PlantUML、C4 模型、UML 类图、ER 图等。适用于技术文档编写、架构设计、代码评审、学习理解新项目等场景。
4yt-dlp-downloader
下载视频和音频的通用工具。支持 YouTube、Bilibili、Twitter/X、抖音、快手等数千个网站。当用户提供视频链接时自动下载到 ~/Downloads 文件夹。
4technical-writer
|
4