Aug 17, 2026

Google 官方的 Agent Skill:为 Google Cloud 工作而生

来自 google/skills 的 70+ skill,覆盖 Gemini API、Agent Platform、BigQuery、GKE、Cloud Run、Well-Architected Framework 等——通过 npx skills add 安装到 Claude Code、Codex、Antigravity 等 AI 编码 agent。

#tutorial#ai-agents#developer-tools#best-practices#deployment

当你让 AI 编码 agent 写 Google Cloud 代码,你通常会拿到看起来像样的 Terraform 与 SDK 调用,但落后一两个版本。Google 官方的 google/skills 仓库就是平台维护者给这个问题交出的答卷:一份精心挑选的 70+ agent skill 合集,覆盖 Gemini、Agent Platform、BigQuery、GKE、Cloud Run、Well-Architected Framework 等,可装在开发者已经在用的 agent 上。

为什么这个 Skill 重要

平台厂商出的 skill 合集有一个特殊权重:它们反映当前的 API、当前的产品边界、当前推荐的模式。第三方合集适合扩展广度,但要在 Google Cloud 上准确,这个合集是源头。

它覆盖你在 GCP 上真正会做的事:

  • AI/ML:Gemini API、Agent Platform、BigQuery AI、Model Garden。
  • 数据:BigQuery、AlloyDB、Spanner、Airflow、数据湖仓参考架构。
  • 基础设施:GKE、网络、Google Cloud 的 Terraform。
  • Serverless 与应用托管:Cloud Run、Firebase。
  • Well-Architected Framework:六大支柱各自一个 skill。
  • 身份与安全:GKE 安全、SecOps、IAM 指导。
  • 运维:Cloud Monitoring、Cloud Logging、成本优化。

任何 Google Cloud 形态的事,这个合集是先查再下提示的清单。

安装

npx skills add google/skills

之后交互式选择要装哪些 skill。装好后,你会在 ~/.agents/skills/(或宿主等价目录)看到已经装好、可加载的 skill。

实战:把 AI 工作负载从 AI Studio 迁到 Agent Platform

真实场景,不是"hello world":你在 AI Studio 做了 agent 原型,现在要把它搬到 Google Cloud 的 Agent Platform,带上规范的 endpoint 管理。

工作流:

  1. 激活 agent-platform-migrate-from-ai-studio 学迁移路径。
  2. 激活 gcloud CLI 相关 skill 做认证与项目设置。
  3. 激活 agent-platform-endpoint-management 把模型部署到 Model Garden。
  4. 激活 cloud-monitoring 把可观测性接上。

给 agent 的提示:

Migrate this AI Studio prototype to Google Cloud's Agent Platform.
Authenticate via gcloud, deploy the model on Model Garden with
endpoint management, and wire up Cloud Monitoring for the new endpoint.
Use the matching skills: agent-platform-migrate-from-ai-studio,
gcloud, agent-platform-endpoint-management, and cloud-monitoring.

预期输出:一份分步迁移计划(项目设置、IAM、endpoint 创建、监控)、具体的 gcloud 调用,以及一份"还剩什么待验证"清单。因为每个 skill 都编码了当前的 Google Cloud 模式,agent 在正确形态上推理——而不是 AI Studio 的形态。

实战:把 Well-Architected Framework 套到一个已有服务

另一个真实场景:你有一个 Cloud Run 服务在跑生产,想按 Google 的 Well-Architected Framework 走一遍,但不想重构所有东西。

工作流:

  1. 把六大 Well-Architected 支柱各激活为一个 skill。
  2. 让 agent 按每个支柱审计你的服务。
  3. 把发现整合为按优先级排序的整改清单。

给 agent 的提示:

Audit this Cloud Run service against the six Well-Architected pillars
(cost, reliability, security, operational excellence, performance,
sustainability). Use the matching skills for each pillar. Produce
a prioritized remediation list with concrete actions.

预期输出:一份结构化审计,每个支柱一段,每段包含"现状"与"行动"。SRE 或安全负责人能复审,因为每条建议都标明它来自哪个支柱。

技巧

  • 挑选性安装。 不要一次装齐 70+;挑项目实际会碰到的类别。agent 上下文窗口有限。

  • gcloud 配合配认证。 这些 skill 都默认 gcloud CLI 已就位。先把 gcloud 跑通,其余都建立在它之上。

  • 周期性重新拉取。 仓库明确说明在活跃开发——skill 会随产品发布而变化。需要稳定就钉版本。

  • 在发布前用 Well-Architected,不要发布后。 它们作为设计辅助最好用;事后改造贵得多。

何时不用这个 Skill

  • 你不在 Google Cloud 上。 这些 skill 明确限定在 Google 产品上。AWS、Azure 或多云的指导,请用别的合集。
  • 你需要 skill 本身有生产 SLA。 帮助"通过 GitHub Issue Tracker"——纯社区,无 SLA。生产关键流程要围绕这点规划。
  • 你想要一个开箱即用的 agent 运行时。 skill 是指令,不是运行时。你要把它们和自己的 agent 宿主(Claude Code、Codex、Antigravity)组合起来。
  • 你需要不可变、可审计的指导。 仓库在活跃开发,可能破坏性变更。如果你的流水线要求不可变 skill 版本,镜像一个具体的 tag。

查看 排行榜 了解更多 skill。