cnb-rs skill list
cnb-rs skill list [options]
cnb-rs skill ls [options] # alias列出已装的 cnb skill(即 lockfile 中 sourceType: "cnb" 的 entry)。
gh skill / vercel-skills 装的 entry 不显示 —— 让对应工具自己 list;但它们写的字段在 ~/.agents/.skill-lock.json 中原样保留(pass-through),不会被 cnb-rs 任何操作清除。
选项
--json:完整 lockfile entry JSON 数组输出,便于脚本调用
输出示例
默认(人类可读表格)
$ cnb-rs skill list
2 cnb skill(s) installed:
SKILL SOURCE REF AGENTS
----- ------ --- ------
skill-foo cnb:wwvo/cnb-rs/cnb-rs-skills main claude-code,windsurf
skill-bar cnb:wwvo/cnb-rs/cnb-rs-skills v1.0.0 claude-code
(lockfile: /home/alice/.agents/.skill-lock.json)空 lockfile
$ cnb-rs skill list
(无已安装 cnb skill;lockfile: /home/alice/.agents/.skill-lock.json)--json 输出
json
$ cnb-rs skill list --json
[
{
"name": "skill-foo",
"entry": {
"source": "wwvo/cnb-rs/cnb-rs-skills",
"sourceType": "cnb",
"sourceUrl": "https://cnb.cool/wwvo/cnb-rs/cnb-rs-skills.git",
"host": "cnb.cool",
"ref": "main",
"skill_root": "skills/skill-foo",
"skill_path": "skills/skill-foo/SKILL.md",
"skill_file_sha": "a1b2c3...",
"files": [
{ "path": "SKILL.md", "sha": "a1b2c3...", "size": 1234 },
{ "path": "references/api.md", "sha": "d4e5f6...", "size": 5678 }
],
"installedAt": "2026-05-20T07:40:00Z",
"updatedAt": "2026-05-20T07:40:00Z",
"installedAgents": ["claude-code", "windsurf"],
"installMode": "symlink",
"pinnedRef": null
}
}
]示例
bash
# 列出所有 cnb skill
$ cnb-rs skill list
# alias 短写
$ cnb-rs skill ls
# JSON 输出供 jq 提取 skill 名
$ cnb-rs skill list --json | jq '.[].name'
# 提取所有 ref 不是 main 的(pinned / tag 锁定)
$ cnb-rs skill list --json | jq '.[] | select(.entry.ref != "main") | .name'退出码
0:列表打印成功(空 lockfile 也算成功)1:lockfile 读取失败 / JSON 序列化失败
与 gh skill list 的差异
| 特性 | cnb-rs skill list | gh skill list |
|---|---|---|
| 范围 | 仅 sourceType: "cnb" 的 entry | 仅 sourceType: "github" |
| pass-through | ✅ gh / vercel entry 保留但不显示 | ✅ 同 |
--json 完整 entry | ✅ 含 files + sha + installedAgents 等 | ✅ schema v3 一致字段 |
| 默认表格输出 | ✅ SKILL / SOURCE / REF / AGENTS 4 列 | ✅ |
另请参阅
- cnb-rs skill
- cnb-rs skill install — install 后写 lockfile
- agentskills.io — skill 规范