webfetch-skill
Skill2 starsChanged 43 days agoMITView on GitHub
Fetch and analyze web content using a specialised extraction workflow that converts HTML to clean markdown, extracts main article content, handles images and links, and provides AI analysis. Use this when you need cleaner page extraction than a raw fetch, when comparing a small set of URLs, or when the user asks to fetch, extract, analyse, summarise, or compare web pages. Prefer native web_fetch for straightforward cooperative pages; if the target URL is blocked by anti-bot or JS-only rendering, escalate the blocked URL to camofox before considering residential-proxy.
- Installs packages
In this repository41 other files it gives its agents.
- skills/web-asset-generator/CLAUDE.mdCLAUDE.md
- academic-writingSkill
- agent-os-childSkill
- agy-pSkill
- amazon-uk-scraperSkill
- artifact-variationsSkill
- audio-transcription-workflowSkill
- capture-dashboardSkill
- claude-channelsSkill
- claude-pSkill
- code-documenterSkill
- context7-docsSkill
- context7-searchSkill
- deep-researchSkill
- docx-draftSkill
- grill-meSkill
- handoffSkill
- long-horizon-waiting-strategiesSkill
- openapi-schemaSkill
- opencode-pluginSkill
- pi-extensionSkill
- pi-web-ui-internal-api-orchestrationSkill
- pptx-draftSkill
- saas-idea-finderSkill
- scraping-redditSkill
- scraping-twitterSkill
- secret-scanningSkill
- socialmedia-optimizationSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- text-to-speechSkill
- thematic-analysisSkill
- transcribe-audioSkill
- video-deep-understandingSkill
- video-useSkill
- web-asset-generatorSkill
- web-crawlingSkill
- web-create-assetsSkill
- web-data-acquisitionSkill
- youtube-captionSkill
- youtube-searchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 13 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use this as a clean single-page / few-page extraction tier:
- Very specific: line 12
prefer native web_fetch for quick cooperative pages
- Distinctive: line 13
prefer this skill when you want cleaner markdown extraction, comparison across a few URLs, or extraction from article-like pages
- Very specific: line 14
if the page is challenge-blocked or JS-only, recover that URL with camofox before escalating to any paid proxy path
- Distinctive: line 34
Read the extracted markdown content
- Distinctive: line 39
Keep the order narrow and cheap:
- Very specific: line 42
If the target page is blocked by Cloudflare, challenge pages, or blank JS rendering, retry that URL with camofox.
- Very specific: line 43
If camofox also fails and the blocked URL is genuinely important, ask before using residential-proxy.
- Distinctive: line 45
Do not automatically turn a small fetch task into a proxy-backed workflow.
- Distinctive: line 61
Skill triggers: when you ask to fetch web content
- Very specific: line 75
DO NOT USE the
webfetchfunction: - Use the Python script instead - Distinctive: line 80
When asked to fetch web content, follow this EXACT process:
- Distinctive: line 98
Read and understand the markdown content
- Distinctive: line 104
Do NOT include tool execution details unless asked
- Very specific: line 112
If the script fails, run it again with --no-cache flag
- Very specific: line 113
If timeout occurs, add --timeout 30 or --timeout 60
- Distinctive: line 117
When invoking this sub-agent, use a prompt like:
- Distinctive: line 193
When running the script directly, output is in markdown:
- Distinctive: line 210
When using the sub-agent, you get AI analysis instead of raw content.
- Very specific: line 245
Use --no-cache: when you need fresh content
- Distinctive: line 247
Limit URLs: when fetching multiple sites (max 5 enforced)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Web Fetch
Fetch and analyze web content by calling a specialized sub-agent that uses the webfetch script.
Use this as a clean single-page / few-page extraction tier:
- prefer native
web_fetchfor quick cooperative pages - prefer this skill when you want cleaner markdown extraction, comparison across a few URLs, or extraction from article-like pages
- if the page is challenge-blocked or JS-only, recover that URL with
camofoxbefore escalating to any paid proxy path
Quick Start
To fetch and analyze web content, invoke the webfetch sub-agent:
Fetch a single URL:
Fetch and summarize: https://example.com
Fetch multiple URLs (max 5):
Fetch and compare: https://example.com and https://example2.com
Analyze specific content:
What are the main points on: https://example.com/article
Extract specific information:
Extract all email addresses from: https://example.com/contact
The sub-agent will:
- Fetch the URL(s) using the webfetch script
- Read the extracted markdown content
- Provide AI analysis based on your prompt
Escalation contract
Keep the order narrow and cheap:
- Try native
web_fetchor this script workflow first. - If the target page is blocked by Cloudflare, challenge pages, or blank JS rendering, retry that URL with
camofox. - If
camofoxalso fails and the blocked URL is genuinely important, ask before usingresidential-proxy.
Do not automatically turn a small fetch task into a proxy-backed workflow.
Prerequisites
The webfetch script requires these Python packages:
pip install --break-system-packages trafilatura requests beautifulsoup4trafilatura - Main content extraction and HTML→markdown conversion requests - HTTP client for fetching URLs beautifulsoup4 - Link and image extraction
How It Works
- Skill triggers when you ask to fetch web content
- Sub-agent invoked via Task tool
- Script executes webfetch.py to fetch and extract content
- Sub-agent analyzes the markdown output and provides intelligent response
- Results returned with summaries, extractions, or answers
This approach avoids external APIs and local LLMs while providing intelligent analysis.
Sub-Agent Instructions (READ CAREFULLY)
CRITICAL: When you are the sub-agent for this skill, you MUST follow these instructions exactly:
TOOL RESTRICTIONS
- DO NOT USE ANY MCP TOOLS - Specifically: NO zai-web-reader, NO zai-vision tools, NO webfetch, NO webfetch_webReader
- DO NOT USE the
webfetchfunction - Use the Python script instead - ONLY USE THESE TOOLS: Bash tool (to run python3) and Read tool (to read markdown files)
EXACT STEPS TO FOLLOW
When asked to fetch web content, follow this EXACT process:
Step 1: Run the webfetch.py script
python3 ./skills/webfetch-skill/scripts/webfetch.py --url "URL_HERE" --output ./tmp/webfetch-skill/FILENAME.mdFor multiple URLs (max 5), run separately for each URL or use --url multiple times:
python3 ./skills/webfetch-skill/scripts/webfetch.py --url "URL1" --url "URL2" --url "URL3" --output ./tmp/webfetch-skill/output.mdStep 2: Read the generated markdown file(s)
Use the Read tool to read: ./tmp/webfetch-skill/FILENAME.mdStep 3: Analyze the content
- Read and understand the markdown content
- Provide analysis, summary, or extraction based on the user's request
- Answer any questions about the fetched content
Step 4: Return results
- Provide your analysis to the main agent
- Do NOT include tool execution details unless asked
SCRIPT LOCATION
- Full path:
./skills/webfetch-skill/scripts/webfetch.py - This script uses trafilatura for HTML→markdown conversion
- Cache is stored in:
./tmp/webfetch-skill/
ERROR HANDLING
- If the script fails, run it again with --no-cache flag
- If timeout occurs, add --timeout 30 or --timeout 60
- Report errors to the user with the exact error message
TEMPLATE PROMPT FOR MAIN AGENT
When invoking this sub-agent, use a prompt like:
Fetch and analyze content from these URLs using the webfetch script:
- https://example.com/page1
- https://example.com/page2
DO NOT use MCP tools. Use ONLY the python3 script at ./skills/webfetch-skill/scripts/webfetch.py.
Save output to ./tmp/webfetch-skill/ and read the files.Using the Script Directly
You can also run the webfetch script directly without the sub-agent:
# Basic fetch
python3 scripts/webfetch.py --url "https://example.com"
# Multiple URLs
python3 scripts/webfetch.py --url "https://example.com" --url "https://example2.com"
# Disable cache
python3 scripts/webfetch.py --url "https://example.com" --no-cache
# Set timeout
python3 scripts/webfetch.py --url "https://example.com" --timeout 30
# Save to file
python3 scripts/webfetch.py --url "https://example.com" --output content.mdScript Parameters
| Parameter | Required | Default | Description |
--url, -u | Yes | - | URL to fetch (can be specified multiple times, max 5) |
--cache, -c | No | true | Enable/disable 15-minute cache |
--no-cache | No | - | Disable caching (alias for --cache=false) |
--timeout, -t | No | 10 | Request timeout in seconds |
--output, -o | No | - | Save output to file instead of stdout |
Features
Main Content Extraction
Trafilatura automatically identifies the main article body and removes boilerplate (navigation, ads, footers).
Image Handling
Extracts up to 10 images with:
- Alt text (when available)
- Absolute URLs
- Markdown format:

Link Summary
Extracts up to 20 links with:
- Link text
- Absolute URLs
- Markdown format:
[text](url)
Caching
15-minute file-based cache in ./tmp/webfetch-skill/:
- Cache key based on URL hash
- Automatic cache invalidation
- Improves performance for repeated requests
URL Handling
- HTTP→HTTPS: Automatically upgrades HTTP URLs
- Redirects: Follows redirects automatically
- User-Agent: Uses realistic browser headers
Output Format
When running the script directly, output is in markdown:
# https://example.com
_(from cache)_
## Content
Main content extracted from the page...
## Images
- **Image Alt**: https://example.com/image.jpg
## Links
- [Link Text](https://example.com/page)When using the sub-agent, you get AI analysis instead of raw content.
Limitations
Cannot access:
- Authenticated/private URLs (Google Docs, Confluence, Jira, etc.)
- Sites requiring JavaScript rendering
- Sites with CAPTCHAs
- Rate-limited or blocked sites
Potential issues:
- Sites with anti-scraping measures
- Paywalled content
- Dynamic content loaded after page load
- Very large pages (may truncate)
Error Handling
The script handles common errors gracefully:
- 404 Not Found: Returns error message
- 500 Server Error: Returns error message
- Timeout: Returns timeout error
- Connection Error: Returns connection error
- Invalid URL: Returns invalid URL error
Errors are included in markdown output so sub-agent can inform you.
Best Practices
For optimal results:
- Use sub-agent for intelligent analysis instead of reading raw content
- Provide specific prompts rather than generic "fetch" requests
- Enable cache (default) for performance on repeated requests
- Use --no-cache when you need fresh content
- Set longer timeout for slow-loading sites (e.g.,
--timeout 30) - Limit URLs when fetching multiple sites (max 5 enforced)
Example effective prompts:
- "Summarize the key takeaways from: https://example.com/article"
- "Extract all pricing information from: https://example.com/pricing"
- "What are the main sections in: https://example.com/docs"
- "Compare the content of these two pages: [url1] [url2]"
Resources
This skill includes:
scripts/webfetch.py - Main fetch script with content extraction
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

