docs: standardize skill-template and add development guide
All checks were successful
技能自动化发布 / release (push) Successful in 22s
All checks were successful
技能自动化发布 / release (push) Successful in 22s
This commit is contained in:
7
assets/README.md
Normal file
7
assets/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# assets
|
||||
|
||||
- `examples/`:CLI 成功输出形状示例(虚构路径与数据)。
|
||||
- `schemas/`:轻量 JSON Schema 示例(`additionalProperties: true` 允许扩展字段)。
|
||||
|
||||
- 面向用户的介绍见 `references/README.md`。
|
||||
- 面向编排/CLI 的细节见 `references/CLI.md`、`RUNTIME.md`、`SCHEMA.md`。
|
||||
4
assets/examples/README.md
Normal file
4
assets/examples/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# 示例 JSON
|
||||
|
||||
- `version-response.json`:`python main.py version` 成功时 stdout 单行对象的形状参考。
|
||||
- `log-get-response.json`:若技能有日志表,`log-get` 成功时单条对象的形状参考。
|
||||
10
assets/examples/log-get-response.json
Normal file
10
assets/examples/log-get-response.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": 1,
|
||||
"account_id": "demo_account_1",
|
||||
"article_id": 12,
|
||||
"article_title": "示例标题",
|
||||
"status": "published",
|
||||
"error_msg": null,
|
||||
"created_at": "2026-04-01T10:00:00",
|
||||
"updated_at": "2026-04-01T10:00:00"
|
||||
}
|
||||
4
assets/examples/version-response.json
Normal file
4
assets/examples/version-response.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"skill": "your-skill-slug"
|
||||
}
|
||||
19
assets/schemas/publish-log-record.schema.json
Normal file
19
assets/schemas/publish-log-record.schema.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://openclaw.local/skill-template/publish-log-record.schema.json",
|
||||
"title": "PublishLogRecord",
|
||||
"description": "发布型技能 log-get 返回的单条日志对象模板",
|
||||
"type": "object",
|
||||
"required": ["id", "account_id", "article_id", "article_title", "status", "created_at", "updated_at"],
|
||||
"properties": {
|
||||
"id": { "type": "integer" },
|
||||
"account_id": { "type": ["string", "integer"] },
|
||||
"article_id": { "type": "integer" },
|
||||
"article_title": { "type": "string" },
|
||||
"status": { "type": "string" },
|
||||
"error_msg": { "type": ["string", "null"] },
|
||||
"created_at": { "type": ["string", "null"] },
|
||||
"updated_at": { "type": ["string", "null"] }
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
Reference in New Issue
Block a user