跳转到内容
AggregaAggrega
选择语言: 简体中文
本页面由机器翻译。阅读英文原文。

aggrega skills

将 Aggrega 技能安装到 AI 助手中

概要

aggrega skills

说明

Install the skill that teaches an AI assistant to install and use Aggrega.
A skill is a folder holding a SKILL.md file in the open Agent Skills format,
which many assistants read from a skill folder of their own. The Aggrega skill
tells an assistant how to install Aggrega, how to connect it to the aggrega MCP
server, how to start a workspace, and how to run the authoring loop — scaffold,
validate, build. It carries no copy of any schema: it sends the assistant to
this binary for every structural question and to the published documentation
for every conceptual one.
The skill is built into this binary, so the copy it installs matches the
version you have.

子命令

命令描述
aggrega skills install将 Aggrega skill 写入 AI 助手的 skill 文件夹
aggrega skills list列出此二进制文件附带的 skills 以及可以为其安装这些 skills 的助手

aggrega skills install 说明

Write the Aggrega skill into the skill folder of each assistant named with
--agent, so the assistant knows how to install and use Aggrega.
By default the skill goes into the assistant's project skill folder at the root
of your workspace — the one found from the directory you run the command in, or
named with --workspace-root; a directory no workspace marks is its own root —
which is where a project's own skills are committed. With --global it goes
into the assistant's per-user skill folder in your home directory instead,
where the assistant reads it in every project.
Every folder and file a project installation writes is held to the workspace:
a skill folder reached through a link leading out of it is refused, and
nothing is written.
--agent may be given more than once. Where several of the named assistants read
the same folder, the skill is written there once.
With --global and no --agent, the skill is installed for the assistants found
on this machine: each one whose configuration folder is in your home directory
or whose command is on your PATH, as the table below names them. The command
prints each assistant it found and what found it. At a terminal it then asks
before writing: press Enter to install for those, or type the identifiers of
other assistants to add them. Where standard input is not a terminal it
installs for the assistants found without asking. Where it finds none and is
given none, it writes nothing and says so. A project installation is for the
assistants a project's people use rather than those on one machine, so it
always names them with --agent.
The skill is written as a folder named aggrega holding SKILL.md, and every file
written carries a comment line saying where it comes from. Running the command
again replaces a copy carrying that line, which is how a newer aggrega brings
the skill up to its own version. A file at the target that does not carry it
was not written by this command, so the command refuses, names the file and
writes nothing; move it aside or remove it, then run the command again. Every
target is checked before anything is written, so a refusal leaves every folder
as it was.
The assistants it installs for, the folders each one reads, and what finds each
on this machine — its configuration folder in your home directory, or its
command on your PATH:
--agent assistant project folder per-user folder found by
amp Amp .agents/skills ~/.config/amp/skills ~/.config/amp, amp
antigravity Antigravity .agents/skills ~/.gemini/config/skills ~/.gemini/antigravity, antigravity
antigravity-cli Antigravity CLI .agents/skills ~/.gemini/antigravity-cli/skills ~/.gemini/antigravity-cli
claude-code Claude Code .claude/skills ~/.claude/skills ~/.claude, claude
cline Cline .cline/skills ~/.cline/skills ~/.cline, cline
codex Codex .agents/skills ~/.agents/skills ~/.codex, codex
cursor Cursor .cursor/skills ~/.cursor/skills ~/.cursor, cursor
gemini-cli Gemini CLI .gemini/skills ~/.gemini/skills gemini
github-copilot GitHub Copilot .github/skills ~/.copilot/skills ~/.copilot, copilot
goose Goose .agents/skills ~/.agents/skills ~/.config/goose, goose
opencode OpenCode .opencode/skills ~/.config/opencode/skills ~/.config/opencode, opencode
windsurf Windsurf .devin/skills ~/.codeium/windsurf/skills ~/.codeium/windsurf, windsurf
zed Zed .agents/skills ~/.agents/skills ~/.config/zed, zed
An assistant that is not listed is refused by name. It can still use Aggrega
through its MCP server: connect it to "aggrega mcp" as
https://aggrega.ai/docs/install/ describes.

aggrega skills install 标志

标志默认值描述
--agent[]要为其安装 skill 的助手,按标识符指定(例如 claude-code、codex、cursor 或 gemini-cli)。可重复指定;帮助会列出每个标识符及其写入的文件夹。不带 —global 时为必填;带 —global 且未指定任何助手时,skill 会安装到在本机上找到的助手。
--globalfalse安装到主目录中每个助手的用户级 skill 文件夹(助手会在每个项目中读取它),而不是工作区根目录下的项目 skill 文件夹。

aggrega skills list 说明

List the skills built into this binary, and the assistants "aggrega skills
install" can write them for, with the project folder and the per-user folder
each assistant reads skills from. It writes nothing.

功能说明

aggrega skills install 将 Aggrega skill 写入你用 --agent 指明的每个 AI 助手的 skill 文件夹;带 --global 且未指定 --agent 时,则写入它在本机上找到的每个助手的 skill 文件夹。skill 是一个文件夹,其中包含一个采用开放 Agent Skills 格式的 SKILL.md 文件:一个简短的 frontmatter 块,指明 skill 的名称并说明何时使用它,后面是说明内容。读取 skills 的助手会在你的请求与之匹配时加载它,从而知道如何安装 Aggrega、如何连接到 aggrega mcp、如何开始一个工作区,以及如何运行编写 Aggrega 文件中描述的编写循环。

skill 不携带任何 schema 或实体契约的副本。它告诉助手向二进制文件询问每个结构性问题的答案——服务器已连接时使用 MCP 工具,否则使用 aggrega 命令行——并阅读已发布的文档来了解各项内容的含义。skill 内置于二进制文件中,因此它写出的副本与你已安装的版本相匹配。

Terminal window
aggrega skills install --agent claude-code
Installed the aggrega skill for Claude Code at /home/you/project/.claude/skills/aggrega

skill 的安装位置

不带 --global 时,skill 会进入工作区根目录下该助手的项目 skill 文件夹,助手会在那里查找项目的 skills,你也会在那里提交它们。工作区就是每个命令都会找到的那个——由 --workspace-root 指明的工作区,或从你运行命令所在的目录找到的工作区,因此从子文件夹运行仍会安装到根目录——没有任何工作区标记的目录就是它自己的根。带 --global 时,它会进入主目录中该助手的用户级 skill 文件夹,助手会在每个项目中读取它。上面说明中的表格给出了每个助手的这两个文件夹;每个都是该助手自己的文档所指明的文件夹,~ 代表你的主目录。

有几个助手读取共享的 .agents/skills 文件夹。指明其中多个助手时,skill 只在那里写入一次,并在报告它的那一行中列出所有这些助手:

Terminal window
aggrega skills install --agent codex --agent zed --global
Installed the aggrega skill for Codex and Zed at /home/you/.agents/skills/aggrega

本机上的助手

带 --global 且未指定 --agent 时,该命令会为它在本机上找到的助手安装 skill。当某个助手自己的配置文件夹位于你的主目录中,或其命令位于你的 PATH 上时,该助手即视为已找到;上文说明中表格的 found by 列为每个助手列出了这两者。一个文件夹或命令只有在仅属于该助手时才会被使用,因此找到它绝不代表找到了另一个助手:共享的 .agents/skills 文件夹不会找到任何助手,而 Gemini CLI 和 Antigravity 都在其中存放文件的 .gemini 则两者都不会找到——Gemini CLI 通过其 gemini 命令找到,每个 Antigravity 产品则通过 .gemini 下它自己的文件夹找到。配置位于系统其他位置的助手,可通过其命令找到,或用 --agent 指明。

该命令会打印它找到的每个助手以及找到它的依据,然后进行安装:

Terminal window
aggrega skills install --global
Found Claude Code (claude-code), from the folder /home/you/.claude
Found Codex (codex), from the command /usr/local/bin/codex
Installed the aggrega skill for Claude Code at /home/you/.claude/skills/aggrega
Installed the aggrega skill for Codex at /home/you/.agents/skills/aggrega

在终端中,它会先询问。 在列出所找到内容的几行之后,它会请你确认:按 Enter 为这些助手安装,或输入其他助手的标识符(以空格或逗号分隔)以添加它们。如果一个都没有找到,它会改为询问标识符,空回答则不写入任何内容。当标准输入不是终端时——脚本、代你运行该命令的助手,或助手自身用于运行该命令的工具——它不会询问任何内容,直接为找到的助手安装。如果既没有找到也没有被指定任何助手,它不写入任何内容,说明这一点,并以非零状态退出。

只要指定了任何 --agent,就会跳过搜索:该命令只为你指定的助手安装,不会为其他助手安装。项目安装(不带 --global)始终要指定助手:它面向的是项目成员所使用的助手,而这一点本机无法告知。

再次安装,以及它会拒绝什么

该命令写入的每个文件都在 frontmatter 之后带有一行注释,说明它来自内置于 aggrega 二进制文件中的 skill,并且再次安装会替换它。该命令正是通过这一行来区分它自己的副本和你的副本:

  • **带有该行的副本会被替换。**升级 Aggrega 后再次运行该命令,会将 skill 更新到新版本,它打印的那一行会显示 Replaced 而不是 Installed。
  • **没有该行的文件会被拒绝。**目标位置上已存在、但不是由该命令写入的 SKILL.md 属于你,因此该命令会指明其路径,不在任何地方写入任何内容,并以非零状态退出。请将该文件移到别处或删除它,然后再次运行该命令。若要保留你自己的修改,请将它们放在另一个名称的 skill 中。
  • **通过指向工作区之外的链接到达的文件夹会被拒绝。**不带 --global 时,该命令将要写入的每个文件夹和文件都受限于工作区:如果某个助手的 skill 文件夹,或通往它的路径上的某个文件夹,是指向工作区之外的链接,该命令会指明该链接及其指向,不在任何地方写入任何内容,并以非零状态退出——即 A path the operation writes leads through a link out of the directory it must stay inside(操作写入的路径通过链接越出其必须限定的目录) 中描述的条件。始终位于工作区内的链接会被穿过写入。

在写入任何内容之前会检查每个目标,因此针对某个助手的拒绝也会让其他每个助手的文件夹保持原样。skill 文件夹中不由该 skill 写入的文件不会被改动。

它不认识的助手

--agent 只接受上表中的标识符,每个标识符都是开放的 skills 命令行工具对同一助手使用的标识符。任何其他标识符都会按名称被拒绝,并附上它认识的标识符列表。未列出的助手仍然可以使用 Aggrega:按照连接 MCP 服务器中的描述将其连接到 MCP 服务器,它就能访问 skill 所指向的相同工具和参考资料。

示例

为此项目中的 Claude Code 安装 skill:

Terminal window
aggrega skills install --agent claude-code

为你的每个项目中的 Gemini CLI 和 Cursor 安装它:

Terminal window
aggrega skills install --agent gemini-cli --agent cursor --global

为本机上的助手,在你的每个项目中安装它:

Terminal window
aggrega skills install --global

将已安装的副本更新到你刚刚升级到的二进制文件版本:

Terminal window
aggrega skills install --agent claude-code

列出它所知道的内容

aggrega skills list 打印内置于此二进制文件中的 skills 及其说明,然后列出 aggrega skills install 认识的每个助手,以及其项目文件夹和用户级文件夹。它不写入任何内容。

Terminal window
aggrega skills list