docs: standardize skill-template and add development guide
All checks were successful
技能自动化发布 / release (push) Successful in 22s

This commit is contained in:
2026-04-13 13:46:23 +08:00
parent f11c596bde
commit 298448840d
40 changed files with 1455 additions and 533 deletions

40
references/RUNTIME.md Normal file
View File

@@ -0,0 +1,40 @@
# 运行时约定
## 目录结构
新技能建议采用以下根目录结构:
- `assets/`
- `references/`
- `scripts/`
- `tests/`
- `evals/`
## `scripts/` 分层
- `scripts/main.py`:唯一 CLI 入口
- `scripts/cli/`:参数解析与命令分发
- `scripts/db/`SQLite 或本地持久化层
- `scripts/service/`:业务用例与外部交互
- `scripts/util/`:通用工具、常量、日志、路径
- `scripts/jiangchang_skill_core/`:运行时与统一日志副本
## 数据路径
推荐:
```text
{CLAW_DATA_ROOT}/{CLAW_USER_ID}/{skill_slug}/
```
数据库文件建议:
```text
{...}/{skill_slug}.db
```
## 编码与输出
- Windows 终端建议在 `scripts/main.py` 里做 UTF-8 stdout/stderr 包装
- 机读输出优先单行 JSON
- 错误前缀建议统一 `ERROR:`