skills/web-content-reader/SKILL.md
读取网页内容,支持 SPA 页面自动检测与浏览器渲染降级。当普通 HTTP fetch 无法获取 Vue/React 等 SPA 页面的渲染数据时,自动通过 Playwright 浏览器获取完整内容。当用户需要读取网页数据、提取页面内容、或 WebFetch 工具返回空内容时使用。
npx skillsauth add shetengteng/skillix-hub web-content-readerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
读取任意网页的渲染后内容。自动检测 SPA 页面,在 HTTP fetch 失败时降级到浏览器渲染。
首次使用前,在 skill 目录下执行:
cd skills/web-content-reader && npm install
浏览器渲染模式需要系统已安装 Chrome/Chromium。如果未安装,可通过 Playwright 安装:
npx playwright install chromium
本 Skill 完全独立,不依赖其他 Skill。如果系统已有 Playwright Skill 启动的浏览器实例,会自动复用以节省资源。
所有命令格式:
node skills/web-content-reader/tool.js <命令> '<JSON参数>'
先尝试 HTTP fetch,检测到 SPA 空壳时自动降级到浏览器渲染:
node skills/web-content-reader/tool.js read '{"url":"https://example.com"}'
已知是 SPA 页面时,跳过 fetch 直接用浏览器渲染:
node skills/web-content-reader/tool.js read '{"url":"https://spa-app.com","mode":"browser"}'
只需要静态 HTML 内容时:
node skills/web-content-reader/tool.js read '{"url":"https://example.com","mode":"fetch"}'
使用 CSS 选择器提取页面局部内容:
node skills/web-content-reader/tool.js read '{"url":"https://example.com","selector":".main-content"}'
# 纯文本(默认)
node skills/web-content-reader/tool.js read '{"url":"https://example.com","output":"text"}'
# 含 HTML
node skills/web-content-reader/tool.js read '{"url":"https://example.com","output":"html"}'
# 全部数据(含表格、链接、元信息)
node skills/web-content-reader/tool.js read '{"url":"https://example.com","output":"json"}'
浏览器模式下等待特定元素出现:
node skills/web-content-reader/tool.js read '{"url":"https://spa-app.com","mode":"browser","waitSelector":".data-loaded"}'
| 参数 | 类型 | 默认值 | 说明 |
|------|------|--------|------|
| url | string | 必填 | 目标页面 URL |
| mode | string | auto | auto:自动检测 / fetch:仅 HTTP / browser:仅浏览器 |
| selector | string | - | CSS 选择器,提取页面特定区域 |
| output | string | text | text:标题+文本 / html:含 HTML / json:全部数据 |
| waitSelector | string | - | 浏览器模式下等待此选择器出现 |
| timeout | number | 15000 | 浏览器渲染超时(ms) |
所有命令返回 JSON:
{
"result": {
"title": "页面标题",
"content": "提取的纯文本内容",
"html": "<div>...</div>",
"tables": [{"headers": ["列1"], "rows": [["值1"]]}],
"links": [{"text": "链接文本", "href": "https://..."}],
"meta": {"description": "...", "ogTitle": "...", "ogImage": "..."}
},
"method": "fetch|browser",
"url": "https://example.com",
"elapsed": 1234,
"error": null
}
output 参数控制 result 中返回的字段:
text:title + content + metahtml:以上 + htmljson:以上 + tables + links| 用户说 | 执行 |
|--------|------|
| "读取这个页面的内容" / "帮我看看这个网页" | read '{"url":"..."}' |
| "这个页面 fetch 读不到数据" / "这是个 Vue 页面" | read '{"url":"...","mode":"browser"}' |
| "提取页面的表格数据" | read '{"url":"...","output":"json"}' |
| "只看 .content 区域的内容" | read '{"url":"...","selector":".content"}' |
| "获取页面的所有链接" | read '{"url":"...","output":"json"}' → 从 links 字段读取 |
当 Agent 使用 WebFetch 工具获取 URL 内容时,如果返回结果为空或明显是 SPA 空壳,应自动调用此 Skill:
node skills/web-content-reader/tool.js read '{"url":"<目标URL>","mode":"browser"}'
判断 WebFetch 结果需要降级的信号:
<div id="app"></div> 等框架占位符tools
被动录制用户浏览器操作行为。打开浏览器后用户自由操作,系统通过 CDP + DOM 事件注入 自动记录点击、输入、导航等操作和 API 调用。录制完成后 LLM 分析生成结构化工作流。 支持参数化重放、生成独立 Skill、导出 Playwright 脚本。依赖 Playwright Skill。
development
# uni-app 小程序代码生成器 > **版本**: v1.0.0 > **作者**: AI Assistant > **参考项目**: tt-paikebao-mp(排课宝) ## 功能概述 这是一个基于 **tt-paikebao-mp** 项目代码规范的 uni-app 小程序代码生成器。根据用户提供的需求文档,自动生成符合项目规范的: - Vue3 页面组件 - API 接口文件 - Pinia Store 状态管理 - 路由配置 - 数据库 Schema 定义 ## 触发条件 当用户请求以下内容时,应使用此 Skill: 1. 创建新的页面模块 2. 生成 API 接口文件 3. 创建数据库集合定义 4. 生成 Store 状态管理 5. 提供需求文档要求生成代码 6. 询问 uni-app 小程序开发规范 ## 快速开始 ### 1. 用户提供需求文档 用户应提供以下格式的需求文档: ```markdown # 模块名称 ## 功能描述 简要描述该模块的功能 ## 数据字段 - fieldName: 字段描述(必填/可选,类型) ## 页面列
development
读取并缓存 Swagger/OpenAPI 文档供模型使用。当用户需要添加、读取、刷新 API 文档,或使用 Swagger URL 时触发。
data-ai
苏格拉底式批判性思维分析。自动识别需求分析、系统设计、技术选型、数据分析四类场景,智能决定快速结论(≤1问)或深度探索(≤5问),防止过度追问与草率结论。Socratic critical thinking for requirements, design review, tech research, and data analysis.