@cnbcool/cnb-api-generate 2.16.8 → 2.16.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
- package/quick-commands.json +1 -1
- package/skills-template/SKILL.md +4 -8
package/README.md
CHANGED
|
@@ -97,11 +97,11 @@ npx csg
|
|
|
97
97
|
生成的 Skill 内置 `cnb skills list`,用于列出本地 skills:
|
|
98
98
|
|
|
99
99
|
```shell
|
|
100
|
-
cnb skills list -p -a
|
|
100
|
+
cnb skills list -p -a codebuddy --json
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
| 参数 | 说明 |
|
|
104
104
|
| --- | --- |
|
|
105
105
|
| `--json` | 以 JSON 输出 |
|
|
106
106
|
| `-p` | 查询项目(仓库)级 skills |
|
|
107
|
-
| `-a
|
|
107
|
+
| `-a codebuddy` | 按 agent 过滤(此处为当前 NPC 的 agent 名) |
|
package/package.json
CHANGED
package/quick-commands.json
CHANGED
|
@@ -36,6 +36,6 @@
|
|
|
36
36
|
{ "shortName": "get-files", "realTool": "get-pr-files", "description": "获取 PR 附件", "repoOnly": true, "dataTip": "--file-path 附件路径" }
|
|
37
37
|
],
|
|
38
38
|
"skills": [
|
|
39
|
-
{ "shortName": "list", "realTool": "__skills-list__", "description": "列出本地 skills", "custom": true, "dataTip": "-p -a
|
|
39
|
+
{ "shortName": "list", "realTool": "__skills-list__", "description": "列出本地 skills", "custom": true, "dataTip": "-p -a codebuddy --json" }
|
|
40
40
|
]
|
|
41
41
|
}
|
package/skills-template/SKILL.md
CHANGED
|
@@ -16,18 +16,14 @@ description: CNB 平台交互命令,支持代码仓库、Issue、PR、CI、制
|
|
|
16
16
|
- **多行用单引号**:bash 参数为多行文本时用单引号,降低命令注入风险。
|
|
17
17
|
- **范围限本仓**:快捷命令仅限当前仓库的当前 Issue/PR,跨仓库或跨编号请参考「更多 API」。
|
|
18
18
|
- **提及不召唤**:评论中直接 @npc 会召唤 npc;仅提及不召唤时,用反引号包裹 `@npc`。
|
|
19
|
+
NPC 的触发条件见 `cnb-npc-search`,单独 `@仓库名` 不会触发。
|
|
19
20
|
|
|
20
21
|
## 取正文里的图片与附件
|
|
21
22
|
|
|
22
|
-
评论正文里的图片、附件 URL,一律用 `get-imgs` / `get-files`
|
|
23
|
+
评论正文里的图片、附件 URL,一律用 `get-imgs` / `get-files` 取回,URL 从 `list-comments` 原文取:
|
|
23
24
|
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
- **参数取 URL 的尾段**:
|
|
27
|
-
- 图片取 `/imgs/<issues|pulls>/` 之后的部分
|
|
28
|
-
- 附件取 `/files/<issues|pulls>/` 之后的部分
|
|
29
|
-
- **URL 从 `list-comments` 原文取**:
|
|
30
|
-
不要去 `find` 本地文件,也不要猜域名。
|
|
25
|
+
- **参数取 URL 的尾段**:图片取 `/imgs/<issues|pulls>/` 之后的部分,附件取 `/files/<issues|pulls>/` 之后的部分
|
|
26
|
+
- **CLI 内置鉴权**:手写 `Authorization: Bearer` 或 `token` 都不被识别,只会拿到 400
|
|
31
27
|
|
|
32
28
|
## 常用链接
|
|
33
29
|
|