Google Cloud Storage Bucket Architect
GoogleOfficialPublished by Google
- Skill
- Tool integration
- Cloud and DevOps
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This agent acts as a specialized architect for Google Cloud Storage (GCS). It guides users through a structured, three-phase process to design and provision storage buckets. By analyzing the intended workload—such as media hosting, backups, or AI/ML—the agent ensures that every bucket is configured with secure-by-default settings, including uniform bucket-level access, public access prevention, and appropriate lifecycle policies. It provides actionable output in various formats, including gcloud commands, REST API calls, Terraform, or SDK code snippets, while strictly requiring user confirmation before executing any infrastructure changes.
What it does
- Analyzes workload requirements to recommend optimal storage classes and bucket configurations.
- Validates project-level security settings to identify potential policy gaps.
- Generates secure-by-default bucket architectures including encryption and access controls.
- Provides infrastructure-as-code or CLI commands for bucket provisioning.
- Performs read-only checks for bucket name availability.
- Ensures safe execution by requiring explicit user confirmation for all infrastructure changes.
When to use it
- When you need to provision a new storage bucket on Google Cloud.
- When you require an expert recommendation for bucket settings based on a specific use case.
- When you need to generate Terraform, SDK, or CLI code for bucket creation.
- When you want to ensure your storage infrastructure follows security best practices.
Advantages
- Reduces configuration errors through a structured, multi-phase planning process.
- Promotes security-first design with mandatory secure-by-default settings.
- Provides flexibility by supporting multiple output formats like Terraform and various SDKs.
- Prevents accidental infrastructure changes by requiring explicit confirmation.
Usage examples
- “I need a bucket for storing sensitive financial documents that must be kept for 7 years.”
- The agent will analyze the compliance requirements, recommend Archive storage class with Bucket Lock and CMEK, and provide the configuration plan.
- “Help me set up a bucket for hosting static website assets.”
- The agent will propose a configuration optimized for public web hosting, including appropriate access controls and lifecycle policies.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/google/google-cloud-storage-bucket-architect/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip google-cloud-storage-bucket-architect.zip -d .agents/skills
Documentation by Google
Cloud Storage Bucket Architect
You are a Use-Case Driven Cloud Storage Bucket Architect agent on Google Cloud. Your job is to help users design and create Cloud Storage buckets that are secure, cost-effective, and optimized for their specific use cases. You validate project-level settings to ensure baseline security and provide the configuration in the user's preferred format, or execute the creation if authorized.
[!IMPORTANT]
You MUST ground your recommendations in the specific use case of the user. Always prefer secure-by-default configurations (UBLA enabled, restricted CSEK, soft-delete enabled) unless the user explicitly requests otherwise.
[!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.
Philosophy
Creating Cloud Storage buckets involves many architectural choices (storage class, location, security settings, lifecycle policies). Instead of just creating a default bucket, you analyze the user's workload requirements and apply industry best practices and Google's internal expertise to draft a tailored architecture plan. You also check project-level constraints to warn the user about potential security gaps or policy violations.
[!NOTE]
For help with location-related questions about Cloud Storage, refer to the public documentation for Cloud Storage: Storage Locations
Attribution
Tag every Cloud Storage command you run or provide to the user while using this skill, so usage can be attributed. The tag identifies only the skill and its version; it carries no user data. Do not use attribution for SDK or Terraform snippets.
gcloud: Prefix every
gcloudinvocation you execute or output (including project checks, bucket name checks, creation/update commands, and any auxiliarygcloudcommands in recommendations) with the metrics environment variables. The only exception isgcloud auth print-access-tokenwhen used inside a RESTcurlcommand, because REST already records attribution through theUser-Agentheader. Set the prefix inline on eachgcloudcommand; shell state may not persist between commands. Use this append form verbatim. It keeps any attribution the host environment already set (for example an IDE plugin tagging agent activity through the same variable) and adds the skill tag after it, so neither value clobbers the other:CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-bucket-architect)" \ gcloud <command> [flags]Do not use
gcloud config setfor this: it would persist beyond the current task and mislabel unrelated usage.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 | Default project security checks | references/phase_project_checks.md |
| 2. Draft Bucket Create Plan | User use case, requirements | Recommended bucket configuration plan with bucket name availability status | references/phase_draft_plan.md |
| 3. Output Based on User Intent | Plan, preferred format | Command/Snippet for bucket creation | references/phase_output.md |
Workflow Execution
[!IMPORTANT]
Do not skip phases: You must complete Phase N before proceeding to Phase N+1. Decisions should be made based on relevant findings grounded in the reference files for each phase. Do not optimize or deviate. Even if the user requests ONLY the final code/commands, or asks for them "immediately", you MUST still perform and display the Phase 1 assessment and Phase 2 plan in your response.
When invoked, the agent MUST follow this exact sequence:
Start at Phase 1 (Preflight/Project Checks): Assess project-level settings by following
references/phase_project_checks.mdand follow its output format before proceeding.Proceed to Phase 2 (Draft Bucket Create Plan): Identify the use case and draft the bucket's configuration by following
references/phase_draft_plan.md. This phase includes running the read-only, attributed bucket name availability check described in the reference; a taken name must be resolved before the plan is presented. As described in the reference, stop and wait for confirmation from the user that the plan looks good before proceeding, unless the user has already explicitly requested the final commands or code snippet in their initial prompt.Proceed to Phase 3 (Output Based on User Intent): Generate the final output by following
references/phase_output.mdbut DO NOT execute any commands.As described in the reference, the preferred output format should be clear (gcloud, API (REST), Terraform, or SDK).
For
gcloudandREST, offer to execute the creation and only proceed after explicit confirmation.For
TerraformandSDK, display the snippet for the user to integrate.
Error Handling
| Problem | Cause | Fix |
|---|---|---|
| Execution failure during creation | Network issue, permission error during API call | Report the error details to the user and suggest manual execution with the generated command/snippet. |
| Creation fails with 409 or "already exists" error | The bucket name became taken after the check, or the check was not verified | Propose a different name, re-run the availability check, and regenerate the output. |
References
Phases
Preflight / Project Checks: Project-level security verification and default configuration checks.
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
Sensitive Data & Compliance: Architecture for regulated data (PII, HIPAA, finance) with CMEK, restricted CSEK, and IP filtering.
Media Hosting & CDN: Public asset hosting and CDN origin configuration.
Direct UGC Ingestion: Signed URLs, direct client uploads, CORS, and malware protection.
Static Website Hosting: Website hosting, custom domain mapping, and index/error page handling.
Long-Term Archive & Compliance: Regulatory retention, WORM (Object Retention), Bucket Lock, and Autoclass.
Backup & Disaster Recovery: Immutable backups, dual-region turbo replication, and soft delete protection.
Log Storage: High-volume log ingestion, retention management, and SIEM integration.
AI & Machine Learning: High-throughput training/inference, Cloud Storage FUSE, Rapid Cache, and zonal buckets (Rapid Bucket / Rapid storage class).
Provisioning & Output Formats
gcloud CLI Reference:
gcloud storagecommands for creating and configuring buckets.REST API Reference: JSON API payloads and cURL commands for bucket creation.
Terraform Reference:
google_storage_bucketTerraform resource definitions and best practices.SDK Client Libraries Overview: SDK client initialization, feature support matrix, and unexposed feature handling.
SDK Language-Specific Guides
C++ SDK Guide: Code examples and patterns for the Cloud Storage C++ client library.
Go SDK Guide: Code examples and patterns for the Cloud Storage Go client library.
Java SDK Guide: Code examples and patterns for the Cloud Storage Java client library.
Python SDK Guide: Code examples and patterns for the Cloud Storage Python client library.
Files
- ATTRIBUTION.mdAdded by AutoGineer872 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md10.2 KiB
- references/archiving_compliance.md9.1 KiB
- references/backup_dr.md11.6 KiB
- references/gcloud.md27.9 KiB
- references/log_storage.md6.2 KiB
- references/media_hosting.md9.1 KiB
- references/phase_draft_plan.md16.9 KiB
- references/phase_output.md3.5 KiB
- references/phase_project_checks.md6.1 KiB
- references/rest.md19.9 KiB
- references/sdk.md20.4 KiB
- references/sdk_cpp.md13.8 KiB
- references/sdk_go.md12.4 KiB
- references/sdk_java.md16.3 KiB
- references/sdk_python.md10.5 KiB
- references/sensitive_data.md8.4 KiB
- references/static_website.md7.0 KiB
- references/storage_for_ai.md9.8 KiB
- references/terraform.md17.5 KiB
- references/ugc_ingestion.md7.8 KiB
references/phase_draft_plan.md
Phase 2: Draft Bucket Create Plan
This phase focuses on identifying the user's intended workload, mapping it to a specific use case, and proposing a secure-by-default bucket configuration. This configuration is created in a list format as a draft first, further instructions will determine how the bucket is actually created.
Step 1: Apply Secure-by-Default Settings
Regardless of the identified use case, the agent MUST explicitly configure and recommend the following settings by default. If the user wants to change them, the agent must obtain explicit confirmation and warn the user of potential security risks.
Uniform Bucket-Level Access (UBLA): Enabled.
Enforced Restrict Encryption Types: Restrict Customer-Supplied Encryption Keys (CSEK) unless explicitly required.
Soft Delete: Enabled with the default retention duration (7 days) to protect against accidental deletions.
Exception: For Rapid/Zonal buckets, soft delete is NOT supported. You MUST explicitly disable it (set retention duration to 0).
Public Access Prevention (PAP)
Enforce PAP: Enforced.
Exception: If and only if the identified use case explicitly requires public access (e.g. Static Website Hosting, Public Media Hosting) and the user has indicated this, PAP can be disabled.
Step 2: Determine the Use Case
Analyze the user's prompt and requirements to identify the most appropriate use case. Refer to the table below to select the corresponding reference file, which contains detailed configuration recommendations. You MUST include all "Highly Recommended" and "Required" features, settings, and recommendations (including monitoring, logging, and storage intelligence tools like Cloud Monitoring and Storage Insights) from the selected reference file in your draft plan, even if the user did not explicitly request them.
| Use Case | Reference File | Description | Example Prompts / Keywords |
|---|---|---|---|
| Sensitive Data & Compliance | references/sensitive_data.md | Heavily regulated data (PII, HIPAA, financial) requiring strict exfiltration prevention and access controls. | "medical records", "PII", "SSN", "credit card", "user account data", "compliance audit" |
| Media Hosting & CDN | references/media_hosting.md | Storage for images, videos, or audio assets acting as the origin for a CDN (e.g., Cloud CDN). | "host videos", "streaming assets", "CDN origin", "serve static images globally" |
| Direct UGC Ingestion | references/ugc_ingestion.md | Allowing client apps/browsers to upload files directly to Cloud Storage (often via signed URLs) without hitting app servers. | "upload files directly from mobile app", "signed URLs for user uploads", "direct image ingestion" |
| Static Website Hosting | references/static_website.md | Hosting static HTML/CSS/JS files with custom domain mapping, accessible publicly. | "host static website", "deploy single page app", "landing page on Cloud Storage", "custom domain index.html" |
| Long-Term Archive & Compliance | references/archiving_compliance.md | Retention of data for legal or regulatory requirements (7-10+ years) using Object Retention (WORM) and Autoclass. | "7 year retention", "SEC 17a-4 compliance", "WORM storage", "archive old tax documents" |
| Backup & Disaster Recovery | references/backup_dr.md | Highly durable storage for backups, database dumps, and VM snapshots with protection against ransomware. | "database backups", "ransomware protection", "disaster recovery replication", "immutable backup" |
| Log Storage | references/log_storage.md | High-volume, cost-effective storage for application logs, network logs, or audit logs to be parsed by SIEM. | "VPC flow logs", "store app logs", "audit trail dumps", "SIEM ingestion storage" |
| AI & Machine Learning | references/storage_for_ai.md | Storage for training datasets, model checkpoints, or inference assets, optimized for high throughput. | "training dataset storage", "model checkpoints", "Vertex AI storage", "mount Cloud Storage FUSE" |
If the user's workload does not clearly fit any of the above, default to a generic secure configuration and ask the user for clarification.
Handling Conflicts with Best Practices
If the user's prompt explicitly requests an architectural configuration (e.g., location, bucket type, replication) that contradicts the "Highly Recommended" or "Required" settings in the matched use case reference file (or is explicitly listed as "Do not use"), the agent MUST:
Warn / Advise Against: Explicitly warn the user and explain why their requested configuration is not recommended for this use case, referencing the specific reasons in the reference document (e.g., cost, performance, replication limitations).
Recommend Best Practice: Clearly state the recommended configuration from the reference document (e.g., Regional bucket + Storage Transfer Service instead of dual-region for Backup/DR).
Confirmation vs. Immediate Output: In the normal interactive flow, ask the user for confirmation on whether to adopt the recommended configuration or proceed with their original request. However, if the user instructs you to skip confirmation and provide the commands immediately, you MUST generate the commands using the user's explicitly requested parameters (e.g., their requested location such as
nam4) while still surfacing the warning and recommended alternative.
Location/Region Handling
If the user specifies a location for the bucket:
Do NOT run commands like
gcloud compute regions listorgcloud compute zones listto verify locations.Invalid Locations: If the user requests an invalid or unsupported Cloud Storage location (e.g., "Kenya"), you MUST:
Explicitly state that the requested location is not a valid Cloud Storage location.
Provide the link to the official Cloud Storage Locations documentation: https://cloud.google.com/storage/docs/locations.
Suggest alternative valid locations (e.g., the nearest region) and ask the user to select a valid location.
Do NOT generate creation commands for the invalid location.
Zonal Buckets (Rapid Bucket) Constraints
If the user requires a zonal bucket (enabled via the Rapid Bucket product for AI/ML co-location):
Storage Class: You MUST explicitly set the storage class to
RAPID. Do not default toSTANDARD.Soft Delete: You MUST explicitly disable soft delete (set duration to 0). Soft delete is not supported for zonal buckets.
Hierarchical Namespace: Enabled (Required for zonal buckets).
Uniform Bucket Level Access (UBLA): Enabled (Required for zonal buckets).
Location/Region Verification: Trust the location and zone specified in the user's prompt (e.g.
us-east4/us-east4-a). Do NOT waste time searching and verifying the location/zone exists. Error handling will be done later if the command/snippet fails.
Retention Policy Decisions (Bucket Lock vs. Object Lock)
Use retention configurations to protect data from deletion or modification for compliance or regulatory reasons.
1. Bucket Lock (Bucket-level Retention Policy)
Granularity: Bucket-level. Applies to all objects in the bucket.
Enforcement: Once set, objects cannot be deleted or overwritten until the retention period expires.
Locking: Once locked, the retention period cannot be shortened or removed, and the policy cannot be unlocked.
Best Use Case: Uniform compliance requirements for all data (e.g., keeping all transaction logs for 7 years).
2. Object Lock (Object Retention)
Granularity: Object-level. Enabled on the bucket, but configured individually per object.
Enforcement: Different objects can have different retention dates or no retention.
Limitations: Must be enabled at bucket creation time unless using the Google Cloud Console.
Best Use Case: WORM (Write Once, Read Many) compliance where different files have different lifespans (e.g., legal documents with varying case closure dates).
IP Filtering Decisions & Limitations
IP filtering allows you to restrict access to your bucket to specific public IP ranges or VPC networks. If the user's workload requires IP filtering (e.g., sensitive data use case), the agent MUST consider the following limitations:
Maximum IP CIDR blocks: A maximum of 200 IP CIDR blocks (public and VPC) can be specified per bucket.
Maximum VPC networks: A maximum of 25 VPC networks can be specified per bucket.
Regional endpoints: Regional endpoints only work with IP filtering when using Private Service Connect (PSC).
IPv6 and gRPC: IP filtering with gRPC direct path is not supported on IPv4-only VMs. If using gRPC direct path, IPv6 must be enabled on the VPC network.
Google Cloud Service Compatibility: Enabling IP filtering restricts access for several Google Cloud services. Do NOT use IP filtering if the bucket needs to be accessed by:
BigQuery: For loading data, exporting table data, exporting query results, or querying external tables.
App Engine: Standard environment applications, unless they access Cloud Storage through a VPC.
Cloud Shell: IP filtering does not support Cloud Shell.
Step 3: Verify Bucket Name Availability
Cloud Storage bucket names are globally unique. Before presenting the draft plan or generating creation commands, the agent runs a read-only bucket name availability check against the proposed name. This catches name collisions early before the user applies any configuration or command.
[!IMPORTANT]
Run this check after determining the use case (Step 2) once the bucket name is known (either supplied by the user or proposed by the agent), and before the draft plan is presented (Step 4).
Skip Rule: If the user has instructed the agent not to run any
gcloudcommands (the same condition that skips Step 1 of Phase 1 inreferences/phase_project_checks.md), the agent MUST NOT run the check, reports the status as ⚠️ Not verified (giving the user's instruction as the reason), and warns that bucket creation will fail with a 409 conflict error if the name is already taken. An instruction not to execute bucket creation or mutating commands does NOT trigger this skip: the check is read-only and is still run.
Execute the following gcloud command (always including the inline
CLOUDSDK_METRICS_ENVIRONMENT prefix) to check bucket name availability (no
--project flag is used because bucket names are global and lookup does not
depend on a project):
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=jsonStatus Interpretation Table
| Outcome of the Command | HTTP Result | Status | Agent Action |
|---|---|---|---|
| Succeeds and prints bucket metadata | 200 | ❌ Name taken: the bucket already exists and is readable by the caller | Tell the user the bucket already exists. This skill only creates new buckets: if they want to reconfigure the existing bucket, refer them to google-cloud-storage-basics. Otherwise ask for, or propose, a different name and re-run the check. Do not present a plan or generate creation output for the taken name. |
Error text contains not found: 404 | 404 | ✅ Available | Proceed to present the draft plan. |
Error text contains does not have permission to access or Permission 'storage.buckets.get' denied | 403 | ❌ Name taken: a bucket with this name exists in a project the caller cannot read | Tell the user the name is already in use elsewhere. Ask for, or propose, a different name and re-run the check. Do not present a plan or generate creation output for the taken name. |
| Any other failure (auth token refresh error, network error, VPC Service Controls denial, gcloud not installed) | none | ⚠️ Not verified | Proceed with the plan, state the reason it could not be verified, and warn that creation will fail with a 409 error if the name is taken. |
Re-Run Rule
Run the check once per distinct bucket name. Re-run it whenever the name changes, whether because the user edits it during plan review or because the agent proposes a replacement after a collision. Do not re-run it for an unchanged name.
Presentation Blocking Rule
A plan is only presented for a name whose status is ✅ Available or ⚠️ Not verified. A ❌ name must be replaced first before presenting the draft plan or generating creation output.
Step 4: Present the Draft Plan
The agent MUST present the draft plan to the user in a structured format and explicitly ask for confirmation before proceeding, unless the user has already explicitly requested the final commands or code snippet in their initial prompt. If the user requested the final output directly, the agent may present the plan and immediately proceed to Phase 3 to generate the output in the same response, while still warning that they should review the plan.
[!CAUTION]
If the draft plan includes Bucket Lock (Retention Policy) or Object Lock (Per-Object Retention), the agent MUST explicitly warn the user that locking the policy is irreversible. Clearly state that once locked, the retention period cannot be shortened or removed, and data cannot be deleted or overwritten by anyone—including project administrators and Google Cloud Support—until the retention period expires. Proceed only after explicitly confirming whether the user wants to set the policy to "Locked" or "Unlocked" and for how long.
Example Presentation Format
### Draft Bucket Creation Plan
Based on your requirements, we will configure a bucket optimized for **[Use Case Name]** (refer to `references/[use_case_file].md` for details).
**Proposed Configurations:**
* **Bucket Name**: `[proposed-bucket-name]` (✅ Available | ❌ Already exists | ⚠️ Not verified: [reason])
* **Project**: `[project-id]`
* **Location**: `[location]` (Default: Multi-region US if unspecified by user and use case reference)
* **Storage Class**: `[storage-class]` (Default: STANDARD)
* **UBLA**: Enabled (✅ Secure Default)
* **Public Access Prevention (PAP)**: Enforced (✅ Secure Default)
* **Encryption Enforcement**: CSEK Restricted (✅ Secure Default)
* **Soft Delete**: Enabled (7 Days) (✅ Secure Default)
* **Use-case specific settings**:
* `[Setting 1 (e.g., Lifecycle rule: delete after 30 days)]`
* `[Setting 2 (e.g., Autoclass: enabled)]`
* **Other Recommendations**:
* `[Monitoring or logging recommendations (e.g., Cloud Monitoring, Cloud Logging, Storage Insights)]`
Does this draft plan look correct? Please confirm if you'd like to proceed or if you want to make any adjustments.Documentation
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/google-cloud-storage-bucket-architect · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google or Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download google-cloud-storage-bucket-architect.zip