agent-platform-deploy
它能做什么
它会把 Model Garden 中的开源模型或你自己的权重部署到推理端点,检查部署状态,并在完成后删除相关资源。适合希望在 Google Cloud 上托管模型的开发者。
适用场景
- ✓当你想把 Model Garden 中的开源模型部署到端点时。
- ✓当你想检查仍在进行中的部署时。
- ✓当你想取消部署并删除端点以清理资源时。
技能链接
https://github.com/google/skills/blob/main/skills/cloud/agent-platform-deploy/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把 Model Garden 中的一个开源模型部署到我项目的端点,并先告诉我每小时的费用。”
每周 5 个新技能,1 分钟读完。
工作原理
它会检查模型是否可以部署并列出选项,显示包含命令和预估费用的确认卡片,并且只在你批准后才运行部署。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Agent Platform Model Garden Deploy Skill
This skill provides instructions for deploying Open Models from Agent Platform Model Garden to endpoints, and subsequently undeploying them to clean up resources.
1P Tuned Model Copy & Deployment
If you need to copy a 1P (First-Party) Tuned Model from a source project to a destination region or project and deploy it to a newly created endpoint, refer to the 1P Tuned Model Copy & Deployment Guide.
Safety & Confirmation Tiers (CRITICAL)
Before executing any commands on behalf of the user, you MUST adhere to the following safety tiers based on the action requested:
- Tier R: Read-only (
list,describe,list-deployment-config)- Rule: No confirmation needed. You may execute these commands immediately to gather information for the user.
- Tier M: Mutating & Reversible (
deploy,undeploy-model)Rule: This requires explicit user confirmation. You MUST present a clear dry-run confirmation card containing:
- Exact proposed
gcloudcommand code block (gcloud ai model-garden models deploy ... --asynchronous). - Model identifier, destination project ID, and target region.
- Machine type and accelerator configuration.
- Estimated hourly cost ($/hr).
- Endpoint display name.
- Explicit confirmation prompt asking the user to approve before
execution.
You MUST wait for their explicit confirmation before executing. For
undeploy-model, you MUST first verify that the endpoint and deployed model exist; ifdescribeorlistreturns a 404 or empty result, you MUST halt and inform the user rather than attempting undeployment.
- Exact proposed
Same-turn restriction: Do not run the command in the same turn as presenting the confirmation prompt. End your turn after asking and wait for the user's reply; only execute after explicit approval. Printing a preview and then calling the tool before the user can answer does not count as obtaining confirmation.
- Tier D: Destructive & Irreversible (
delete)- Rule: This requires explicit typed confirmation. You MUST output a text message explaining the irreversible nature of endpoint or model deletion and asking the user to type "I confirm" or "Yes, delete it" before executing the deletion command.
[!IMPORTANT]
Always Output Complete Text Response (NEVER Emit Empty Text): After executing any tool call (such as
gcloud ai model-garden models deploy,gcloud ai endpoints delete,gcloud ai endpoints list, or status checks), you MUST formulate and return a complete, informative textual response to the user. Explicitly report the operation name, endpoint name/ID, error message, or list of resources. NEVER finish a turn with empty text or silence.
1. Prerequisites
Before deploying, ensure you have the correct project and region set. The
commands below use placeholder variables PROJECT_ID and LOCATION_ID.
Ensure you are authenticated:
gcloud auth login
gcloud auth application-default login
gcloud config set project $PROJECT_ID
2. Discovering Deployable Models
You can list models available in Model Garden and check if they can be self-deployed.
gcloud ai model-garden models list
To see what machine types and accelerators are supported for a specific model,
pass a MODEL_ID you obtained from the models list output above. Substitute
<PUBLISHER>/<FAMILY>@<VERSION-ID> below with the exact string from the catalog
output — the placeholder is deliberately not a real model ID:
gcloud ai model-garden models list-deployment-config \
--model="<PUBLISHER>/<FAMILY>@<VERSION-ID>"
[!NOTE] Some models, especially Hugging Face models, might require a Hugging Face Access Token for deployment.
[!TIP] Model Recommendation Instructions: Whenever you are about to name a specific model version in a response, do NOT recommend from memory. This applies in all of the following situations — not just direct deploy requests:
- The user asks to deploy a model without naming one.
- You are volunteering a next-step suggestion after a
list,describe, orundeployoperation (e.g. "Would you like me to deploy<model>to this endpoint?").- The user asks a general
常见问题
它会不经询问就部署吗?
不会。部署前,你需要先看到命令、机器类型和预估的每小时费用,并明确确认。
它能列出可用的模型吗?
可以。它可以列出 Model Garden 目录,并检查某个模型能否部署。
它如何清理资源?
它可以取消部署模型并删除其端点。
详情
作者的原始描述
Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up resources by undeploying models and deleting endpoints. Use when asked to actively deploy a model, list the Model Garden CATALOG of available models, check if a specific model is deployable (`gcloud ai model-garden models list-deployment-config`), query deployment cost, troubleshoot deployment errors (like quota limits), or undeploy/clean up endpoints. Also use when copying and deploying a 1P Tuned Model. Don't use for pure listing/discovery q
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10200
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
finding-google-skills
22k帮你的智能体为某项设置任务找到合适的 Google 指南,例如托管、数据库、存储、登录或 AI 模型服务。
gcloud
22k帮你的智能体编写并检查 Google Cloud gcloud 命令,在运行任何内容之前查阅准确的语法,避免猜测参数。
google-cloud-recipe-auth
22k引导你的智能体了解 Google Cloud 的身份与访问管理,包括人员和服务如何登录,以及它们各自获得哪些权限。
google-cloud-recipe-onboarding
22k带领新开发者完成在 Google Cloud 上的第一步,包括选择项目、关联计费,以及部署第一个资源。