Files
skill-template/references/README.md
chendelian f214598470
All checks were successful
技能自动化发布 / release (push) Successful in 44s
docs: explain developer_ids in skill template
2026-04-14 09:19:01 +08:00

47 lines
1.7 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.
---
description: "这是规范化的新技能模板说明不直接作为业务技能使用。复制后请替换技能名、平台名、CLI 示例与 service 实现。"
---
# 技能模板说明
这个仓库是**给开发者复制的新技能模板**,不是终端用户直接调用的业务 skill。
## 它提供什么
- 标准目录结构
- 最小 CLI 入口
- 发布型技能常见的日志表骨架
- `service` 层占位模块
- 与现有规范 skill 一致的发布脚本与 GitHub workflow
## 复制后你需要改什么
- `SKILL.md` 中的名称、描述、slug、触发说明
- `SKILL.md``metadata.openclaw.developer_ids`(如需让非公开技能默认授权给开发者查看)
- `references/CLI.md` 里的命令示例
- `scripts/util/constants.py` 中的 slug / 版本 / logger 名
- `scripts/service/` 下的真实业务实现
## `developer_ids` 是做什么的
`metadata.openclaw.developer_ids` 是平台发布元数据,不是终端用户文案。
它用于声明:当技能发布后,如果平台侧将该技能设置为 `access_scope = 0`(不公开),哪些开发者用户仍应自动获得可见权限。
约定如下:
- 字段位置:`SKILL.md` -> `metadata.openclaw.developer_ids`
- 推荐格式:正整数数组,例如 `[1032, 12428]`
- 发布效果:发布接口会把这些用户补写到 `skill_user_access`
- 第一个 ID 会作为主开发者同步到 `skills.developer_id`
如果你的技能本来就是公开技能,或暂时不需要开发者专属可见性,这个字段可以留空数组。
## 不建议再保留的旧结构
- 旧模板里的 `docs/`
- 旧模板里的 `optional/`
- 旧入口 `scripts/skill_main.py`
新模板统一使用 `scripts/main.py` 作为入口。