在 Antigravity 中安裝及使用 Google Cloud Developer 外掛程式

1. 簡介

d885ca68e4ec9bca.png

代理程式技能是輕量級的開放格式,可運用專業知識和工作流程擴充 AI 代理的功能。MCP 是將 AI 應用程式連結至外部系統的標準。

代理外掛程式規格是一種開放式規格,不限供應商,可將代理技能MCP 伺服器封裝成可攜式外掛程式。

Google Cloud 外掛程式套件 (適用於 AI 程式碼代理):將相關的 Google Cloud 技能和 MCP 伺服器封裝成可安裝的套件,讓 Google Cloud 上的 AI 代理更有效率。

在本程式碼研究室中,您將瞭解其中一個外掛程式「Google Cloud Developer 外掛程式」,以及如何在 Antigravity 中安裝及使用這個外掛程式。

學習內容

  • 瞭解代理程式外掛程式。
  • 在 Antigravity 中安裝及探索 Google Cloud Developer 外掛程式。
  • 使用幾個提示,測試 Google Cloud Developer 外掛程式安裝的技能和 MCP 伺服器。

軟硬體需求

  • 網路瀏覽器,例如 Chrome。
  • Google Cloud 專案。
  • 本機電腦上已安裝 Antigravity 和 Antigravity CLI。

2. 探索代理程式外掛程式

代理外掛程式是一種可攜式套件格式,可將代理技能MCP 伺服器封裝到類似下方的目錄中:

my-plugin/
├── plugin.json
├── skills/
│   └── my-skill/
│       ├── SKILL.md
│       ├── scripts/
│       └── references/
├── mcp.json
└── com.example.client/
  • plugin.json 代表外掛程式。
  • skills/ 包含代理程式技能。
  • mcp.json說明 MCP 伺服器。
  • 反向網域擴充功能命名空間可讓個別用戶端新增自訂行為。

Google 代理技能存放區包含 Google 產品和技術的代理技能,包括 Google Cloud。此外,還包含 外掛程式,可將代理程式技能和 MCP 伺服器打包成可安裝的套件,例如 Cloud Developer外掛程式。

Google Cloud Developer 外掛程式會為程式碼編寫代理程式提供 Google Cloud 指引,包括:第一個專案的入門、驗證和憑證選取,以及 gcloud CLI 指令的安全關鍵驗證。包括 Google Developer Knowledge MCP 伺服器,可提供最新且有根據的 Google Cloud 說明文件。

3. 安裝 Google Cloud 開發人員外掛程式

Antigravity CLI 是安裝整個 Antigravity 生態系統 (Antigravity、Antigravity CLI、Antigravity IDE) 代理程式外掛程式最簡單的方式。

讓我們在 Antigravity CLI 中安裝 Google Cloud 開發人員外掛程式,並指向其路徑:

agy plugin install https://github.com/google/skills/plugins/cloud/google-cloud-developer

您應該會看到已安裝的外掛程式,以及一些技能和 MCP 伺服器:

Cloning plugin from https://github.com/google/skills.git...
  [ok]    google-cloud-developer
           skills      : 5 processed
          - agents      : skipped (not found)
          - commands    : skipped (not found)
           mcpServers  : 1 processed
          - hooks       : skipped (not found)

4. 探索 Google Cloud 開發人員外掛程式

現在來瞭解 Google Cloud Developer 外掛程式

首先,請檢查外掛程式是否列於 Antigravity CLI 中:

agy plugin list
{
  "imports": [
    {
      "name": "google-cloud-developer",
      "source": "antigravity",
      "importedAt": "2026-09-04T10:41:05Z",
      "components": [
        "skills",
        "mcpServers"
      ]
    }
  ]
}

Antigravity CLI 會將外掛程式全域安裝在 .gemini/config/plugins/ 資料夾中。也就是說,外掛程式適用於 Antigravity、Antigravity CLI 和 Antigravity IDE。

.gemini/config/plugins/google-cloud-developer 資料夾中,您會找到 Google Cloud Developer 外掛程式,其中包含外掛程式資訊清單檔案、技能和 MCP 伺服器:

google-cloud-developer/
├── ...
├── skills/
│   ├── finding-google-skills/
│   ├── gcloud/
│   ├── google-cloud-recipe-auth/
│   ├── google-cloud-recipe-onboarding/
│   └── retrieving-developer-knowledge/
├── mcp.json
└── plugin.json

您將學到如何完成第一個專案的入門程序、驗證及選取憑證,以及如何驗證 gcloud CLI 指令是否安全無虞。此外,這項服務也包含 Google Developer Knowledge MCP 伺服器,可提供最新且有根據的 Google Cloud 說明文件。

你也可以切換至 Antigravity,並在對話中詢問已安裝哪些技能:

Which skills are available?

清單中應會列出內建的 Antigravity 技能,以及 Google Cloud Developer 外掛程式的技能:

...

2. Google Cloud Developer Plugin Skills
Installed via the google-cloud-developer plugin in 
~/.gemini/config/plugins/google-cloud-developer/skills/:

finding-google-skills: Dynamically locates and loads specialized Google product skills on-demand from the remote catalog index (e.g., GKE, BigQuery, Vertex AI, Firebase).

gcloud: Validation guardrails, syntax rules, and data reduction for executing gcloud CLI commands safely.

google-cloud-recipe-auth: Guidance on authentication and authorization patterns (ADC, service accounts, IAM, and workload identity).

google-cloud-recipe-onboarding: Step-by-step walkthrough for onboarding new Google Cloud projects, billing accounts, and first deployments.

retrieving-developer-knowledge: Integration with the developer-knowledge MCP server to retrieve official Google developer documentation and API references.

此外,前往「設定」>「自訂」,你應該也會看到這些技能:

a320a149dcd6452b.png

注意:在「自訂」中,有一個「已安裝的 MCP 伺服器」部分,但目前不會顯示 MCP 伺服器是外掛程式的一部分:

b4601ca58751392b.png

不過,您可以在即時通訊中詢問 Antigravity 有關 MCP 伺服器的問題:

Which MCP servers are available?

外掛程式安裝完成後,應該會辨識出 Developer Knowledge MCP

Based on your Antigravity configuration and cached tool definitions, here are the MCP servers and their statuses:

1. Actively Configured Plugin Server
Configured in 
~/.gemini/config/plugins/google-cloud-developer/mcp.json
:

developer-knowledge
Type / URL: Streamable HTTP (https://developerknowledge.googleapis.com/mcp)

Provided Tools:

search_documents: Search official Google developer documentation
get_documents: Retrieve document content
answer_query: Synthesize developer query answers

5. 練習使用 Google Cloud 開發人員外掛程式

啟用 Developer Knowledge API

首先,請確認 Google Cloud 專案已啟用 Developer Knowledge APIDeveloper Knowledge MCP 伺服器需要這個項目:

  1. 在 Google Cloud 控制台中,搜尋「Developer Knowledge API」
  2. 在「Developer Knowledge API」頁面中,按一下「啟用 API」

現在來試試一些提示,看看 Google Cloud Developer 外掛程式在不同情境中如何提供協助。

這項外掛程式已在全球推出,因此您可以在 Antigravity 或 Antigravity CLI 中試用這些提示。

新手上路

如果您是 Google Cloud 新手,可以先提出基本入門問題:

I'm new to Google Cloud. How can I create a new project with billing enabled?

畫面上應會顯示已啟用的 google-cloud-recipe-onboarding 技能:

Worked for 1m ˅

Explored 1 file ˅

> Analyzed google-cloud-recipe-onboarding/SKILL.md

你應該會收到回覆,內含逐步說明:

To get started with Google Cloud, you will need an active Google Cloud account and an authorized terminal session:

Google Cloud Account & Console: If you haven't already, sign up and access the Google Cloud Console where you can manage accounts, projects, and set up a Cloud Billing account (new accounts are eligible for the $300 Free Trial).
...

驗證

嘗試詢問驗證相關問題:

How can I authenticate my local machine with Google Cloud?

畫面上應會顯示已啟用的 google-cloud-recipe-auth 技能:

Worked for 1m ˅

Explored 1 file ˅

> Analyzed google-cloud-recipe-auth/SKILL.md

系統應會提供驗證指令:

To authenticate your local machine with Google Cloud, there are two primary methods depending on whether you want to use the CLI or run code/client libraries locally:

1. Authenticate the CLI (gcloud)
Use this to run gcloud, bq, and gsutil management commands in your terminal:

bash


gcloud auth login
This opens a web browser asking you to log in with your Google Account and grant permissions.
If you are on a remote server without a web browser, use:
bash

...

開發人員知識

你也可以提出問題,讓 AI 從官方文件尋找解答。

例如:

What's the difference between Cloud Run and GKE according to the official docs?

系統會啟用相關技能,進而使用 developer-knowledge MCP 伺服器:

Exploring 2 files ˅

* Analyzed retrieving-developer-knowledge/SKILL.md
* Analyzed answer_query.json

MCP Tool: developer-knowledge / answer_query ˅

Tool arguments
```json
{
  "query": "What is the difference between Cloud Run and Google Kubernetes Engine (GKE) according to official Google Cloud documentation?"
}

尋找其他 Google 技能

最後,Google Cloud Developer 外掛程式可以隨選探索及載入技能。

例如,可以詢問:

I want to start using Firebase

您應該會看到 finding-google-skills 技能已啟用,並找到及安裝相關的 Firebase 技能:

Explored 1 file ˅

* Analyzed finding-google-skills/SKILL.md

Ran `curl -sS https://raw.githubusercontent.com/google/skills/main/index.json | jq -r '.skills[ >`

Exploring 3 files, 2 searches ˅

* Reading skills catalog
* Searched firebase
* Fetching Firebase skill

6. 清除

停用 Developer Knowledge API:

  1. 在 Google Cloud 控制台中,搜尋「Developer Knowledge API」
  2. 在「Developer Knowledge API」頁面中,依序點選「管理」和「停用 API」

使用 Antigravity CLI 解除安裝 Google Cloud Developer 外掛程式

agy plugin uninstall google-cloud-developer
Uninstalled plugin "google-cloud-developer"

7. 恭喜

恭喜!您已成功在 Antigravity 中安裝及使用 Google Cloud Developer 外掛程式。詳情請參考下列資源: