Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Age
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-agent-platform-model-registry-5c0a3af852b2 ,按照其中的说明把「agent-platform-model-registry」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
This skill provides instructions for managing machine learning models in the Agent Platform Model Registry. It covers listing models, describing model details, uploading new models or versions, updating metadata, and deleting models.
Before executing any commands on behalf of the user, you MUST adhere to the following safety tiers based on the action requested:
list, describe, get)
upload, update)
--region=us-central1, --project=...,
--display-name="...") — natural-language paraphrases are NOT
sufficient.upload or update in Turn 1 without prior confirmation is strictly
prohibited.delete)
estimate_cost tool for Model Registry actions, as
estimate_cost is designed for serving infrastructure (endpoints/batch
prediction) and will return an error if called for registry operations. If
including cost in the preview card, state that Model Registry operations
incur no serving compute charges ($0.00 compute charges; standard Cloud
Storage pricing applies to model artifacts).CRITICAL: Before running any commands, verify that all necessary parameters are known:
gcloud config get project or gcloud config get compute/region). If still unresolved or ambiguous, pause and
explicitly ask the user for the missing parameter before executing mutating
or resource-specific commands.<unique-suffix>, [suffix], or <timestamp>),
generate a short unique alphanumeric string or timestamp and substitute it
cleanly. Never pass unexpanded literal placeholder tokens to the API.--region=$LOCATION_ID and
--project=$PROJECT_ID explicitly on all gcloud ai models commands. Do
NOT use global.Use this command to discover existing models in the registry and retrieve their numeric IDs. No confirmation is required.
gcloud ai models list \
--region=$LOCATION_ID \
--project=$PROJECT_ID
Retrieve the full metadata for a specific model or version. No confirmation is required.
gcloud ai models describe $MODEL_ID \
--region=$LOCATION_ID \
--project=$PROJECT_ID
To target a specific version:
gcloud ai models describe ${MODEL_ID}@${VERSION_ID} \
--region=$LOCATION_ID \
--project=$PROJECT_ID
Register a new model or a new version of an existing model. This is a long-running operation. Action requires an inline confirmation card before proceeding.
gcloud ai models upload \
--region=$LOCATION_ID \
--project=$PROJECT_ID \
--display-name="<DISPLAY_NAME>" \
--container-image-uri="<CONTAINER_IMAGE_URI>" \
[--artifact-uri="<ARTIFACT_URI>"]
[!IMPORTANT]
This is a Tier M operation — see [Safety & Confirmation Tiers] above.
- If the user specifies "with no artifact URI", omit
--artifact-uri.- If registering a new version of an existing model, include
--parent-model=$PARENT_MODEL_ID.- Substitute
<DISPLAY_NAME>with the exact name requested by the user.
Update metadata fields like display name or description. Note that gcloud ai models does NOT have an update subcommand. Instead, model metadata updates
MUST be executed using the Vertex AI Python SDK
(google.cloud.aiplatform.Model).
Action requires an inline confirmation card containing the exact script before proceeding.
python3 -c "
from google.cloud import aiplatform
aiplatform.init(project='$PROJECT_ID', location='$LOCATION_ID')
model = aiplatform.Model('$MODEL_ID')
model.update(display_name='<NEW_DISPLAY_NAME>', description='<NEW_DESCRIPTION>')
print(f'Successfully updated model: {model.resource_name}')
"
[!IMPORTANT]
This is a Tier M operation — see [Safety & Confirmation Tiers] above.
- If only updating the display name, pass
model.update(display_name='<NEW_DISPLAY_NAME>').- If only updating the description, pass
model.update(description='<NEW_DESCRIPTION>').- The confirmation card MUST display the exact python command snippet above. NEVER execute in Turn 1; wait for explicit user approval.
Permanently delete a Model and all its versions. Action requires explicit typed confirmation before proceeding.
gcloud ai models delete $MODEL_ID \
--region=$LOCATION_ID \
--project=$PROJECT_ID
[!WARNING]
This operation is irreversible. All model versions must be undeployed from all Endpoints before deletion.
Before generating interactive model details, you MUST verify the model_id by
searching Model Garden Publisher Models. No confirmation is required.
Use the gcloud ai CLI to search for matching publisher models.
gcloud ai model-garden models list --model-filter="<model_name_or_query>" --full-resource-name --format=json
This will return a list of matching models. Extract the exact name field from
the result (e.g., publishers/google/models/gemma2 or
publishers/qwen/models/qwen3-coder) to use as the verified model_id.