docs: standardize skill requirements declaration
This commit is contained in:
10
README.md
10
README.md
@@ -36,6 +36,7 @@
|
||||
| `scripts/` | 规范分层后的代码骨架 |
|
||||
| `tests/` | 单元测试与分层测试范式(默认根目录 unittest) |
|
||||
| `evals/` | 人工/半自动评估材料 |
|
||||
| `requirements.txt` | 本技能 Python 三方依赖声明(由匠厂宿主安装到共享 runtime) |
|
||||
| `.github/workflows/release_skill.yaml` | 标准发布工作流 |
|
||||
| `release.ps1` | 对齐现有 skill 的发布脚本入口 |
|
||||
|
||||
@@ -52,3 +53,12 @@ python scripts/main.py version
|
||||
- 新技能若不需要某些目录,也建议先保留结构,再按实际业务填充内容。
|
||||
- `metadata.openclaw.developer_ids` 是发布元数据,不是用户展示文案;用于非公开技能的开发者默认可见授权。
|
||||
- **发起 `release.ps1` 之前**,务必确认 `python tests/run_tests.py -v` 已全部通过。
|
||||
|
||||
## Python 依赖(requirements.txt)
|
||||
|
||||
- 在技能**根目录**维护 `requirements.txt`,声明本技能特有的 Python 三方包。
|
||||
- 匠厂宿主在**安装或更新**技能后,会将该文件中的依赖安装到共享 Python runtime:
|
||||
`{JIANGCHANG_DATA_ROOT}/python-runtime/.venv`(Windows 示例:`D:\jiangchang-data\python-runtime\.venv`)。
|
||||
- 平台通用依赖由宿主 `resources/jiangchang-python-runtime/pyproject.toml` 维护;**不要**把业务依赖写进宿主 pyproject。
|
||||
- **Skill 业务代码不得自动 `pip install`**;缺依赖时应在 `health` / preflight 中给出清晰错误。
|
||||
- **系统级组件**(如 Microsoft Visual C++ Redistributable)**不要**写进 `requirements.txt`;仅在 `health` / preflight 中提示用户自行安装。
|
||||
|
||||
Reference in New Issue
Block a user