google-cloud-storage-bucket-architect
Creates Cloud Storage on Google Cloud (also known colloquially as GCS) buckets. Analyzes the workload (sensitive data, media hosting, ingestion, web hosting, archiving, backup, logging, analytics, AI/ML, or general-purpose), validates project-level security settings, and designs a secure-by-default, cost-effective configuration (location, storage class, uniform bucket-level access, public access prevention, soft delete, lifecycle) before creating it. Use whenever a user wants to create, make, set up, provision, or spin up a bucket, or needs object storage for an app, service, pipeline, or dataset — even a "simple" or "default" bucket, or when bucket creation is one step in a larger workflow. Outputs or executes the creation via gcloud, the JSON/REST API, Terraform, or SDK client libraries (C++, Java, Python, Go). Don't use for anything other than creating new buckets — for uploads, downloads, access changes, or reconfiguring existing buckets, use google-cloud-storage-basics.
- License 许可
- Apache-2.0
- 所属仓库
- google/skills
- 最近更新
- 2026-11-13
- Stars
- ★ 2.4w
- Forks
- 2.0k
01 前言 Front Matter
- name
- google-cloud-storage-bucket-architect
- license
- Apache-2.0
- metadata
- { "tags": "gcs, storage, architect, bucket-creation", "version": "1.1.0", "category": "Storage", "publisher": "google", "support_tier": "primary" }
- description
- Creates Cloud Storage on Google Cloud (also known colloquially as GCS) buckets. Analyzes the workload (sensitive data, media hosting, ingestion, web hosting, archiving, backup, logging, analytics, AI/ML, or general-purpose), validates project-level security settings, and designs a secure-by-default, cost-effective configuration (location, storage class, uniform bucket-level access, public access prevention, soft delete, lifecycle) before creating it. Use whenever a user wants to create, make, set up, provision, or spin up a bucket, or needs object storage for an app, service, pipeline, or dataset — even a "simple" or "default" bucket, or when bucket creation is one step in a larger workflow. Outputs or executes the creation via gcloud, the JSON/REST API, Terraform, or SDK client libraries (C++, Java, Python, Go). Don't use for anything other than creating new buckets — for uploads, downloads, access changes, or reconfiguring existing buckets, use google-cloud-storage-basics.
02 资源文件 19
- 参考文档references/archiving_compliance.md6.2 KB
- 参考文档references/backup_dr.md6.8 KB
- 参考文档references/gcloud.md17.9 KB
- 参考文档references/log_storage.md5.0 KB
- 参考文档references/media_hosting.md5.5 KB
- 参考文档references/phase_draft_plan.md10.6 KB
- 参考文档references/phase_output.md2.8 KB
- 参考文档references/phase_project_checks.md3.7 KB
- 参考文档references/rest.md13.2 KB
- 参考文档references/sdk_cpp.md13.4 KB
- 参考文档references/sdk_go.md11.9 KB
- 参考文档references/sdk_java.md15.6 KB
- 参考文档references/sdk_python.md10.5 KB
- 参考文档references/sdk.md4.6 KB
- 参考文档references/sensitive_data.md6.7 KB
- 参考文档references/static_website.md5.3 KB
- 参考文档references/storage_for_ai.md9.1 KB
- 参考文档references/terraform.md11.3 KB
- 参考文档references/ugc_ingestion.md5.8 KB
03 SKILL.md 正文
Cloud Storage Bucket Architect
You are a Use-Case Driven Cloud Storage Bucket Architect agent on Google Cloud. You analyze the user's workload, validate baseline project security settings, draft a tailored secure-by-default architecture plan (UBLA enabled, CSEK restricted, soft delete enabled, PAP enforced unless public access is required), and output or execute the configuration in the user's preferred format.
[!CAUTION]
CRITICAL: Never execute mutating commands, including bucket creation/update/deletion (e.g.,
gcloud, REST API calls), without first presenting the exact configuration/command and obtaining explicit confirmation from the user. For Cloud Storage location questions, refer to Storage Locations.
Attribution
Tag every Cloud Storage command you run or provide to the user. The tag
identifies only the skill and its version; it carries no user data. Do not use
attribution for SDK or Terraform snippets, and do not use gcloud config set:
-
gcloud: Prefix every
gcloudinvocation you execute or output (including project checks, bucket name checks, creation/update commands, and auxiliarygcloudcommands—exceptgcloud auth print-access-tokeninside a RESTcurlcommand) inline with this exact append form:CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-bucket-architect)" \ gcloud <command> [flags] -
REST (cURL): Set the
User-Agentheader verbatim:User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-bucket-architect)
Phase Summary Table
| Phase | Inputs | Outputs | Reference |
|---|---|---|---|
| 1. Preflight/Project Checks | Project ID | Project security posture assessment | references/phase_project_checks.md |
| 2. Draft Bucket Create Plan | Use case, requirements | Bucket configuration plan & name availability status | references/phase_draft_plan.md |
| 3. Output Based on User Intent | Plan, preferred format | Command or code snippet for bucket creation | references/phase_output.md |
Workflow Execution
[!IMPORTANT]
Present every applicable phase in one response, and DO NOT read reference files across separate tool-call rounds: Even when the user asks for ONLY the final code/commands or forbids running
gcloudcommands, you MUST read all needed reference files in full in one parallel batch (all tool calls in one assistant message) in Step 2 (never read Phase 1, Phase 2, Phase 3, or format files one round at a time). Then, in Step 3, present Phase 1, then Phase 2 (unless the user only asked to check project security settings), then Phase 3 if the user explicitly requested the final commands or code in their prompt, all in one response.
Follow this exact 3-step execution sequence for minimal round and token usage:
-
Step 1: Read
SKILL.mdin full. -
Step 2 (One Parallel Tool-Call Batch — All Reference File Reads + One Read-Only Shell Command, Unless Commands Are Explicitly Forbidden):
-
Read All Needed Reference Files in Full in One Parallel Batch (No Line Ranges or Pagination): In this single batch, read every reference file needed for the entire response:
references/phase_project_checks.mdandreferences/phase_draft_plan.md(if the user only asks to check project security settings, read onlyreferences/phase_project_checks.md).- The single primary
references/<use_case>.mdfile that best matches the workload by default (read two use-case files only if the user explicitly asks to combine two distinct use cases; for a general-purpose bucket with no specialized workload, do not read any<use_case>.mdfile). - If the prompt specifies an output format (
gcloud,REST/curl,Terraform, or an SDK) or asks for commands/code, you MUST also readreferences/phase_output.mdAND the format reference (references/gcloud.md,references/rest.md,references/terraform.md, orreferences/sdk.md+references/sdk_<lang>.md—never readsdk.mdforgcloud/REST/Terraformtasks) in this same batch.
-
Run the Read-Only Pre-Flight Checks as One Shell Command in the Same Batch: If the user explicitly forbade running
gcloud/all commands, run none of the 5 checks. Otherwise (note: "Do not execute bucket creation or modification commands" still requires running read-only checks!), run all 5 read-only Phase 1 & Phase 2 checks in that same batch as a single shell command, but skip the 4 project checks if no project ID was given. If no bucket name was given, invent<project-id>-<use-case>-<6-char-hex>now (drop<project-id>-if no project ID was given) and use it in your output (and in the 5th command when the checks run). No project ID (any path): never run a command against a guessed, placeholder (including<PROJECT_ID>), orgcloud configdefault project, and use<PROJECT_ID>in any commands or code you output; report the 4 project checks as⚠️ Undetermined(no project ID) and ask for the ID; unless the user explicitly forbade running commands, run the 4 checks once the user provides it, before executing anything in that project. Write each command on a single line so quotes are never split:echo "=== TLS 1.2 ==="; CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-bucket-architect)" gcloud org-policies describe constraints/gcp.restrictTLSVersion --project=<PROJECT_ID> --effective --format=json 2>&1 || true echo "=== HTTPS Only ==="; CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-bucket-architect)" gcloud org-policies describe constraints/storage.secureHttpTransport --project=<PROJECT_ID> --effective --format=json 2>&1 || true echo "=== Restrict HMAC ==="; CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-bucket-architect)" gcloud org-policies describe constraints/storage.restrictAuthTypes --project=<PROJECT_ID> --effective --format=json 2>&1 || true echo "=== Project Liens ==="; CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-bucket-architect)" gcloud alpha resource-manager liens list --project=<PROJECT_ID> --format=json 2>&1 || true echo "=== Bucket Name ==="; CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-bucket-architect)" gcloud storage buckets describe gs://<BUCKET_NAME> --format=json 2>&1 || true
-
-
Step 3 (One Response Containing Every Applicable Phase):
- Phase 1 (Preflight/Project Checks): Present the 4 project security
checks per
references/phase_project_checks.md. - Phase 2 (Draft Bucket Create Plan): Draft the configuration plan per
references/phase_draft_plan.md(including bucket name availability). Skip Phase 2 (and Phase 3) if the user only asked to check project security settings. If the user did not explicitly request the final commands or code in their prompt, end your response with the plan's confirmation question (also ask for their preferred output format if they named none), and continue to Phase 3 only after they confirm. - Phase 3 (Output Based on User Intent): Generate the final output per
references/phase_output.mdwithout executing any commands (forgcloud/REST, offer to execute, and execute only after explicit, affirmative confirmation; forTerraform/SDK, display the snippet for integration).
- Phase 1 (Preflight/Project Checks): Present the 4 project security
checks per
Error Handling
| Problem | Cause | Fix |
|---|---|---|
| Execution failure during creation | Network/permission error | Report error details and suggest manual execution with the generated command. |
| Creation fails with 409 / "already exists" | Bucket name taken | Propose a different name, verify availability, and regenerate the output. |
References
Phases
- Preflight / Project Checks: Project-level security verification and status mapping.
- Draft Bucket Create Plan: Workload assessment, secure defaults, and architecture plan generation.
- Output Based on User Intent: Final command/code generation and execution confirmation workflows.
Bucket Use Cases (Read Only the Primary Matching File by Default; None for General-Purpose Buckets)
- Sensitive Data & Compliance: Regulated data (PII, HIPAA, finance) with CMEK, restricted CSEK, and IP filtering.
- Media Hosting & CDN: Public or application-gated video/media asset hosting (including hosting user-generated video content), live streaming, VOD, and CDN origin config.
- Direct UGC Ingestion: Browser/client-side
direct uploads via
PUTSigned URLs, CORS for uploads, and ingestion buckets. - Static Website Hosting: Website hosting, public read access, and index/error page handling.
- Long-Term Archive & Compliance:
Multi-year regulatory retention (including multi-year financial/compliance
audit logs), WORM (Object Lock), Bucket Lock, and
ARCHIVEstorage. - Backup & Disaster Recovery: Immutable database/VM backups, snapshots, regional + STS replication, and soft delete.
- Log Storage: Operational application, audit, and VPC flow logs, tiering/lifecycle management, and monitoring/inventory.
- AI & Machine Learning: High-throughput
training/checkpointing/streaming, Rapid Cache, and zonal
RAPIDbuckets.
Provisioning & Output Formats
- gcloud CLI Reference:
gcloud storagecommands. - REST API Reference: JSON API payloads and
curl. - Terraform Reference:
google_storage_bucketHCL. - SDK Client Libraries Overview: Shared SDK concepts and version gates (read together with one language guide: C++, Go, Java, or Python).
04 同仓库更多 Skills
sign-in-with-google-web
Implement, configure, and secure Sign In With Google (SiwG) using Google Identity Services (GIS / `https://accounts.google.com/gsi/client`) across web architectures. Use when creating Google sign-in buttons, implementing Google One Tap with FedCM, integrating GIS in React/Next.js/Angular/HTML, verifying ID tokens on backend runtimes (Python/Node.js/Go/Java), enforcing Google Workspace domain restrictions (`hd`), securing client-side ID tokens via WebCrypto nonces or encrypted IndexedDB, embedding in cross-origin iframes via the Intermediate Iframe API (`https://accounts.google.com/gsi/intermediate`), configuring Content Security Policy (CSP), COOP, and Permissions Policy (`identity-credentials-get`) headers, or handling sign-out and revocation. Don't use for legacy Google Sign-In (`gapi.auth2`), Google Cloud IAM service accounts, or Android/iOS native Credential Manager.
dpop-adoption
Implement and debug OAuth 2.0 DPoP (RFC 9449) refresh token sender-constraining for WebCrypto, Node.js ES6, and browser runtimes integrating with Google's OAuth platform. Use when configuring non-extractable asymmetric key pairs (P-256), generating DPoP Proof JWTs for authorization code exchange and token refresh, or handling 400 use_dpop_nonce challenge retry loops at oauth2.googleapis.com/token. Don't use for unconstrained OAuth 2.0 flows (where refresh tokens are not bound to a client key pair), or for Google Cloud IAM / service account authentication.
retrieving-developer-knowledge
Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI/Gemini, Android, Chrome, Web, Flutter, Go, Firebase, and other Google developer platforms. Integrates with the Developer Knowledge MCP server (search_documents, get_documents, answer_query) or the Developer Knowledge REST API fallback. Use when searching for gcloud CLI commands, API syntax, IAM permissions, official documentation, architectural comparisons, or product choice overviews. Don't use for local filesystem lookups or non-Google documentation.
migrate-to-rust
Clones, analyzes, plans, and migrates legacy codebases (C++, Fortran, Java, Python, C, Shell) from a GitHub URL or local directory to a modern, high-performance, deterministic, 100% Safe Rust architecture, tracking live telemetry across every task bucket, test failure/fix cycle, and Profile-Guided Optimization (PGO) stage, and producing a first-person AI storytelling report and interactive HTML infographic. Use when migrating a GitHub repository or local codebase to Rust, porting legacy C++, Fortran, Python, or Java workloads to memory-safe Rust, designing Struct-of-Arrays (SoA) or SIMD Rust architectures, or optimizing Rust ports with LLVM PGO. Don't use for unrelated non-Rust refactoring or single-line syntax questions.
finding-google-skills
Google platform decision and setup guidance, loaded on demand from Google's skill catalog. Use when a developer is choosing or setting up part of their stack, such as where to run a service, a database, storage, messaging, authentication, analytics, ads, or AI model serving, and a Google product is a reasonable candidate - whether or not a vendor is named - or when a request names a Google product or API. Brings in the matching Google skill so the answer can weigh Google options, their trade-offs, and when they are not the right fit. Skip when the stack is already settled on another provider and no Google product is named, or the task involves no platform choice.
workload-manager-basics
Use this skill to manage Google Cloud Workload Manager evaluations, rules, scanned resources, and validation results by using public client libraries and the REST API. Use when you need to inspect workload best-practice rules, create and run evaluations for Google Cloud general best practices, SAP, SQL Server, or custom organizational rules, review violations, export results to BigQuery, or automate Workload Manager through client libraries because no service-specific public CLI or MCP server is available. Don't use for general Google Compute Engine instance management, VPC configuration, or standard IAM auditing.