52 lines
1.5 KiB
Markdown
52 lines
1.5 KiB
Markdown
---
|
||
name: extract_hotlist
|
||
description: extract_hotlist browser_script tool
|
||
version: 0.1.0
|
||
author: sgclaw-skill-converter
|
||
tags:
|
||
- sgclaw
|
||
- browser_script
|
||
- converter
|
||
---
|
||
|
||
# Use Cases
|
||
- 输入 JS 脚本并生成可被 sgclaw 加载的技能包
|
||
- 适配 browser_script 执行模型,优先返回结构化结果
|
||
- 与运行时兼容,遵循 expected_domain 与 CSS 选择器约束
|
||
|
||
# Workflow
|
||
1. 解析脚本参数与返回结构
|
||
2. 生成 SKILL.toml 与 SKILL.md
|
||
3. 保持 JS 逻辑原样,落盘到 scripts/<tool>.js
|
||
4. 输出 references 与 assets 文档
|
||
|
||
# Runtime Contract
|
||
- expected_domain: `未设置`
|
||
- tool name: `extract_hotlist`
|
||
- tool description: 基于现有脚本生成结构化结果
|
||
- args:
|
||
- top_n: 脚本参数 top_n
|
||
- kind: browser_script
|
||
- command: scripts/extract_hotlist.js
|
||
|
||
# Blocked-Page Rule
|
||
- 遇到登录、验证码、权限不足时必须 throw Error,不得返回空数组或空对象。
|
||
- 明确报错文案,例如:登录/验证码拦截/权限不足。
|
||
|
||
# Output Contract
|
||
- structured-first:返回对象或对象数组,避免 getText 二次采集。
|
||
- artifact_fields: [source sheet_name columns rows data]
|
||
- superrpa_browser 优先;使用 CSS 选择器,禁止 XPath 与 jQuery :contains
|
||
|
||
# Partial/Fallback Rule
|
||
- blocked_page: 登录/验证码/反爬场景要抛错
|
||
- partial_data: 数据不足要在注释或结果中说明
|
||
|
||
# References
|
||
- `references/implementation-notes.md`
|
||
- `assets/notes.md`
|
||
|
||
## 模式
|
||
- preferred_mode: compact
|
||
|