跳到內容
AggregaAggregaAggregaAggrega
選擇語言: 繁體中文
本頁為機器翻譯。閱讀英文原文。

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 — draft,
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 技能寫入 AI 助理的技能資料夾
aggrega skills list列出此二進位檔隨附的技能,以及它可以為其安裝技能的助理

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[]要為其安裝技能的助理,依識別碼指定(例如 claude-code、codex、cursor 或 gemini-cli)。可重複;說明會列出每個識別碼與各自寫入的資料夾。沒有 —global 時為必填;有 —global 而未指定任何一個時,會為這台機器上找到的助理安裝技能。
--globalfalse安裝到每個助理位於你主目錄中的每位使用者技能資料夾,它在每個專案中都會讀取,而不是你工作區根目錄的專案技能資料夾。

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 技能寫入你以 --agent 指名之每個 AI 助理的技能資料夾,或在有 --global 而沒有 --agent 時,寫入它在這台機器上找到的每一個助理。技能是一個資料夾,內含 SKILL.md 檔案,採用開放的 Agent Skills 格式:一個簡短的前置資料區塊,指名該技能並說明何時使用,其後是指示。讀取技能的助理會在你的請求相符時載入它,所以它知道如何安裝 Aggrega、如何連線到 aggrega mcp、如何開始工作區,以及如何執行撰寫 Aggrega 檔案所述的撰寫迴圈。

技能不帶有任何結構描述或實體契約的副本。它告訴助理對每個結構性的答案都詢問二進位檔:在伺服器已連線時使用 MCP 工具,否則使用 aggrega 命令列,並閱讀已發布的文件以了解事物的意義。技能內建於二進位檔中,因此它寫出的副本符合你所安裝的版本。

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

技能放在哪裡

沒有 --global 時,技能會放進助理位於你工作區根目錄的專案技能資料夾,助理會在那裡尋找專案的技能,你也在那裡提交它們。工作區是每個命令所找到的那一個:--workspace-root 所指名的,或從你執行命令的目錄找到的,因此從子資料夾執行仍會安裝在根目錄,而沒有任何工作區標記的目錄就是它自己的根。有 --global 時,它會放進助理位於你主目錄的每位使用者技能資料夾,助理在每個專案中都會讀取。上述說明中的表格列出每個助理的兩個資料夾;每一個都是該助理自己的文件所指名的資料夾,而 ~ 代表你的主目錄。

有幾個助理讀取共用的 .agents/skills 資料夾。指名其中不只一個時,只會在那裡寫入一次技能,並在回報它的那一行中指名全部:

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 時,命令會為它在這台機器上找到的助理安裝技能。助理在其自己的設定資料夾位於你的主目錄,或其命令在你的 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 的專案安裝,一律要指名它們:它是為專案的人所使用的助理而做,而這台機器並不知道這些助理。

再次安裝,以及它拒絕什麼

命令寫出的每個檔案,都在前置資料區塊之後帶有一行註解,說明它來自內建於 aggrega 二進位檔中的技能,而再次安裝會取代它。這一行就是命令區分它自己的副本與你的副本的方式:

  • 帶有該行的副本會被取代。 在升級 Aggrega 之後再次執行命令,會把技能更新到新版本,而它印出的那一行會說 Replaced,而不是 Installed。
  • 沒有該行的檔案會被拒絕。 目標處已有、而命令沒有寫出的 SKILL.md 屬於你,因此命令會指名其路徑,在任何地方都不寫入任何東西,並以非零結束。請把該檔案移開或移除,然後再次執行命令。若要保留你自己的變更,請把它們放在另一個名稱的技能中。
  • 經由通往工作區之外的連結而到達的資料夾會被拒絕。 沒有 --global 時,命令所要寫入的每個資料夾與檔案都限制在工作區內:當助理的技能資料夾,或通往它的某個資料夾,是通往工作區之外的連結時,命令會指名該連結與它通往的位置,在任何地方都不寫入任何東西,並以非零結束,其情況在 A path the operation writes leads through a link out of the directory it must stay inside(操作所寫入的路徑經由連結通往它必須停留之目錄的外面)中說明。留在工作區內的連結則會被寫入通過。

每個目標都在寫入任何東西之前先檢查,因此對某一個助理的拒絕,也會讓其他每個助理的資料夾維持原樣。技能資料夾中技能沒有寫出的檔案不受影響。

它不認識的助理

--agent 只接受上表中的識別碼,每一個都是開放技能命令列工具為同一個助理所使用的識別碼。任何其他識別碼都會依名稱被拒絕,並附上它所認識的識別碼清單。未列出的助理仍可使用 Aggrega:依連接 MCP 伺服器所述把它連線到 MCP 伺服器,它就能取得技能所指向的同樣工具與參考資料。

範例

在此專案中為 Claude Code 安裝技能:

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 印出內建於此二進位檔的技能及其說明,然後是 aggrega skills install 所認識的每個助理,附上其專案資料夾與每位使用者資料夾。它不寫入任何東西。

Terminal window
aggrega skills list