/armory:web-fetchfrom armory
Fetches specific URLs via curl/WebFetch and extracts Reddit posts with full comment threads using a deterministic browser helper. Triggers on fetch, download HTML, API call, curl endpoint, or Reddit thread requests.
Ships in armory. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use curl or the built-in WebFetch tool for ordinary URLs. For Reddit posts and their comment/reply threads, use the bundled deterministic browser helper below; generic page extraction does not expand a thread.
| 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, curl for headers, authentication, POST bodies, or raw format control, and the Reddit helper for Reddit post/thread requests.
Use this branch for a Reddit post, its comments, nested replies, or an entire thread. Read references/reddit.md, then run scripts/reddit_thread.py from this skill's directory. Resolve the skill's actual installed path rather than assuming the current directory.
Choose the browser session upfront: Reddit frequently serves network-security or verification gates to fresh, unauthenticated headless Chrome sessions. Before the first capture, check whether REDDIT_BROWSER_SESSION is set or the user has named a dedicated agent-browser session. If neither is configured, warn the user that standalone headless Chrome is commonly blocked by Reddit and ask upfront whether to configure a dedicated user-authorized session (--session or REDDIT_BROWSER_SESSION—preferring an isolated --profile so tabs never open in daily Chrome, see references/reddit.md) or attempt standalone headless Chrome. Never switch profiles, proxies, or engines after hitting a block.
# Preferred: dedicated user-authorized agent-browser session (default browser-json backend)
# Replace <session-name> with the session you selected, or omit --session when REDDIT_BROWSER_SESSION is exported
python3 "$SKILL_ROOT/scripts/reddit_thread.py" \
"https://www.reddit.com/r/AI_Agents/comments/1xwxphk/my_agents_output_tests_stayed_green_while_it/" \
--session "<session-name>" \
--output "/tmp/reddit-thread-$(date +%s)-$$"
# Multiple Reddit links in one invocation (reuses ONE tab across all URLs with built-in fail-fast)
python3 "$SKILL_ROOT/scripts/reddit_thread.py" \
"$URL_1" "$URL_2" "$URL_3" \
--session "<session-name>" \
--output "/tmp/reddit-batch-$(date +%s)-$$"
# Standalone ephemeral headless browser (only when the user chooses to try it upfront)
python3 "$SKILL_ROOT/scripts/reddit_thread.py" \
"https://www.reddit.com/r/AI_Agents/comments/1xwxphk/my_agents_output_tests_stayed_green_while_it/" \
--output "/tmp/reddit-thread-$(date +%s)-$$"
The helper uses the existing agent-browser CLI, requires no Reddit API credentials, defaults to the fast browser-json backend (top-level navigation to Reddit's .json thread listing with same-post more continuations; --backend dom remains available as a DOM fallback), and saves thread.json plus readable thread.md (or per-post subdirectories plus batch.json when given multiple distinct post IDs; duplicate URLs for the same post deduplicate into single-post output). JSON preserves comment fullnames, parent IDs, deleted/removed parent markers, text, links, timestamps, and retrieval evidence. When --session or REDDIT_BROWSER_SESSION is supplied, the helper creates and closes only its own single tab in that session and never closes the borrowed browser; do not run concurrent invocations against the same session.
status, block_reason (when blocked), and any issues. browser_exhausted means supported expansion was exhausted, not proof of every Reddit comment. Browser captures always have complete: false; matching the displayed count is not completeness proof.network_security, human_verification, rate_limit, login_required) instead of sending remaining links through the same blocked session; only post-specific unavailability (not_found, private_or_banned) allows continuing to unrelated links. Preserve visible deletion/removal markers without implying recovery. Do not solve challenges, rotate proxies, extract tokens/cookies, retry blocked endpoints after a denial, or request API credentials for this browser workflow. Approved Reddit API access is a separate policy-governed route, not a prerequisite or automatic fallback.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 -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)
"
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'
# 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.
curl -s "https://api.example.com/data" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json"
curl -s "https://api.example.com/data" \
-H "X-API-Key: $API_KEY"
curl -s "https://api.example.com/data?api_key=$API_KEY"
curl -s -u "username:$PASSWORD" "https://api.example.com/data"
Store credentials in environment variables. Never hardcode tokens or passwords in commands.
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 '.'
curl -s -X POST "https://api.example.com/upload" \
-F "file=@./document.pdf" \
-F "description=Uploaded via curl"
curl -s -X PUT "https://api.example.com/items/123" \
-H "Content-Type: application/json" \
-d '{"name": "updated-name", "value": 99}' | jq '.'
curl -s -X PATCH "https://api.example.com/items/123" \
-H "Content-Type: application/json" \
-d '{"value": 100}' | jq '.'
curl -s -X DELETE "https://api.example.com/items/123" \
-H "Authorization: Bearer $API_TOKEN"
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))
done
curl -s --connect-timeout 10 --max-time 30 \
--retry 3 --retry-delay 2 \
"https://api.example.com/data"
curl -sI "https://example.com" | grep -i "content-type"
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 '.'
# 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"
| 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"
curl for
authenticated or stateful requests.jq, head, or python3
to extract only needed data before loading into context.-o, not
piped to stdout.$ENV_VAR references. If the variable is not set,
surface the error immediately.-L with curl unless you specifically need
to inspect the redirect chain.-s (silent) on every curl call. Progress meters add noise to output.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub mathews-tom/armory --plugin armory94 skills in this plugin
/adr-writerGenerates 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"./agent-builderBuild 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"./animateCreate Manim (Python) animated explainers: algorithm step-throughs, math and equation walkthroughs, pipeline and data-flow diagrams, comparisons and timelines, rendered to MP4, WebM or GIF with optional audio overlay. Includes a template path that renders validated config data with no model call, plus output checks (ffprobe duration, fps, dimensions, full decode, sampled-frame review receipt). Use when asked to "create a video", "animate this", "make an explainer", "manim animation", "animate this algorithm", or "motion graphic". NOT for HTML/CSS/GSAP or Hyperframes video, NOT for React or Remotion video, and NOT for a launch or promo video of the user's own project, use launch-video.Other plugins' skills for the same job