web-fetch
Skill340 starsChanged 8 months agoMITView on GitHub
Web content fetching via curl and WebFetch when a specific URL is provided. Covers HTTP GET/POST, JSON APIs, HTML, auth, cookies. Triggers on: "fetch this URL", "download HTML", "call this API", "curl this endpoint". NOT for search, use tavily.
- Reads credentials
- Sends data out
12 other projects use a version of this.
Adopted by
Most recently taken up by
- tonyfettes/skillstheir own version, first seen Nov 8, 2026
- runxhq/runxtheir own version, first seen Oct 13, 2026
- superbereza/lobster-powerstheir own version, first seen Oct 11, 2026
- jholhewres/devclaw-skillstheir own version, first seen Oct 9, 2026
- Lingyuzhou111/dow-ipad-859their own version, first seen Oct 8, 2026
- smart-lty/my-skillstheir own version, first seen Aug 9, 2026
Used with
Projects with it also use skill-creator.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillskill-creator
Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.
Also in 4 projects that use this
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- Lingyuzhou111/dow-ipad-859★ 260same name
- runxhq/runx★ 97same name
- archibate/agent-skills★ 16same name
- code-yeongyu/web-fetch★ 4same name
- jholhewres/devclaw-skills★ 4same name
- smart-lty/my-skills★ 4same name
- seven-steven/skills★ 1same name
- Throokie/claude-code-skills★ 1same name
- tonyfettes/skills★ 1same name
- Bobtron/piAgentSkills★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository94 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adr-writerSkill
- agent-builderSkill
- animateSkill
- api-docs-generatorSkill
- appraiseSkill
- architecture-diagramSkill
- architecture-reviewerSkill
- arxiv-figuresSkill
- arxiv-packageSkill
- arxiv-preflightSkill
- benchmark-runnerSkill
- changelog-composerSkill
- chart-claritySkill
- citation-auditSkill
- codebase-advisorSkill
- code-refinerSkill
- competitive-analyzerSkill
- concept-to-imageSkill
- debug-investigatorSkill
- decision-mapSkill
- dependency-auditSkill
- devils-advocateSkill
- domain-modelingSkill
- engineering-retroSkill
- env-validatorSkill
- estimate-calibratorSkill
- feasibility-assessorSkill
- figure-rhetoricSkill
- figure-table-qualitySkill
- filesystemSkill
- githubSkill
- gpu-optimizerSkill
- handoffSkill
- html-presentationSkill
- html-videoSkill
- humanizeSkill
- idea-validatorSkill
- immuneSkill
- intakeSkill
- kg-builderSkill
- launch-videoSkill
- learning-workspaceSkill
- lightpanda-browserSkill
- linkedin-post-styleSkill
- literature-reviewSkill
- manuscript-provenanceSkill
- manuscript-reviewSkill
- manuscript-typographySkill
- market-analyzerSkill
- marp-slidesSkill
- mcp-to-skillSkill
- md-to-pdfSkill
- migration-risk-analyzerSkill
- milestone-runnerSkill
- module-deepeningSkill
- notebooklmSkill
- package-evaluatorSkill
- package-optimizerSkill
- paper-to-skillSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 1 is distinctive, and 6 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
All web content retrieval uses curl (Bash) or the built-in WebFetch tool.
- Very specific: line 26
Default choice: Use WebFetch for general page content.
- Distinctive: line 282
Verify a URL is reachable before complex operations:
- Very specific: line 292
WebFetch: does not support custom headers, POST bodies, or cookies.
- Very specific: line 294
curl: does not render JavaScript.
- Very specific: line 310
Never hardcode credentials: Use $ENV_VAR references. If the variable is not set, surface the error immediately.
- Very specific: line 312
Follow redirects by default: Always use -L with curl unless you specifically need to inspect the redirect chain.
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Web Fetch
All web content retrieval uses curl (Bash) or the built-in WebFetch tool. No MCP
server needed — Claude Code's native tools cover every Fetch MCP operation with more
control.
Quick Reference
| Fetch MCP Tool | Replacement | When to Use |
fetch_html | curl -s URL | Raw HTML needed for parsing |
fetch_json | curl -s URL | jq '.' | API responses, structured data |
fetch_markdown | WebFetch | Readable page content (default output is markdown) |
fetch_txt | curl -s URL or WebFetch | Plain text extraction |
Default choice: Use WebFetch for general page content. Use curl when you need
headers, authentication, POST bodies, or raw format control.
WebFetch (Built-in Tool)
The WebFetch tool fetches a URL and returns clean markdown content. It handles
JavaScript-rendered pages, strips navigation and boilerplate, and returns readable text.
Best for: documentation pages, articles, blog posts, README files — any content where you want readable text rather than raw HTML.
Limitations: no custom headers, no POST bodies, no cookie management. Use curl for
those.
curl Patterns
Fetch HTML
curl -sL "https://example.com/page"| Flag | Purpose |
-s | Silent mode — suppress progress meter |
-L | Follow redirects (3xx) |
-o file.html | Save to file instead of stdout |
-I | Headers only (HEAD request) |
-i | Include response headers in output |
Fetch and extract specific elements with xmllint or python3:
curl -sL "https://example.com" | python3 -c "
from html.parser import HTMLParser
import sys
class TitleParser(HTMLParser):
def __init__(self):
super().__init__()
self.in_title = False
self.title = ''
def handle_starttag(self, tag, attrs):
self.in_title = tag == 'title'
def handle_data(self, data):
if self.in_title:
self.title += data
def handle_endtag(self, tag):
if tag == 'title':
self.in_title = False
p = TitleParser()
p.feed(sys.stdin.read())
print(p.title)
"Fetch JSON
curl -s "https://api.example.com/v1/data" \
-H "Accept: application/json" | jq '.'Filter and reshape JSON responses:
# Extract specific fields
curl -s "https://api.example.com/users" | jq '.[] | {name, email}'
# Filter by condition
curl -s "https://api.example.com/items" | jq '[.[] | select(.status == "active")]'
# Count results
curl -s "https://api.example.com/items" | jq 'length'
# Get nested value
curl -s "https://api.example.com/config" | jq '.database.host'Fetch Plain Text
# Strip HTML tags for plain text
curl -sL "https://example.com/page" | python3 -c "
import html.parser, sys
class Stripper(html.parser.HTMLParser):
def __init__(self):
super().__init__()
self.text = []
def handle_data(self, d):
self.text.append(d)
def get_text(self):
return ''.join(self.text)
s = Stripper()
s.feed(sys.stdin.read())
print(s.get_text())
"Or use WebFetch which returns clean markdown — close enough to plain text for most
purposes.
Authenticated Requests
Bearer Token
curl -s "https://api.example.com/data" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json"API Key in Header
curl -s "https://api.example.com/data" \
-H "X-API-Key: $API_KEY"API Key in Query Parameter
curl -s "https://api.example.com/data?api_key=$API_KEY"Basic Auth
curl -s -u "username:$PASSWORD" "https://api.example.com/data"Store credentials in environment variables. Never hardcode tokens or passwords in commands.
POST, PUT, PATCH, DELETE
POST with JSON Body
curl -s -X POST "https://api.example.com/items" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_TOKEN" \
-d '{
"name": "item-name",
"value": 42
}' | jq '.'POST with Form Data
curl -s -X POST "https://api.example.com/upload" \
-F "file=@./document.pdf" \
-F "description=Uploaded via curl"PUT (Full Update)
curl -s -X PUT "https://api.example.com/items/123" \
-H "Content-Type: application/json" \
-d '{"name": "updated-name", "value": 99}' | jq '.'PATCH (Partial Update)
curl -s -X PATCH "https://api.example.com/items/123" \
-H "Content-Type: application/json" \
-d '{"value": 100}' | jq '.'DELETE
curl -s -X DELETE "https://api.example.com/items/123" \
-H "Authorization: Bearer $API_TOKEN"Advanced Patterns
Pagination
PAGE=1
while true; do
RESPONSE=$(curl -s "https://api.example.com/items?page=$PAGE&per_page=50" \
-H "Authorization: Bearer $API_TOKEN")
COUNT=$(echo "$RESPONSE" | jq 'length')
echo "$RESPONSE" | jq '.[]'
[ "$COUNT" -lt 50 ] && break
PAGE=$((PAGE + 1))
doneTimeout and Retry
curl -s --connect-timeout 10 --max-time 30 \
--retry 3 --retry-delay 2 \
"https://api.example.com/data"Response Headers Inspection
curl -sI "https://example.com" | grep -i "content-type"Save Response with Status Code
HTTP_CODE=$(curl -s -o /tmp/response.json -w "%{http_code}" "https://api.example.com/data")
echo "Status: $HTTP_CODE"
cat /tmp/response.json | jq '.'Cookie Handling
# Save cookies
curl -s -c /tmp/cookies.txt "https://example.com/login" \
-d "user=admin&pass=$PASSWORD"
# Reuse cookies
curl -s -b /tmp/cookies.txt "https://example.com/dashboard"Error Handling
| HTTP Status | Meaning | Resolution |
| 301/302 | Redirect | Add -L flag to follow |
| 401 | Unauthorized | Check token/credentials; verify env var is set |
| 403 | Forbidden | Insufficient permissions or IP restriction |
| 404 | Not Found | Verify URL path; resource may be deleted |
| 429 | Rate Limited | Respect Retry-After header; add delay between requests |
| 500 | Server Error | Retry once; if persistent, report upstream |
| SSL error | Certificate issue | Do not use -k (insecure) — fix the root cause |
| Timeout | Network/server slow | Increase --max-time; check connectivity |
Verify a URL is reachable before complex operations:
curl -sI -o /dev/null -w "%{http_code}" "https://example.com"Limitations
- WebFetch does not support custom headers, POST bodies, or cookies. Use
curlfor authenticated or stateful requests. - curl does not render JavaScript. For JS-heavy SPAs, prefer
WebFetchwhich handles rendered content. - Large responses may exceed context limits. Pipe through
jq,head, orpython3to extract only needed data before loading into context. - Binary content (images, PDFs, archives) should be saved to disk with
-o, not piped to stdout.
Calibration Rules
- Default to WebFetch for reading web pages. It returns clean markdown, handles JS rendering, and requires no flags. Switch to curl only when you need headers, auth, POST, or raw format control.
- Always pipe JSON through jq. Raw JSON in context wastes tokens. Filter to only the fields needed.
- Never hardcode credentials. Use
$ENV_VARreferences. If the variable is not set, surface the error immediately. - Follow redirects by default. Always use
-Lwith curl unless you specifically need to inspect the redirect chain. - Prefer
-s(silent) on every curl call. Progress meters add noise to output.
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.

