Loading...
Loading...
Fetches web content with intelligent content extraction, converting HTML to clean markdown. Use for documentation, articles, and reference pages http/https URLs.
npx skill4agent add 0xbigboss/claude-code web-fetchcurl | html2markdown# Anthropic docs
curl -s "<url>" | html2markdown --include-selector "#content-container"
# MDN Web Docs
curl -s "<url>" | html2markdown --include-selector "article"
# GitHub docs
curl -s "<url>" | html2markdown --include-selector "article" --exclude-selector "nav,.sidebar"
# Generic article pages
curl -s "<url>" | html2markdown --include-selector "article,main,[role=main]" --exclude-selector "nav,header,footer"| Site | Include Selector | Exclude Selector |
|---|---|---|
| platform.claude.com | | - |
| docs.anthropic.com | | - |
| developer.mozilla.org | | - |
| github.com (docs) | | |
| Generic | | |
bun ~/.claude/skills/web-fetch/fetch.ts "<url>"cd ~/.claude/skills/web-fetch && bun install# Check what content containers exist
curl -s "<url>" | grep -o '<article[^>]*>\|<main[^>]*>\|id="[^"]*content[^"]*"' | head -10
# Test a selector
curl -s "<url>" | html2markdown --include-selector "<selector>" | head -30
# Check line count
curl -s "<url>" | html2markdown --include-selector "<selector>" | wc -l--include-selector "CSS" # Only include matching elements
--exclude-selector "CSS" # Remove matching elements
--domain "https://..." # Convert relative links to absolute| Method | Anthropic Docs | Code Blocks | Complexity |
|---|---|---|---|
| Full page | 602 lines | Yes | Noisy |
| 385 lines | Yes | Clean |
| Bun script (universal) | 383 lines | Yes | Clean |
curl -s "<url>" | grep -o '<article[^>]*>'mainbody