web-fetch
2
总安装量
2
周安装量
#74810
全站排名
安装命令
npx skills add https://github.com/naohainezha/skill --skill web-fetch
Agent 安装分布
openclaw
2
claude-code
2
replit
2
codex
2
opencode
2
mcpjam
1
Skill 文档
Web Fetch Skill
Fetch web content. Prefer the built-in WebFetch tool â it uses a real browser engine for JavaScript-rendered pages with high success rate. Fall back to curl only if WebFetch is unavailable.
Fetch a Web Page (HTML â Text)
# Get page content, strip HTML tags, first 500 lines
curl -sL "URL" | sed 's/<[^>]*>//g' | sed '/^$/d' | head -500
# Or use lynx for better text extraction (if installed)
lynx -dump -nolist "URL" | head -500
# Or use w3m
w3m -dump "URL" | head -500
Fetch JSON API
curl -s "https://api.example.com/data" | jq '.'
Fetch with Headers
# With custom headers
curl -s -H "Authorization: Bearer TOKEN" -H "Accept: application/json" "URL"
# With user agent
curl -sL -A "Mozilla/5.0" "URL"
Download Files
# Download to specific path
curl -sL -o /tmp/file.pdf "URL"
# Download with original filename
curl -sLOJ "URL"
Check URL Status
# Just get HTTP status code
curl -sL -o /dev/null -w "%{http_code}" "URL"
# Get headers only
curl -sI "URL"
Tips
- Use
-sLfor silent mode + follow redirects - Pipe to
head -Nto limit output and avoid context overflow - For large pages, extract just what you need with
greporsed - Use
jqfor JSON responses - Some sites block curl â add a browser User-Agent with
-A