Token导航 LogoToken导航

Agent Skill · AI 工具

web-content-fetcher(网页内容获取器)

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

web-content-fetcher 是AI 工具类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证为 MIT,第三方扫描有提醒项,按安装量在AI 工具类的 2,536 个 Skill 里排第 961。

总安装 1,488周安装 62GitHub Stars 2下载 496核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:web-content-fetcher(网页内容获取器)
来源仓库:https://github.com/shino369/claude-code-personal-workspace
仓库路径:skills/web-content-fetcher
安装命令:
npx skills add https://github.com/shino369/claude-code-personal-workspace --skill web-content-fetcher
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/shino369/claude-code-personal-workspace --skill web-content-fetcher

这个 Skill 是做什么的

AI 工具类 Skill 用来扩展助手本身的能力,例如接模型、接检索、接外部服务。

用于获取和解析网页内容。web-content-fetcher 属于AI 工具类 Skill,可作为该场景下的辅助能力补充。适合在开发过程中读取页面信息或验证前端流程。可结合浏览器自动化技术实现内容抓取。通过 GitHub 仓库安装,兼容主流 Agent 宿主。使用前应确认是否涉及敏感数据或文件读写权限。

来源仓库内路径:skills/web-content-fetcher

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/shino369/claude-code-personal-workspace --skil…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

web-content-fetcher 怎么安装?

在终端执行 npx skills add https://github.com/shino369/claude-code-personal-workspace --skill web-cont…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

web-content-fetcher 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

web-content-fetcher 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

web-content-fetcher 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

web-content-fetcher 用的人多吗?

公开数据是累计安装 1,488 次,近一周安装 62 次,下载 496 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

web-content-fetcher 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理AI 工具类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

AI 工具类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
executing-plans

执行计划 · Codex、Claude

1,515,336173,110只读MIT通过
verification-before-completion

完成前的验证 · Codex、Claude

1,319,472173,121权限未标注MIT通过
subagent-driven-development

子 Agent 驱动开发 · Codex、Claude

1,312,416173,138只读MIT通过
copy-editing

复制编辑 · Codex、Claude

1,209,57625,632只读MIT通过
paywall-upgrade-cro

付费专区升级 cro · Codex、Claude

1,030,17625,617只读MIT通过
web-content-fetcher

网页内容获取器 · 本页

1,4882操作浏览器MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Web Content Fetcher

Expert knowledge for fetching and parsing web content, handling size limitations, JavaScript-rendered sites, and extracting clean article content from HTML.

Overview

This skill provides battle-tested strategies for fetching web content in Claude Code, addressing critical challenges:

  1. WebFetch tool limitation: ~50KB max content size
  2. Read tool limitation: 256KB max file size per call
  3. JavaScript-rendered content: Twitter/X, React SPAs require special handling

Four-tier approach:

  • Tier 1: WebFetch for small content (< 50KB)
  • Tier 2: curl + Task agent for any size static content ⭐ DEFAULT
  • Tier 3: Scripts for edge cases (EUC-JP encoding, complex HTML)
  • Tier 4: Playwright for JavaScript-rendered sites (Twitter/X, React SPAs)

Quick Tool Limitations

ToolMax SizeBest ForLimitation
WebFetch~50KBSmall articles, first attemptPrompt length constraints
Read256KBReading fetched filesLarge files need pagination
curlUnlimitedAny size content, raw downloadsNo parsing
Task agentUnlimitedExtraction from any size HTMLHandles pagination automatically

Tiered Fetching Strategy

Tier 1: Small Content - WebFetch Direct

Use when: Simple articles, API responses, first attempt on unknown content

Quick example:

WebFetch tool with url and extraction prompt

If fails: "Prompt too long" error → Switch to Tier 2

Tier 2: Any Size Content - curl + Task Agent ⭐ RECOMMENDED

Use when: News articles, blog posts, WebFetch fails, any content of any size

Quick workflow:

# 1. Create directory
mkdir -p output/tasks/YYYYMMDD_taskname/original

# 2. Fetch HTML
curl -s "URL" > output/tasks/YYYYMMDD_taskname/original/raw_html.html

# 3. Extract with Task agent
# Prompt: "Read HTML at [path], extract article content, save to fetched_content.md"

Why default: Handles any size, AI-powered extraction, no script setup needed.

For detailed workflow: See references/workflows.md

Tier 3: Script-Based Extraction - Edge Cases Only

Use when: Task agent struggles with complex HTML or special encoding requirements (EUC-JP)

Available scripts:

  • scripts/extract_article.js - Standard HTML with Mozilla Readability
  • scripts/extract_eucjp.js - Japanese EUC-JP encoded sites (4gamer.net)

Quick example:

node .claude/skills/web-content-fetcher/scripts/extract_article.js raw_html.html > fetched_content.md

Note: Try Task agent (Tier 2) first. Scripts only when Task agent explicitly fails.

For script details: See references/advanced-fetching.md

Tier 4: JavaScript-Rendered Content - Playwright

Use when: Twitter/X, React SPAs, dynamic sites, static fetch returns empty/error

Quick example:

node .claude/skills/web-content-fetcher/scripts/fetch_js_content.js \
  "https://x.com/user/status/123456789" \
  --output fetched_content.md

Common sites: Twitter/X, Threads, Instagram, React/Vue/Angular SPAs, AJAX-loaded content

Image Extraction:

  • Automatically extracts images if exist (Twitter/X, Threads, blogs, etc.)
  • Captures image URLs with alt text from main content area
  • Filters out small images (icons/logos) automatically
  • Output includes structured Media section with URLs for downloading

Setup required (one-time):

cd .claude/skills/web-content-fetcher
pnpm add -D playwright --save-catalog-name=dev
pnpm exec playwright install chromium

For Playwright details: See references/advanced-fetching.md

Decision Tree

Use this flowchart to choose the right approach:

Need to fetch web content?
│
├─ JavaScript-rendered site (Twitter/X, React SPA, dynamic content)?
│  └─ Use Playwright script (Tier 4)
│     └─ See: references/advanced-fetching.md
│
├─ Size unknown or small expected content?
│  └─ Try WebFetch (Tier 1)
│     ├─ Success? → Done ✓
│     └─ "Prompt too long" error? → Use Tier 2
│
├─ Any other case (medium/large content, WebFetch failed)?
│  └─ Use curl + Task agent (Tier 2) ⭐ DEFAULT
│     ├─ Success? → Done ✓
│     └─ Task agent struggles? → Use Tier 3
│        └─ See: references/advanced-fetching.md
│
└─ Edge cases (Task agent fails, special encoding)?
   └─ Use curl + script (Tier 3)
      └─ See: references/advanced-fetching.md

Standard Workflow Quick Reference

Most common pattern (works for 90% of cases):

# 1. Setup
mkdir -p output/tasks/20260111_taskname/original

# 2. Fetch
curl -s "URL" > output/tasks/20260111_taskname/original/raw_html.html

# 3. Extract (Task agent prompt)
"Read HTML file at [path], extract main article content,
remove navigation/ads/sidebars/comments/footer,
save clean markdown to: [path]/fetched_content.md"

# 4. Use
Read: output/tasks/20260111_taskname/original/fetched_content.md

For detailed workflows and patterns: See references/workflows.md

Common Use Cases

Translation with images:

  1. Fetch content (Tier 2 or Tier 4 for JS sites)
  2. Extract to original/fetched_content.md with readable format (includes Media section with image URLs)
  3. Download images using URLs from Media section
  4. Pass to /translate command

Analysis:

  1. Fetch content (Tier 2 or Tier 4)
  2. Extract to original/fetched_content.md with readable format
  3. Read and analyze

Social media posts (Twitter/X, Threads, Instagram):

  1. Use Playwright (Tier 4) directly
  2. Automatically extracts text, images, and metadata
  3. Outputs to fetched_content.md with Media section in a readable format
  4. Download images from extracted URLs
  5. Use for translation/analysis

For all patterns: See references/workflows.md

When Things Go Wrong

Common issues and quick fixes:

IssueQuick FixDetails
WebFetch "Prompt too long"Switch to Tier 2troubleshooting.md
Read tool file too largeUse Task agenttroubleshooting.md
Garbled Japanese textEUC-JP encoding issuetroubleshooting.md
JavaScript requiredUse Playwright (Tier 4)troubleshooting.md
Anti-bot protectionAdd user agenttroubleshooting.md
Authentication requiredUse curl with headers/cookiestroubleshooting.md

For complete troubleshooting guide: See references/troubleshooting.md

Best Practices

  1. Always use task directories: output/tasks/YYYYMMDD_taskname/
  2. Default to Tier 2: curl + Task agent works for nearly all cases
  3. Keep raw HTML: Save to original/raw_html.html for reference (except Tier 4)
  4. Use Playwright for JS sites: Twitter/X, React SPAs, dynamic content
  5. Clean content format: Always save extracted content as markdown
  6. Descriptive naming: Use date prefix (YYYYMMDD_) and descriptive task names
  7. Try simple first: WebFetch → curl + Task agent → Scripts (only if needed)
  8. Task agent for extraction: Let AI handle pagination and parsing complexity

Reference Files

This skill uses progressive disclosure for efficiency. Core information is in this file. Detailed guides are in reference files:

Read reference files when you need detailed guidance for specific scenarios.

Quick Start Examples

Simple article:

mkdir -p output/tasks/20260111_article/original
curl -s "https://example.com/article" > output/tasks/20260111_article/original/raw_html.html
# Task agent: Extract to fetched_content.md

Twitter/X post:

mkdir -p output/tasks/20260111_twitter/original
node .claude/skills/web-content-fetcher/scripts/fetch_js_content.js \
  "https://x.com/user/status/123" \
  --output output/tasks/20260111_twitter/original/fetched_content.md

Threads post:

mkdir -p output/tasks/20260111_threads/original
node .claude/skills/web-content-fetcher/scripts/fetch_js_content.js \
  "https://www.threads.com/@user/post/ABC123" \
  --output output/tasks/20260111_threads/original/fetched_content.md

Output format with images (works for all sites):

# Title

Main content text here...

### Media

1. Image description or alt text
   - URL: https://example.com/image1.jpg
2. Another image
   - URL: https://example.com/image2.jpg

Note:

  • Images are automatically extracted from the main content area
  • Small images (< 100x100px) like icons/logos are filtered out
  • Image formats: .jpg, .png, .webp, .gif, .svg - all preserved in URLs
  • When downloading, respect the original file extension

Japanese site (potential encoding issue):

mkdir -p output/tasks/20260111_japanese/original
curl -s "https://4gamer.net/..." > output/tasks/20260111_japanese/original/raw_html.html
# Task agent with encoding detection, or use extract_eucjp.js if needed

平台分布

Claude Code

26.8%
按下载量换算133

Antigravity

22.53%
按下载量换算112

Gemini CLI

17.3%
按下载量换算86

windsurf

12.63%
按下载量换算63

trae

7.8%
按下载量换算39

OpenCode

3.18%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills