Skill 管理
本页说明 skill 的日常生命周期:查看 catalog、安装可信 skill 目录、删除 managed skills、 重新加载正在运行的 gateway,以及控制 skill 可见性。
Runtime 模型和 SKILL.md 格式见 Skills 系统。编写 skill 见
Skill 编写。
列出 Skills
用 CLI 查看当前 home 的 catalog:
anyy skills list
anyy skills list --home ~/.anyy
anyy skills list --json
这个列表使用与 runtime 相同的 root 顺序:
<home>/skillsskills.external_roots[]- 如果存在,
~/.agents/skills <home>/system/skills
在 TUI 或暴露 gateway commands 的 runtime client 中使用:
/skills
模型可见的等价入口是 skills_list,它返回 compact metadata,并可按 category 过滤。
查看 Skills
查看 skill 主指令:
anyy skills view release-checklist
查看支撑文件:
anyy skills view release-checklist references/workflow.md
Slash-command 等价入口是:
/skill release-checklist
模型可见的等价入口是 skill_view,可使用 name 或 id,并可传入可选
file_path。
安装来源
anyy skills install 会写入 managed root:<home>/skills,并在
<home>/skills/.manifest.json 记录来源信息。
支持的来源:
| 来源 | 示例 | 说明 |
|---|---|---|
| 本地 skill 目录 | anyy skills install ./release-checklist | 目录必须包含一个有效的 SKILL.md。 |
公开 HTTPS SKILL.md | anyy skills install --name release-checklist https://example.com/SKILL.md | 需要 --name;下载的 SKILL.md 必须 self-contained。 |
| GitHub skill directory | anyy skills install github:owner/repo/path@main | 通过 GitHub API 获取 committed files,并记录 commit provenance。 |
| GitHub URL | anyy skills install https://github.com/owner/repo/tree/main/path | 等价于 GitHub shorthand。 |
| GitHub collection | anyy skills install --all github:owner/repo 或 anyy skills install github:owner/repo/* | 安装每个包含 SKILL.md 的候选目录;被阻止的候选会在结果中报告。 |
如果同名 skill 已经存在,使用 --force 替换:
anyy skills install --force ./release-checklist
导入使用 source-specific tool names 或 paths 的 skills 时,可以用 rewrite profile 机械适配常见 措辞:
anyy skills install --rewrite-profile PROFILE github:owner/repo/path@main
未知 profile name 会被拒绝。Rewrite 只是机械替换;依赖前仍应 review 导入内容。
安装安全边界
Managed install 有意比任意 repository checkout 更窄:
- 远程单文件安装必须使用 HTTPS,并指向
SKILL.md。 - 远程 URL 不能包含凭据。
- 指向 localhost、private networks、link-local networks 或 internal hostnames 的远程 URL 会被阻止。
- 单个远程
SKILL.md下载上限为 2 MiB。 - GitHub install 会拒绝 symlink、不支持的 tree entry、path escape、超过 2 MiB 的单文件、 超过 8 MiB 的 bundle,以及超过 256 个文件的 bundle。
- GitHub install 会扫描 staged content。Dangerous finding 会阻止安装;caution finding
需要
--force。
Scanner 会标记这些模式:网络下载 pipe 到 shell、rm -rf /、authorized_keys、
/etc/sudoers、本地 secret paths、assets 之外的 binary content、带 executable bit 的
regular file,以及请求 allowed-tools 的 front matter。
卸载 Skills
Uninstall 会删除 managed skill directory 和 manifest entry:
anyy skills uninstall release-checklist
这个命令只卸载 <home>/skills 下的 managed skills。System skills 和 external-root skills
不会被 managed uninstall 删除。Manager 也会拒绝卸载 symlinked skill directory。
重新加载运行中的 Gateway
会修改磁盘状态的 CLI 命令可以用 --now 让运行中的 gateway 立刻 reload:
anyy skills install --now ./release-checklist
anyy skills uninstall --now release-checklist
--now 会在磁盘变更成功后,通过配置的 Unix socket 调用 gateway。
也可以显式 reload:
anyy skills reload
anyy skills reload --socket ~/.anyy/anyy.sock
Reload 会从磁盘刷新 skill configuration,重建 scoped catalog,并返回 added、removed、 changed、unchanged 和 total counts。
不带 --now 安装 skill 会立即更新磁盘文件,但运行中的 gateway 会继续使用当前 catalog,
直到 reload 或 restart。
External Roots
如果你在 Anyy managed root 之外维护 skills,使用 skills.external_roots:
skills:
external_roots:
- ~/.agents/skills
- ${TEAM_SKILLS_ROOT}
路径支持 ~、$VAR 和 ${VAR} 展开。环境变量缺失时,该 root 会被跳过。External roots
在 <home>/skills 后扫描,因此本地 managed skill 会覆盖同名 shared skill。
模型可见的 skill_manage 工具有 add_external_root action。它通过 Anyy setup
helper 写入 skills.external_roots;当请求 rewrite profile 时,也可以 materialize 一个
rewritten generated view。
Disable 或 Re-enable Skill
可见性通过 config.yaml 控制:
skills:
disabled:
- skill_user_abc123
disabled_by_surface:
tui:
- noisy-helper
api:
- /internal-command
条目可以是 skill ID、skill name 或 command name。Gateway 的 skills.toggle RPC 会把精确
skill ID 写入 skills.disabled,reload catalog,并审计这次变更。System skills 不能通过
该 RPC toggle off。
当前 build 没有 anyy skills enable 或 anyy skills disable CLI command。请编辑
config.yaml,或使用调用 skills.toggle 的本地 client。
Agent-Managed Skills
启用 skills toolset 时,assistant 可以通过 skill_manage 管理 profile-local skills。支持的
actions:
| Action | 用途 | 关键参数 |
|---|---|---|
install | 从支持的来源安装 | source,可选 name、force、all、rewrite_profile、reload |
uninstall | 删除 managed skill | name,可选 reload |
reload | 重新加载 runtime catalog | 无 |
add_external_root | 添加只读 external skill root | path,可选 rewrite_profile、reload |
create | 创建新的 managed skill | name、content,可选 force、reload |
edit | 替换已安装 managed skill 的 SKILL.md | name、content,可选 reload |
patch | 替换 SKILL.md 或支撑文件里的文本 | name、old_string、new_string,可选 file_path、replace_all、reload |
delete | 删除 managed skill | name,可选 reload |
write_file | 写支撑文件 | name、file_path、file_content,可选 reload |
remove_file | 删除支撑文件 | name、file_path,可选 reload |
Agent writes 只写 managed root。支撑文件写入必须位于 references/、templates/、
scripts/ 或 assets/ 下。该工具会按 high-risk skill change 审计,但不会给 skill
授予任何新的工具权限。