- 5 agent frameworks: Qoder, Claude Code, Codex, OpenClaw, Hermes Agent - 9 lifecycle skills: lifecycle router, discover, create, test, audit, debug, update, publish, retire - 5 framework-specific meta-skills with specs and guides - OpenClaw meta-skill enriched with ClawHub official ecosystem data - Per-framework directories with skills/, versions/, publish/, docs/
49 lines
1.4 KiB
Markdown
49 lines
1.4 KiB
Markdown
# Codex 技能规范摘要
|
||
|
||
> 本文件摘要整理 OpenAI Codex 技能的核心规范,供快速参考。完整规范请参阅 OpenAI 官方文档。
|
||
|
||
## 技能目录结构
|
||
|
||
```
|
||
<skill-name>/
|
||
├── skill.json # 技能元信息(必填)
|
||
├── prompt.md # 技能指令定义(必填)
|
||
├── tools/ # 函数定义 / 工具配置(可选)
|
||
├── tests/ # 验证用例(可选)
|
||
└── CHANGELOG.md # 版本变更记录(推荐)
|
||
```
|
||
|
||
## skill.json 字段
|
||
|
||
| 字段 | 类型 | 必填 | 说明 |
|
||
|------|------|------|------|
|
||
| `name` | string | 是 | 技能名称 |
|
||
| `version` | string | 是 | 语义化版本号 |
|
||
| `description` | string | 是 | 技能功能描述 |
|
||
| `functions` | array | 否 | 依赖的函数定义列表 |
|
||
| `tools` | array | 否 | 依赖的工具列表 |
|
||
| `tags` | array | 否 | 标签 |
|
||
|
||
## prompt.md 格式
|
||
|
||
Codex 的技能指令定义:
|
||
|
||
- 使用 Markdown 格式编写
|
||
- 描述技能的触发条件和执行逻辑
|
||
- 可指定函数调用的时机和参数
|
||
- 建议包含使用示例
|
||
|
||
## 函数定义(Function Calling)
|
||
|
||
Codex 使用 OpenAI 的函数调用格式:
|
||
|
||
- 函数以 JSON Schema 定义
|
||
- 包含 `name`、`description`、`parameters` 字段
|
||
- 支持 `function_call` 指定调用方式
|
||
- 函数定义可放在 `tools/` 目录
|
||
|
||
## 参考链接
|
||
|
||
- [OpenAI Function Calling 文档](https://platform.openai.com/docs/guides/function-calling)
|
||
- `examples/` 目录中的参考实现
|