Agent Skills
› NeverSight/learn-skills.dev
› convert-url-html-to-md
convert-url-html-to-md
GitHub将网页HTML转换为Markdown格式,用于文档提取。支持两种模式:clean=false获取含导航的完整页面以发现链接,clean=true仅提取正文内容。适用于从网站抓取结构化数据、构建知识库及学习库文档。
Trigger Scenarios
需要从网页提取文档内容
需要发现网站内的其他链接
将HTML网页转为Markdown
Install
npx skills add NeverSight/learn-skills.dev --skill convert-url-html-to-md -g -y
SKILL.md
Frontmatter
{
"name": "convert-url-html-to-md",
"description": "Convert HTML web pages to Markdown for documentation extraction. Use when fetching documentation from websites, extracting structured content, getting clean main content (clean=true), or getting full page with nav\/sidebar to discover URLs (clean=false). Ideal for learning libraries and building context from web sources."
}
Convert URL HTML to Markdown
Extract web content as markdown using a two-phase approach for comprehensive documentation gathering.
Two-Phase Workflow
For optimal documentation extraction:
- Discovery (clean=false): Get full page including navigation and sidebars to discover all documentation URLs
- Extraction (clean=true): Extract main content from discovered URLs
Usage
# From the skill directory
cd ~/.claude/skills/convert-url-html-to-md
# Clean mode - main content only (recommended for docs)
node scripts/convert_url.js <url> --clean=true
# Full page mode - includes nav/sidebar (for discovering URLs)
node scripts/convert_url.js <url> --clean=false
# Default is clean=true
node scripts/convert_url.js <url>
Examples
# Get all navigation links from a docs site
node scripts/convert_url.js https://ui.shadcn.com/docs --clean=false
# Extract specific documentation content
node scripts/convert_url.js https://ui.shadcn.com/docs/components/radix/aspect-ratio --clean=true
Installation
Dependencies are included. Run once:
cd ~/.claude/skills/convert-url-html-to-md
npm install
Output
The script outputs markdown directly to stdout. Redirect to file if needed:
node scripts/convert_url.js <url> --clean=true > output.md
Credits
This skill is based on urltomarkdown by Lee Hanken, licensed under MIT. Modified and adapted as a Claude skill by 1naichii.
Version History
- e0220ca Current 2026-07-05 20:46


