smart-fetch

smart-fetch is a skill for Claude Code, Codex from guihai24/openskills. It costs 75 tokens per session (989 once invoked), scanned A, original, MIT.

A web-fetching router that chooses a retrieval method for a URL, a search request, or public online content. It can also try a fallback method when the first attempt returns nothing or an error.

In plain words
What is it for?
Use it to read public articles, blogs, documents, PDFs, GitHub README files, posts on X or Twitter, or a page's raw HTML and structured data.
Why use it?
It removes the need to test different web-fetching tools manually and can return clean article text or raw page data depending on the task.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to read public articles, blogs, documents, PDFs, GitHub README files, posts on X or Twitter, or a page's raw HTML and structured data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/guihai24/openskills/smart-fetch
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.

Any agent
npx skills add guihai24/openskills --skill smart-fetch
Clone the repo
git clone --depth 1 https://github.com/guihai24/openskills

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 smart-fetch

README.md
[![agentmods](https://agentmods.dev/badge/skills/guihai24/openskills/smart-fetch/github.svg)](https://agentmods.dev/skills/guihai24/openskills/smart-fetch)
Your own site
<a href="https://agentmods.dev/skills/guihai24/openskills/smart-fetch"><img src="https://agentmods.dev/badge/skills/guihai24/openskills/smart-fetch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for smart-fetch

Your own site · 80×15
<a href="https://agentmods.dev/skills/guihai24/openskills/smart-fetch"><img src="https://agentmods.dev/badge/skills/guihai24/openskills/smart-fetch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 989 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00075 $0.00989
Opus 5.5 $0.00030 $0.00396
Sonnet 5.5 $0.00015 $0.00198
Haiku 4.5 $0.00007 $0.00099

Measured 2mo ago against content hash 7a5a3194cd9d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

smart-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 2mo 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.

| 1 | 推文 / X | URL 含 `x.com` 或 `twitter.com` | Jina + curl |
skills/smart-fetch/SKILL.md · 94 lines

What it actually says

smart-fetch — 智能网页抓取路由

拿到 URL,按场景自动选择最合适的工具,不试错,5 秒出结果。

路由规则(按优先级执行)

优先级 场景 判断条件 工具
1 推文 / X URL 含 x.com 或 twitter.com Jina + curl
2 文章 / 博客 / 文档 内容型页面(Medium、知乎、掘金、少数派、GitHub README、SubStack 等) Jina + WebFetch
3 关键词搜索 无具体 URL,需要发现信息 WebSearch
4 普通公开网页 URL 已知,内容公开 WebFetch
5 需要原始 HTML 需要 meta / JSON-LD / 结构化数据 curl
6 兜底 前几步返回空或错误 curl + 浏览器 UA

决策流程

  1. 拿到请求 — 明确目标:是 URL 还是关键词?要提取什么内容?
  2. 匹配路由 — 按上表优先级从高到低匹配场景,选第一个命中的工具
  3. 执行 — 调用对应工具
  4. 校验结果 — 返回内容是否有效?空内容 / 登录墙 / 报错 → 降级到下一个工具
  5. 全部失败 — 告知用户:该页面需要登录态或浏览器环境(CDP),建议使用 web-access skill

工具使用规范

Jina(首选预处理层)

将网页转为干净的 Markdown,大幅节省 token,适合正文提取。

调用方式:https://r.jina.ai/{原始完整URL}
示例:https://r.jina.ai/https://x.com/user/status/123
  • 速率限制:20 RPM
  • 适合:推文、文章、博客、文档、PDF
  • 不适合:数据面板、商品列表、需要登录的内容
  • 失败信号:返回 "Sign in" / "Log in" / 空内容 → 降级

使用 curl 调用 Jina:

curl -s "https://r.jina.ai/https://x.com/user/status/123" \
  -H "Accept: text/plain" \
  --max-time 30

使用 WebFetch 调用 Jina:

  • url: https://r.jina.ai/https://example.com/article
  • prompt: 描述要提取的内容

WebSearch

用于关键词搜索、发现信息来源。无具体 URL 时的第一选择。

WebFetch

已知 URL、内容公开时直接使用。由模型根据 prompt 提取内容,返回处理后结果。

curl

需要原始 HTML 或 Jina/WebFetch 均失败时使用。

curl -s "{URL}" \
  -H "User-Agent: 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" \
  --max-time 30

站点经验

操作前先查 references/site-patterns.md,有命中站点则按已验证模式执行。

操作成功后,如发现新的有效模式或陷阱,主动更新 references/site-patterns.md。

边界说明

smart-fetch 覆盖零依赖的公开内容抓取。以下场景超出范围,建议使用 web-access skill:

  • 需要登录态的内容(小红书、微信公众号、付费内容)
  • 需要页面交互(点击、滚动、填表)
  • 反爬强的平台(多次降级后仍失败)
  • 需要 JS 渲染的动态页面
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 94 lines · 75 tokens per session scan A 7a5a3194cd9d

Subscribe to this mod's changes

smart-fetch is a skill published in the GitHub repository guihai24/openskills (2 stars, last pushed 1mo ago), licensed MIT. It adds 75 tokens to every session and 989 once invoked, about $0.0003 per session on Opus 5.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-31.

Related

smart-fetch compared with skills from other repositories

smart-fetch next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
smart-fetchguihai24/openskillsSkill21mo agoMITA75Claude Code, Codex
interactive-loginyc-software/qmSkill16ktodayMITA46Claude Code, Codex
pinchtab-mcppinchtab/pinchtabSkill11k11d agoMITA52Claude Code, Codex
azure-messaging-webpubsub-javamicrosoft/skillsSkill3.2kyesterdayMITA43Claude Code
cua-driverdavidondrej/skillsSkill4.3kyesterdayMITA68Claude Code, Codex
open-design-browsercompozy/compozySkill2.9ktodayMITA56Claude Code, Codex
southwestborski/travel-hacking-toolkitSkill9062d agoMITA40Claude Code