chore: initial commit

This commit is contained in:
zhaoyilun
2026-04-15 01:17:01 +08:00
commit ff748ebbeb
1162 changed files with 6107 additions and 0 deletions

51
skills/test-cli2/SKILL.md Normal file
View File

@@ -0,0 +1,51 @@
---
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

View File

@@ -0,0 +1,12 @@
[skill]
name = "test-cli2"
description = "test"
version = "0.1.0"
author = "sgclaw-skill-converter"
tags = ["sgclaw", "browser_script", "converter"]
[[tools]]
name = "extract_test_cli2"
description = "test"
kind = "browser_script"
command = "scripts/extract_test_cli2.js"

View File

@@ -0,0 +1,6 @@
## Asset Notes
- skill_name: test-cli2
- expected_domain: www.example.com
- mode: compact
- 资源仅使用本地相对文档,不包含远程 markdown 链接。

View File

@@ -0,0 +1,8 @@
## Implementation Notes
- skill_name: test-cli2
- tool: extract_test_cli2
- args:
- artifact_fields: source, sheet_name, columns, rows
- generator: main.go
- 说明: 保持脚本业务逻辑不变,仅包装与文档产出。

View File

@@ -0,0 +1 @@
return { source: 'x', columns: ['a'], rows: [{a:1}], sheet_name: 'demo' };