Files
skill-convertor/skills/test-cli2/SKILL.md
2026-04-15 01:17:01 +08:00

52 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: test-cli2
description: test
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: `www.example.com`
- tool name: `extract_test_cli2`
- tool description: test
- args:
-
- kind: browser_script
- command: scripts/extract_test_cli2.js
# Blocked-Page Rule
- 遇到登录、验证码、权限不足时必须 throw Error不得返回空数组或空对象。
- 明确报错文案,例如:登录/验证码拦截/权限不足。
# Output Contract
- structured-first返回对象或对象数组避免 getText 二次采集。
- artifact_fields: [source sheet_name columns rows]
- superrpa_browser 优先;使用 CSS 选择器,禁止 XPath 与 jQuery :contains
# Partial/Fallback Rule
- blocked_page: 登录/验证码/反爬场景要抛错
- partial_data: 数据不足要在注释或结果中说明
# References
- `references/implementation-notes.md`
- `assets/notes.md`
## 模式
- preferred_mode: compact