web_fetch

web_fetch is a skill for Claude Code, Codex from longzhi/clawhive. It costs 85 tokens per session (1,106 once invoked), scanned A, original, MIT.

A tool for downloading and extracting readable content from web pages, APIs, and other URLs.

In plain words
What is it for?
Use it to fetch articles, documentation, API responses, HTML, or plain text from publicly reachable URLs.
Why use it?
It saves you from manually opening pages and copying their text when researching web content.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/longzhi/clawhive/web_fetch
Any agent
npx skills add longzhi/clawhive --skill web_fetch
Clone the repo
git clone --depth 1 https://github.com/longzhi/clawhive

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for web_fetch

README.md
[![agentmods](https://agentmods.dev/badge/skills/longzhi/clawhive/web_fetch.svg)](https://agentmods.dev/skills/longzhi/clawhive/web_fetch)
Your own site
<a href="https://agentmods.dev/skills/longzhi/clawhive/web_fetch"><img src="https://agentmods.dev/badge/skills/longzhi/clawhive/web_fetch.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,106 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00085 $0.01106
Opus 5 $0.00043 $0.00553
Sonnet 5 $0.00017 $0.00221
Haiku 4.5 $0.00009 $0.00111

Measured 4d ago against content hash bf0586f65937, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

web_fetch scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

description: "Fetch and extract content from web URLs. Use when you need to: (1) Read a web page's content, (2) Download text from a URL, (3) Extract article text from a news site, (4) Get raw HTML or plain text from any
skills/web_fetch/SKILL.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Web Fetch - URL Content Retrieval

Fetch web page content using curl via the execute_command tool. This skill handles static pages and APIs. For JavaScript-rendered or anti-bot protected sites, use the actionbook skill instead.

When to Use

  • Fetching article text, documentation, blog posts
  • Downloading API responses (JSON, XML)
  • Reading plain HTML pages
  • Getting raw content from URLs the user provides

When NOT to Use (Use actionbook instead)

  • Twitter/X content (requires JS rendering + anti-bot)
  • Single-page apps (React, Vue, Angular)
  • Sites requiring login/cookies
  • Pages with heavy JavaScript rendering

How to Fetch

Use execute_command to run curl. Always include these flags for reliability:

# Basic fetch (returns HTML)
curl -sL -m 30 -A 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' "URL"

# Follow redirects, 30s timeout, realistic User-Agent

Flag Reference

Flag Purpose
-s Silent mode (no progress bar)
-L Follow redirects
-m 30 Timeout after 30 seconds
-A '...' Set User-Agent to avoid bot blocking
-o /dev/null -w '%{http_code}' Check HTTP status only
-H 'Accept: application/json' Request JSON response

Workflow Patterns

Pattern 1: Fetch and Read a Web Page

# Step 1: Fetch the page
curl -sL -m 30 -A 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' "https://example.com/article"

The output will be HTML. Extract the relevant text content from the HTML and present it to the user.

Pattern 2: Fetch JSON API

# Fetch JSON data
curl -sL -m 30 -H 'Accept: application/json' "https://api.example.com/data"

Pattern 3: Check if URL is accessible

# Check status code first
curl -sL -m 10 -o /dev/null -w '%{http_code}' "https://example.com"

Pattern 4: Fetch with text extraction (using sed/awk)

Read the full file on GitHub · 117 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 117 lines · 85 tokens per session scan A bf0586f65937

Subscribe to this mod's changes

web_fetch is a skill published in the GitHub repository longzhi/clawhive (57 stars, last pushed 3mo ago), licensed MIT. It adds 85 tokens to every session and 1,106 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.