1. 简介

智能体技能是一种轻量级开放格式,可利用专业知识和工作流来扩展 AI 智能体功能。MCP 是一种将 AI 应用连接到外部系统的标准。
智能体插件规范是一种不受制于供应商的开放式规范,用于将智能体技能和MCP 服务器打包到可移植的插件中。
适用于 AI 编码智能体的 Google Cloud 插件将相关的 Google Cloud 技能和 MCP 服务器打包到可安装的软件包中,以便在 Google Cloud 上提供更高效的 AI 智能体。
在此 Codelab 中,您将了解其中一个插件,即 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 服务器打包到可安装软件包(例如 Google Cloud Developer 插件)中。
Google Cloud Developer 插件 为编码智能体提供 Google Cloud 指导:第一个项目的初始配置、身份验证和凭据选择,以及 gcloud CLI 命令的安全关键验证。包括 Google Developer Knowledge MCP 服务器 ,用于提供基于事实的最新 Google Cloud 文档。
3. 安装 Google Cloud Developer 插件
Antigravity CLI 是为整个 Antigravity 生态系统(Antigravity、Antigravity CLI、Antigravity IDE)安装智能体插件的最简单方法。
让我们通过指向其路径在 Antigravity CLI 中安装 Google Cloud Developer 插件:
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 Developer 插件
现在,让我们探索 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.
此外,前往设置 > 自定义 ,您应该也会看到这些技能:

注意 :在“自定义”中,有一个 Installed MCP Servers 部分,但目前它不会将 MCP 服务器显示为插件的一部分:

不过,您可以在聊天中向 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 插件
启用 Developer Knowledge API
首先,确保已在 Google Cloud 云项目 中启用 Developer Knowledge API 。这是 Developer Knowledge MCP 服务器 所必需的:
- 在 Google Cloud 控制台中,搜索 Developer Knowledge API
- 在 Developer Knowledge API 页面中,点击 Enable 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
...
开发者知识
您还可以提出问题,以便从官方文档中获取答案。
例如:
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:
- 在 Google Cloud 控制台中,搜索 Developer Knowledge API
- 在 Developer Knowledge API 页面中,依次点击 Manage 和 Disable API 。
使用 Antigravity CLI 卸载 Google Cloud Developer 插件 :
agy plugin uninstall google-cloud-developer
Uninstalled plugin "google-cloud-developer"
7. 恭喜
恭喜!您已成功在 Antigravity 中安装并使用 Google Cloud Developer 插件。如需了解详情,请查看以下资源:
- 智能体插件
- 智能体插件打包您的技能、工具等
- 包含 Google Cloud 智能体插件的 Google 智能体技能代码库
- Developer Knowledge MCP 服务器