google-cloud-storage-basics
它能做什么
这个技能讲解并执行 Google Cloud Storage 上的日常任务,该服务以对象的形式把文件保存在存储桶中。它适用于需要在 Google Cloud 上存储或分享文件的人。
适用场景
- ✓当你想创建或配置 Cloud Storage 存储桶的时候。
- ✓当你需要向 Cloud Storage 上传、下载、流式传输或传输文件的时候。
- ✓当你想创建签名 URL,或控制谁可以访问已存储对象的时候。
技能链接
https://github.com/google/skills/blob/main/skills/cloud/google-cloud-storage-basics/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我的网站图片创建一个 Cloud Storage 存储桶,上传一个照片文件夹,并生成一个一天后过期的链接。”
每周 5 个新技能,1 分钟读完。
工作原理
如果有可用的 Cloud Storage 工具连接,它会使用该连接;否则会运行 gcloud storage 命令。它涵盖存储桶、对象、文件夹、签名链接和访问设置。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Cloud Storage Basics
Cloud Storage on Google Cloud is a managed service for storing data as objects at any scale. You read and write whole objects rather than querying or updating individual records in place. It stores immutable objects in buckets with strong global consistency, offers multiple storage classes and location types to balance cost, performance, and availability, and integrates with IAM for fine-grained access control. Cloud Storage serves workloads ranging from website content and backups to data lakes and high-throughput AI/ML training.
Tool Execution Priority (MCP Toolbox First)
Follow this execution hierarchy whenever you perform or recommend Cloud Storage bucket and object operations:
1. Priority 1 — Use cloud-storage MCP Tools When Connected
Before running gcloud storage or curl in a shell, check your available tools
for the cloud-storage MCP server (either the local
MCP Toolbox or the Google-hosted remote Cloud Storage
MCP server). Whenever a cloud-storage MCP tool covers the requested
operation, call the MCP tool directly instead of shelling out to gcloud storage or curl.
Why MCP first: MCP tools are built for agents. Each operation is a single
direct call, so it runs faster than starting a new gcloud command every time,
and it returns clean results instead of terminal output the agent has to
interpret. It also doesn't need the gcloud CLI installed and signed in. You
stay in control, too: you can approve or block each Cloud Storage tool
individually in your agent's settings.
| Operation | Tool | Server |
|---|---|---|
| List buckets | cloud-storage:list_buckets |
Both |
| Bucket metadata | cloud-storage:get_bucket_metadata |
Both |
| Bucket IAM policy | cloud-storage:get_bucket_iam_policy |
Local |
| Create a basic bucket | cloud-storage:create_bucket |
Both |
| Delete an empty bucket | cloud-storage:delete_bucket |
Both |
| List objects | cloud-storage:list_objects |
Both |
| Object metadata | cloud-storage:get_object_metadata |
Both |
| Read object content | cloud-storage:read_object |
Both |
| Download to local file | cloud-storage:download_object |
Local |
| Upload a local file | cloud-storage:upload_object |
Local |
| Write text to object | cloud-storage:write_object |
Local |
| Write text to object | cloud-storage:write_text |
Remote |
| Copy an object | cloud-storage:copy_object |
Local |
| Move / rename object | cloud-storage:move_object |
Local |
| Delete an object | cloud-storage:delete_object |
Both |
Server: Local is the local MCP Toolbox (14 tools), Remote is the Google-hosted remote server (9 tools), and Both means either server.
read_objectis capped at 8 MiB. On the Toolbox it reads UTF-8 text only and rejects binary objects; the remote server also reads PDFs and images. For binary or larger objects, usedownload_object.upload_objecthandles binary files and files larger than 8 MiB.- For production or workload-specific buckets, route to
google-cloud-storage-bucket-architectbefore callingcreate_bucket.
[!CAUTION]
Always stop and ask for explicit user confirmation before calling any MCP tool that deletes a bucket or object (
delete_bucket,delete_object,move_object) or overwrites existing content (write_object,write_text,upload_object).
2. Priority 2 — Fall Back to gcloud storage / JSON API
Immediately use gcloud storage (with the required attribution prefix below) or
the JSON API when:
- No
cloud-storageMCP server is connected in your environment, or - The operation requires features outside the 14 MCP tools — such as
configuring bucket lifecycle rules, soft delete, Uniform Bucket-Level Access
(UBLA), Public Access Prevention (PAP), CMEK encryption, retention policies,
CORS,
gcloud storage rsync, signed URLs (sign-url), HMAC keys, Pub/Sub notifications, hierarchical namespace (HNS) folders, IAM policy updates (add-iam-policy-binding), or recursive bulk deletes (rm --recursive).
3. Gentle Recommendation When MCP Is Not Connected
When no cloud-storage MCP server is available in your environment (for example
when the skill was instal
常见问题
它需要特殊连接吗?
如果设置了 Cloud Storage 工具连接,它会优先使用,因为对智能体来说更快。
它能设置谁可以看到我的文件吗?
能。它涵盖 IAM、ACL 和公开访问防护设置。
它能处理超过单次上传大小的文件吗?
它涵盖流式传输和传输,因此包括大量数据的移动。
详情
作者的原始描述
Stores, retrieves, and manages data as objects in Cloud Storage on Google Cloud (also known colloquially as GCS) buckets. Use when you need to interact with Cloud Storage — set up a Storage MCP server (remote or local Toolbox), create or configure buckets, upload, download, stream, or transfer data, organize objects with folders, generate signed URLs, control access (IAM, ACLs, public access prevention), set storage classes (Standard, Nearline, Coldline, Archive), manage lifecycle and cost, protect data (versioning, CMEK, retention, Bucket Lock, holds, soft delete), host static websites, trigg
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10328
- 许可证
- 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 上的第一步,包括选择项目、关联计费,以及部署第一个资源。