/web-fetch
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.
$ npx -y skills add Mathews-Tom/armory --skill web-fetch --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/web-fetch
Context preview
The summary Claude sees to decide when to auto-load this skill.
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.
SKILL.md
web-fetch.SKILL.mdname: web-fetch
description: '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.'
metadata:
version: 1.1.1
category: content
tags: [http, curl, api, web-content]
difficulty: beginner
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://exam
Read more
name: web-fetch description: '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.' metadata: version: 1.1.1 category: content tags: [http, curl, api, web-content] difficulty: beginner
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://exam
Curated, production-grade skills, agents, hooks, rules, commands, utilities, and presets for AI coding agents. No magic, no demos — battle-tested workflows built for developers who use AI seriously.
Repo: Mathews-Tom/armory
Other skills on armory.
- /adr-writer
Generates Architecture Decision Records capturing context, rationale, alternatives, and consequences in numbered status-tracked format. Triggers on: "write an ADR", "document this decision", "architecture decision record", "decision record", "design decision", "ADR for".
Open skill - /agent-builder
Build AI agents and automate Claude Code programmatically via the Claude Agent SDK and headless CLI mode. Covers Python SDK, claude -p, SDK MCP servers, hooks, sessions. Triggers on: "build an agent", "agent SDK", "headless mode", "automate Claude", "programmatic agent".
Open skill - /api-docs-generator
Audits and enhances FastAPI and REST API documentation: missing descriptions, response codes, examples, docstrings, Pydantic models, OpenAPI spec. Triggers on: "generate API docs", "document this API", "OpenAPI for", "FastAPI docs", "document endpoints", "swagger docs".
Open skill - /architecture-diagram
Generate layered architecture diagrams as self-contained HTML with inline SVG icons, CSS Grid containers, and connection overlays. Triggers on: "architecture diagram", "infra diagram", "system diagram", "deployment diagram", "topology", "draw architecture". NOT for architecture
Open skill - /architecture-reviewer
Architecture reviews across 7 dimensions (structural, scalability, enterprise readiness, performance, security, ops, data) with scored reports. Triggers on: "review architecture", "critique design", "audit system", "assess scalability", "enterprise readiness", "technical due
Open skill - /arxiv-figures
Optimize and prepare figures for arXiv submission: format conversion (EPS/PDF/PNG/JPG), size reduction, metadata stripping, processor compatibility (DVI vs PDFLaTeX). Triggers on: "optimize figures for arXiv", "reduce figure size", "convert figures for arXiv", "fix arXiv
Open skill

