一键导入
tool-web-fetch
本地搜索引擎与网页内容获取工具 - 绕过WebSearch/WebFetch域名限制,支持多API搜索、代理抓取、反爬处理。触发场景:(1) WebSearch被限制 (2) WebFetch无法访问特定域名 (3) 需要获取GitHub等内容 (4) 需要处理反爬网站
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
本地搜索引擎与网页内容获取工具 - 绕过WebSearch/WebFetch域名限制,支持多API搜索、代理抓取、反爬处理。触发场景:(1) WebSearch被限制 (2) WebFetch无法访问特定域名 (3) 需要获取GitHub等内容 (4) 需要处理反爬网站
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Search and discover AI skills from the SkillsMP marketplace
Analyzes codebases to understand structure, tech stack, patterns, and conventions. Use when onboarding to a new project, exploring unfamiliar code, or when asked "how does this work?" or "what's the architecture?"
为项目构建分层式LLM友好文档体系。已有项目:扫描项目结构→架构分类→生成CLAUDE.md主索引→基础模块文档→业务模块API/数据模型/坑点文档→配置文档→git变更日志(含风险评估+回滚指南)→交叉验证。新项目:解析PRD→按脚手架规范设计架构→需求拆解为开发任务→融合代码规范生成CLAUDE.md开发指南→模块级API设计+数据模型+开发清单。当用户需要为项目创建AI编程文档、建立项目索引、梳理代码、新建项目规划、或提到llm.txt/CLAUDE.md时使用。
阿里云百炼Qwen-Image文生图API调用助手 - 用于通过阿里云百炼平台调用Qwen-Image系列模型生成高质量图像。支持同步和异步调用方式、提示词智能改写、多分辨率输出、反向提示词等高级功能。触发场景:(1) 用户需要生成图像 (2) 用户提到文生图、AI绘画 (3) 用户询问阿里云百炼图像生成 (4) 需要批量生成图片 (5) 需要定制化图像生成参数
HTML PPT Studio — author professional static HTML presentations in many styles, layouts, and animations, all driven by templates. Use when the user asks for a presentation, PPT, slides, keynote, deck, slideshow, "幻灯片", "演讲稿", "做一份 PPT", "做一份 slides", a reveal-style HTML deck, a 小红书 图文, or any kind of multi-slide pitch/report/sharing document that should look tasteful and be usable with keyboard navigation. Triggers include keywords like "presentation", "ppt", "slides", "deck", "keynote", "reveal", "slideshow", "幻灯片", "演讲稿", "分享稿", "小红书图文", "talk slides", "pitch deck", "tech sharing", "technical presentation".
Unified entry point for Stitch design work. Handles prompt enhancement (UI/UX keywords, atmosphere), design system synthesis (.stitch/DESIGN.md), and high-fidelity screen generation/editing via Stitch MCP.
| name | tool-web-fetch |
| description | 本地搜索引擎与网页内容获取工具 - 绕过WebSearch/WebFetch域名限制,支持多API搜索、代理抓取、反爬处理。触发场景:(1) WebSearch被限制 (2) WebFetch无法访问特定域名 (3) 需要获取GitHub等内容 (4) 需要处理反爬网站 |
提供多种方式绕过 WebSearch/WebFetch 的域名限制,获取网页内容。
搜索流程:
1. 优先使用 WebSearch 进行搜索
2. 如果 WebSearch 被限制 → 使用备用搜索 API
3. 对于搜索结果中的具体 URL → 尝试 WebFetch
4. 如果 WebFetch 失败 → 使用本工具直接抓取
内容获取流程:
1. 优先尝试 WebFetch
2. 如果域名被限制 → 使用脚本直接请求
3. 如果需要反爬处理 → 使用 web_fetch.py
| API | 响应时间 | 用途 | 调用方式 |
|---|---|---|---|
| GitHub Search API | 0.87s | 搜索代码仓库 | scripts/web_fetch.py |
| Stack Overflow API | 0.69s | 技术问答搜索 | 直接 API 调用 |
| Wikipedia API | 0.71s | 百科资料搜索 | 直接 API 调用 |
| Hacker News API | 0.60s | 技术新闻搜索 | 直接 API 调用 |
| DuckDuckGo API | 0.52s | 即时答案摘要 | 直接 API 调用 |
| API | 错误 | 原因 |
|---|---|---|
| SearXNG 公开实例 | 403/连接失败 | 代理环境限制 |
| Reddit API | 403 Forbidden | 需要OAuth认证 |
| API | 免费额度 | 用途 | 获取链接 |
|---|---|---|---|
| Brave Search API | 2000次/月 | 通用搜索 | https://brave.com/search/api/ |
| Serper API | 2500次/月 | Google搜索代理 | https://serper.dev/ |
| Tavily API | 1000次/月 | AI搜索优化 | https://tavily.com/ |
# 搜索 GitHub 仓库
python scripts/web_fetch.py "https://api.github.com/search/repositories?q=python+web+framework&sort=stars&per_page=10" --json
# 获取仓库详细信息
python scripts/web_fetch.py "https://api.github.com/repos/owner/repo" --json
# 获取仓库 README
python scripts/web_fetch.py "https://raw.githubusercontent.com/owner/repo/main/README.md"
# 获取仓库 Issues
python scripts/web_fetch.py "https://api.github.com/repos/owner/repo/issues?state=open" --json
# 搜索问题
python scripts/web_fetch.py "https://api.stackexchange.com/2.3/search?intitle=python+error&site=stackoverflow&sort=votes&pagesize=10" --json
# 获取问题详情
python scripts/web_fetch.py "https://api.stackexchange.com/2.3/questions/{id}?site=stackoverflow&filter=!-*f(6rc.lF" --json
# 英文维基百科
python scripts/web_fetch.py "https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=python&format=json&srlimit=10" --json
# 中文维基百科
python scripts/web_fetch.py "https://zh.wikipedia.org/w/api.php?action=query&list=search&srsearch=人工智能&format=json&srlimit=10" --json
# 搜索技术新闻
python scripts/web_fetch.py "https://hn.algolia.com/api/v1/search?query=python&hitsPerPage=10" --json
脚本会自动检测以下 Clash 端口:
| Clash 版本 | HTTP 端口 | SOCKS5 端口 |
|---|---|---|
| Clash for Windows | 7890 | 7891 |
| Clash Verge | 7897 | 7898 |
| Clash Meta | 7890 | 7891 |
# 指定代理地址
python scripts/web_fetch.py "https://api.github.com/repos/user/repo" --proxy http://127.0.0.1:7890
# 禁用代理
python scripts/web_fetch.py "https://api.github.com/repos/user/repo" --no-proxy
# 使用环境变量
export HTTP_PROXY="http://127.0.0.1:7890"
export HTTPS_PROXY="http://127.0.0.1:7890"
python scripts/web_fetch.py "https://api.github.com/repos/user/repo"
# 基础用法
python scripts/web_fetch.py "<url>" [--options]
# 常用参数
--json # 解析并格式化 JSON 输出
--output, -o # 保存到文件
--summary, -s # 只显示摘要(前20行)
--proxy, -p # 自定义代理地址
--no-proxy # 禁用代理
--user-agent, -u # 自定义 User-Agent
--cookies, -c # 发送 Cookie
--timeout, -t # 超时时间(秒)
# 示例 1: GitHub API 搜索并保存结果
python scripts/web_fetch.py \
"https://api.github.com/search/repositories?q=fastapi&sort=stars" \
--json -o search_result.json
# 示例 2: 获取仓库 README(带代理)
python scripts/web_fetch.py \
"https://raw.githubusercontent.com/tiangolo/fastapi/main/README.md" \
--proxy http://127.0.0.1:7897
# 示例 3: 获取 Stack Overflow 问题
python scripts/web_fetch.py \
"https://api.stackexchange.com/2.3/questions/123?site=stackoverflow" \
--json
# 示例 4: 带反爬处理的抓取
python scripts/web_fetch.py \
"https://example.com/protected-page" \
-u chrome -c "session=abc123; token=xyz"
| 功能 | URL 格式 |
|---|---|
| 搜索仓库 | https://api.github.com/search/repositories?q={query}&sort=stars&per_page={n} |
| 仓库信息 | https://api.github.com/repos/{owner}/{repo} |
| README 内容 | https://raw.githubusercontent.com/{owner}/{repo}/{branch}/README.md |
| 文件内容 | https://raw.githubusercontent.com/{owner}/{repo}/{branch}/{path} |
| Issues 列表 | https://api.github.com/repos/{owner}/{repo}/issues |
| Releases | https://api.github.com/repos/{owner}/{repo}/releases |
| 用户信息 | https://api.github.com/users/{username} |
| 功能 | URL 格式 |
|---|---|
| 搜索问题 | https://api.stackexchange.com/2.3/search?intitle={query}&site=stackoverflow&sort=votes |
| 问题详情 | https://api.stackexchange.com/2.3/questions/{id}?site=stackoverflow |
| 问题答案 | https://api.stackexchange.com/2.3/questions/{id}/answers?site=stackoverflow |
| 标签搜索 | https://api.stackexchange.com/2.3/questions?tagged={tag}&site=stackoverflow |
| 功能 | URL 格式 |
|---|---|
| 英文搜索 | https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch={query}&format=json |
| 中文搜索 | https://zh.wikipedia.org/w/api.php?action=query&list=search&srsearch={query}&format=json |
| 页面内容 | https://en.wikipedia.org/w/api.php?action=query&titles={title}&prop=extracts&format=json |
| 功能 | URL 格式 |
|---|---|
| 搜索 | https://hn.algolia.com/api/v1/search?query={query}&hitsPerPage={n} |
| 热门帖子 | https://hn.algolia.com/api/v1/search?tags=front_page&hitsPerPage={n} |
| 最新帖子 | https://hn.algolia.com/api/v1/search?tags=story&hitsPerPage={n} |
当 Python requests 出现问题时,可直接使用 curl:
# 抓取 JSON API
curl -sL "https://api.github.com/repos/user/repo" | python -m json.tool
# 抓取网页内容
curl -sL "https://example.com" | head -100
# 保存到文件
curl -sL "https://example.com" -o output.html
# 仓库 README
curl -sL "https://raw.githubusercontent.com/owner/repo/main/README.md"
# GitHub API 搜索
curl -sL "https://api.github.com/search/repositories?q=python&sort=stars&per_page=5"
# 解析 JSON 输出
curl -sL "https://api.github.com/repos/python/cpython" | python -c "
import sys, json, io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
d = json.load(sys.stdin)
print(f'仓库: {d[\"full_name\"]}')
print(f'Stars: {d[\"stargazers_count\"]}')
print(f'语言: {d[\"language\"]}')
"
脚本内置多种 User-Agent:
| 名称 | 用途 |
|---|---|
chrome | 模拟 Chrome 浏览器 |
firefox | 模拟 Firefox 浏览器 |
safari | 模拟 Safari 浏览器 |
googlebot | 模拟 Google 爬虫 |
curl | 简单请求 |
bot | Python requests 默认 |
# 使用预设 User-Agent
python scripts/web_fetch.py "https://example.com" -u chrome
# 自定义 User-Agent
python scripts/web_fetch.py "https://example.com" -u "MyBot/1.0"
# 发送 Cookie 字符串
python scripts/web_fetch.py "https://example.com/private" -c "session=abc123; token=xyz"
# 从浏览器复制 Cookie 后使用
python scripts/web_fetch.py "https://example.com/user" -c "$(cat cookies.txt)"
场景: 需要搜索 Python Web 框架相关信息
# Step 1: GitHub 搜索热门仓库
python scripts/web_fetch.py \
"https://api.github.com/search/repositories?q=python+web+framework&sort=stars&per_page=10" \
--json -o github_results.json
# Step 2: 获取具体仓库信息
python scripts/web_fetch.py \
"https://api.github.com/repos/fastapi/fastapi" \
--json
# Step 3: 获取 README 文档
python scripts/web_fetch.py \
"https://raw.githubusercontent.com/tiangolo/fastapi/main/README.md" \
-o fastapi_readme.md
# Step 4: 搜索 Stack Overflow 相关问题
python scripts/web_fetch.py \
"https://api.stackexchange.com/2.3/search?intitle=fastapi&site=stackoverflow&sort=votes&pagesize=5" \
--json
场景: 调研某个技术主题
# 1. GitHub 搜索相关项目
python scripts/web_fetch.py "https://api.github.com/search/repositories?q={topic}&sort=stars" --json
# 2. Hacker News 搜索相关讨论
python scripts/web_fetch.py "https://hn.algolia.com/api/v1/search?query={topic}" --json
# 3. Wikipedia 获取基础知识
python scripts/web_fetch.py "https://zh.wikipedia.org/w/api.php?action=query&list=search&srsearch={topic}&format=json" --json
# 4. Stack Overflow 查看常见问题
python scripts/web_fetch.py "https://api.stackexchange.com/2.3/search?intitle={topic}&site=stackoverflow&sort=votes" --json
场景: WebFetch 报错 "domain is blocked"
# 方案 1: 使用 web_fetch.py 脚本(自动检测代理)
python scripts/web_fetch.py "https://被限制域名.com/page"
# 方案 2: 使用 curl 直接抓取
curl -sL -H "User-Agent: Mozilla/5.0" "https://被限制域名.com/page" > output.html
# 方案 3: 查找是否有官方 API
# 例如 GitHub 内容改用 GitHub API
python scripts/web_fetch.py "https://api.github.com/repos/user/repo" --json
| 标准 | 要求 | 检查方式 |
|---|---|---|
| 响应时间 | ≤ 15秒 | 超时设置 |
| 成功率 | ≥ 90% | 多 API 备用 |
| 代理检测 | 自动 | 端口扫描 |
| User-Agent | 必须设置 | Header 检查 |
| 编码处理 | UTF-8 | 自动解码 |
| 工具 | 用途 | 安装 |
|---|---|---|
| Python 3.8+ | 脚本执行 | 系统自带 |
| requests | HTTP 请求 | pip install requests |
| curl | 备用抓取 | 系统自带 |
技能版本: 2.0.0 最后更新: 2026-06-29 创建者: AI Assistant