Generated banner for Google Cloud Storage Basics
Generated logo for Google Cloud Storage Basics

Google Cloud Storage Basics

GoogleOfficialPublished by Google

  • Skill
  • Tool integration
  • Cloud and DevOps
  • Apache-2.0
  • Low risk

From the author

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, trigger Pub/Sub notifications, mount buckets (gcsfuse), or optimize performance. Covers gcloud storage / gsutil, JSON/XML APIs, client libraries, Terraform, and Cloud Storage MCP servers. Don't use for generic MCP setup that doesn't mention Cloud Storage, other MCP servers, block storage (Persistent Disk), BigQuery, or databases (Cloud SQL, Spanner, Bigtable, Firestore).
— the description by Google

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured approach to interacting with Google Cloud Storage (GCS). It prioritizes the use of Cloud Storage MCP tools for efficient, agent-native operations while providing fallback paths to the gcloud CLI and JSON APIs for advanced configurations. It covers the full lifecycle of buckets and objects, including creation, data transfer, access control, and storage management, while ensuring proper attribution for all operations.

What it does

  • Lists, creates, and manages GCS buckets and objects.
  • Uploads, downloads, and streams data between local environments and GCS.
  • Configures bucket access controls, storage classes, and lifecycle policies.
  • Generates signed URLs and manages data protection features like versioning and locks.
  • Integrates with MCP toolsets for optimized agent-based interactions.
  • Provides attribution-compliant commands for gcloud and API usage.

When to use it

  • When you need to perform basic CRUD operations on GCS buckets or objects.
  • When you need to transfer files to or from Google Cloud Storage.
  • When configuring bucket settings such as access, storage classes, or lifecycle rules.
  • When you need to interact with GCS via an agent-connected MCP server.
  • When you require programmatic access to GCS via client libraries or APIs.

Advantages

  • Prioritizes fast, agent-native MCP tools over shell commands.
  • Ensures consistent attribution for all cloud operations.
  • Provides clear fallback paths for advanced features not covered by MCP.
  • Includes safety guardrails for destructive operations like deletions.
  • Standardizes interaction patterns across CLI, API, and client libraries.

Usage examples

“List all buckets in my current project.”
The agent will use the cloud-storage:list_buckets MCP tool if available, or execute the gcloud storage ls command with proper metrics attribution.
“Upload local file data.txt to my-bucket.”
The agent will use the cloud-storage:upload_object MCP tool to securely transfer the file to the specified bucket.
“How do I create a new bucket in us-central1?”
The agent will recommend using the cloud-storage:create_bucket MCP tool or provide the gcloud storage buckets create command with the required metrics environment variables.
“Read the content of config.json from my-bucket.”
The agent will use the cloud-storage:read_object MCP tool to retrieve and display the file content, provided it is within size limits.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/google/google-cloud-storage-basics/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip google-cloud-storage-basics.zip -d .agents/skills

Documentation by Google

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.

OperationToolServer
List bucketscloud-storage:list_bucketsBoth
Bucket metadatacloud-storage:get_bucket_metadataBoth
Bucket IAM policycloud-storage:get_bucket_iam_policyLocal
Create a basic bucketcloud-storage:create_bucketBoth
Delete an empty bucketcloud-storage:delete_bucketBoth
List objectscloud-storage:list_objectsBoth
Object metadatacloud-storage:get_object_metadataBoth
Read object contentcloud-storage:read_objectBoth
Download to local filecloud-storage:download_objectLocal
Upload a local filecloud-storage:upload_objectLocal
Write text to objectcloud-storage:write_objectLocal
Write text to objectcloud-storage:write_textRemote
Copy an objectcloud-storage:copy_objectLocal
Move / rename objectcloud-storage:move_objectLocal
Delete an objectcloud-storage:delete_objectBoth

Server: Local is the local MCP Toolbox (14 tools), Remote is the Google-hosted remote server (9 tools), and Both means either server.

  • read_object is 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, use download_object.

  • upload_object handles binary files and files larger than 8 MiB.

  • For production or workload-specific buckets, route to google-cloud-storage-bucket-architect before calling create_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:

  1. No cloud-storage MCP server is connected in your environment, or

  2. 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 installed standalone without the plugin):

  • Never disrupt or delay the user's workflow. Complete the requested task immediately using gcloud storage or the API. Never pause or ask the user to install the MCP server before answering.

  • Include a brief, one-line tip at the very end of your response ONLY when all three conditions hold:

    1. No cloud-storage MCP tools are connected in the environment,

    2. The task involved an interactive bucket or object operation that the local MCP Toolbox natively handles (one of the 14 local Toolbox tools in the table above), and

    3. You have not already mentioned the MCP server earlier in the conversation (mention at most once per conversation).

  • Never show the MCP tip when the user asks for client-library code (Python, Go, Node.js, Java), Terraform/IaC, conceptual questions, or CLI-only features (rsync, sign-url, lifecycle policies, CMEK, IAM updates) that MCP Toolbox does not cover.

  • Use this quiet, non-intrusive footnote format:

    Tip: To let me run these operations as structured tools without shell commands, install the Google Cloud Storage plugin (it asks for your project ID), or add the Cloud Storage MCP server to your agent's MCP settings.

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.

  • Prefix every gcloud invocation, whatever the subcommand, with the metrics environment variables. Set them inline on each command; 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-basics)" \
    gcloud <command> [flags]

    Do not use gcloud config set for this: it would persist beyond the current task and mislabel unrelated usage.

  • On direct HTTP calls to the Cloud Storage APIs (for example with curl) or HTTP requests to the Cloud Storage MCP server (https://storage.googleapis.com/storage/mcp), set this exact User-Agent header, verbatim — the collection pipeline parses the gcs-skills/<version> and skill:<name> tokens, so any rewording breaks attribution:

    User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-basics)
  • For client libraries, Terraform, and Cloud Storage FUSE, use the user-agent options shown in the corresponding references.

Routing to Specialized Cloud Storage Skills

This skill covers everyday Cloud Storage tasks. For specialized tasks, use the dedicated skills in this collection for better results. Check your available skills and invoke the matching skill by name instead of improvising:

  • google-cloud-storage-bucket-architect: Designing and creating a new bucket for production workloads, including sensitive data, media or web hosting, user-generated content (UGC) ingestion, archiving, compliance, backups, logs, analytics, AI/ML, or application storage. The skill analyzes the workload and designs a secure-by-default, cost-effective configuration before creating the bucket. Use the Quick Start section below only for temporary scratch buckets.

  • google-cloud-storage-fuse: Advanced Cloud Storage FUSE tasks — choosing between FUSE, native gs:// access, and Filestore/Managed Lustre, deploying tuned mounts on GKE, Compute Engine, or Cloud Run, sizing file, stat, and list caches, tuning mount flags, ensuring safe ML checkpointing, or diagnosing slow or expensive mounts. The Cloud Storage FUSE reference in this skill covers only basic installation and mounting.

  • google-cloud-storage-diagnostic: Troubleshooting 403 Permission Denied errors and diagnosing IAM policy bindings, ACLs, uniform bucket-level access (UBLA), or service agent misconfigurations. Ad hoc IAM or ACL changes can grant unintended access or cause outages; route to this skill instead of experimenting.

  • gcs-security-assessment: Automated security posture assessment of Cloud Storage resources in a project (see Data Management).

If the matching skill is not installed, do not improvise. Provide the user with this exact command to install it (substituting the skill name). Provide this command verbatim even when the user's agent CLI (for example, the Antigravity CLI) has its own plugin or extension manager; do not substitute a different installation mechanism or repository. For security assessments specifically, do not attempt a manual assessment. Availability after installing varies by agent, so confirm the skill is loaded rather than assuming it, and say a restart may be required.

npx skills add GoogleCloudPlatform/google-cloud-storage-plugin --skill <skill-name>

Quick Start

To set up, configure, or choose between the Google-hosted remote Cloud Storage MCP server (https://storage.googleapis.com/storage/mcp) and the local MCP Toolbox (cloud-storage), read MCP Usage. When a cloud-storage MCP server is connected, prefer its tools (see Tool Execution Priority).

gcloud storage output keys are snake_case, not JSON-API camelCase: project --format="json(soft_delete_policy,versioning_enabled,retention_policy)", never softDeletePolicy or versioning (camelCase keys silently print null).

  1. Enable the Cloud Storage API:

    CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
    gcloud services enable storage.googleapis.com --quiet
  2. Create a Bucket:

    Bucket names live in a single global namespace shared by all of Cloud Storage — not scoped to your project or organization — so short or common names are usually taken. If the location is omitted, the bucket defaults to the US multi-region.

    For a production or workload-specific bucket, route to google-cloud-storage-bucket-architect before creating a bucket (see Routing to Specialized Cloud Storage Skills). The options below create a basic default bucket.

    Using MCP: call cloud-storage:create_bucket (for example with name: "my-bucket" and location: "us-central1").

    Using the gcloud CLI:

    CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
    gcloud storage buckets create gs://my-bucket --location=us-central1

    Using the JSON API:

    curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \
      -H "User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
      -H "Content-Type: application/json" \
      -d '{"name": "my-bucket", "location": "US-CENTRAL1"}' \
      "https://storage.googleapis.com/storage/v1/b?project=$(gcloud config get-value project)"
  3. Upload an Object:

    Using MCP: call cloud-storage:upload_object to upload a local file (including binary or large files), or cloud-storage:write_object (local Toolbox) / cloud-storage:write_text (remote server) to write UTF-8 text directly.

    Using the gcloud CLI:

    CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
    gcloud storage cp ./my-file.txt gs://my-bucket

    Using the JSON API:

    curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \
      -H "User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
      -H "Content-Type: text/plain" \
      --data-binary @my-file.txt \
      "https://storage.googleapis.com/upload/storage/v1/b/my-bucket/o?uploadType=media&name=my-file.txt"
  4. Download or Read an Object:

    Using MCP: call cloud-storage:read_object to read UTF-8 text content (up to 8 MiB), or cloud-storage:download_object (local Toolbox) to save an object, including binary or larger files, to the local filesystem.

    Using the gcloud CLI:

    CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
    gcloud storage cp gs://my-bucket/my-file.txt .

    Using the JSON API:

    curl -X GET -H "Authorization: Bearer $(gcloud auth print-access-token)" \
      -H "User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-basics)" \
      "https://storage.googleapis.com/storage/v1/b/my-bucket/o/my-file.txt?alt=media"

Reference Directory

  • Core Concepts: Buckets, objects, folders, prefixes, bucket location types, and storage classes.

  • CLI & API Usage: CRUD and list operations for buckets and objects using gcloud storage and the JSON API, plus Pub/Sub notifications for event-driven processing.

  • Client Libraries: Using Google Cloud client libraries for Python, Java, Node.js, and Go, with pointers to all other supported languages.

  • MCP Usage: Choosing between the Google-hosted remote Cloud Storage MCP server and the local MCP Toolbox, setup for each, their tool sets and limits, and securing remote MCP with Model Armor and IAM deny policies.

  • Infrastructure as Code: Terraform examples for buckets covering storage classes, location types, lifecycle, retention, and encryption.

  • Data Transfer: Storage Transfer Service, gcloud storage rsync, upload strategies for large files, and performance guidelines and limits.

  • Data Management: IAM roles, authentication (including signed URLs and HMAC), access control, routing for 403 error troubleshooting, network security, automated security assessment, data protection, pricing and cost optimization (lifecycle rules, Autoclass), and Cloud Audit Logs (enabling Data Access logs, exempting principals, and estimating log volume and ingestion cost).

  • Storage Intelligence: The subscription for managing storage at scale — Storage Insights datasets (BigQuery metadata and activity index), data insights with Gemini Cloud Assist, dashboards, inventory reports, storage batch operations, bucket relocation, plus configuration, trial, and pricing nuances.

  • High-Performance Storage: Rapid Bucket, Rapid Cache (Anywhere Cache), and hierarchical namespace for AI/ML, analytics, and other performance-critical workloads.

  • Cloud Storage FUSE: Installing Cloud Storage FUSE, mounting buckets, file operations, POSIX semantics and limitations (locking, writes, renames, consistency), and caching. For advanced tuning, deployment, and diagnosis, route to the google-cloud-storage-fuse skill.

Files

references/storage-intelligence.md

Storage Intelligence

Storage Intelligence is a subscription for analyzing and acting on Cloud Storage data at scale.

  • Analysis features: Storage Insights datasets, data insights with Gemini Cloud Assist, inventory reports.

  • Action features: storage batch operations, bucket relocation.

Use it for organization-wide visibility (cost, security, governance) and for operations too large to script (billions of objects, whole-bucket moves).

[!NOTE]

Datasets, batch operations, and bucket relocation require the subscription. Inventory reports work without it (the subscription covers their scan fees). Gemini Cloud Assist answers general GCS questions without it, but prompts about your buckets need a subscription plus a dataset.

Choosing the Right Feature

GoalUse
Org/folder/project-wide metadata &Storage Insights datasets
: activity analysis, trends, security : :
: posture : :
Natural-language questions aboutGemini Cloud Assist (backed by a
: bucket/object metadata : dataset) :
Scheduled per-bucket object listing,Inventory reports
: transfer validation : :
Bulk delete / metadata / holds /Batch operations (often fed by a
: CMEK rotation on many objects : dataset-generated manifest) :
Move a bucket to another location,Bucket relocation
: keeping its name : :
One-off small-scale changesPlain gcloud storage (no
: : subscription needed) :

1. Configuration

Configure on a project, folder, or organization. Children inherit the configuration, and you can override it at lower levels. Each resource has one edition configuration: INHERIT (default when unset), STANDARD (all features, set by enable), DISABLED, or TRIAL. Bucket filters scope by location or name regex. Requires roles/storage.admin (storage.intelligenceConfigs.update). See Configure and manage Storage Intelligence.

# Exactly one of --project, --sub-folder, --organization:
gcloud storage intelligence-configs enable --project=my-project

# Org-wide with filters:
gcloud storage intelligence-configs enable --organization=123456789 \
    --exclude-bucket-id-regexes="colddata.*" --include-locations=us-east1

gcloud storage intelligence-configs describe --project=my-project
gcloud storage intelligence-configs disable  --project=my-project

# update takes exactly one settings flag:
gcloud storage intelligence-configs update --project=my-project \
    --include-locations=us-east1

30-day trial: enables all STANDARD features and waives the object management fee (other charges, e.g. BigQuery, still apply). Eligible once per org/folder/project. Auto-converts to paid STANDARD after 30 days, so disable within the window to avoid charges. Datasets created during the trial persist (and keep billing BigQuery storage) until deleted.


2. Storage Insights Datasets

A queryable index of metadata and activity for buckets/objects in scope, delivered as a BigQuery linked dataset: metadata snapshots (projects, buckets, objects), activity views (mutations, errors, bucket/project/regional activity), and processing events/errors. See Configure datasets.

Key properties and limits:

  • Scope: one org, or up to 10,000 projects/folders, with bucket name-regex and location filters. --auto-add-new-buckets covers future buckets.

  • Retention: a rolling window of up to 90 days for metadata. Activity data can be set separately, up to 365 days (0 excludes it).

  • Locations: BigQuery locations EU, US, asia-south1, asia-south2, asia-southeast1, europe-west1, us-central1, us-east1, us-east4 only.

  • Freshness: the initial load takes 24–48h, activity data lands in ~4h, and metadata snapshots refresh every 24h.

gcloud storage insights dataset-configs create my_dataset \
    --location=us-central1 --organization=123456789 \
    --retention-period-days=30 --source-projects=987654321,123123123

# Must link to BigQuery before querying:
gcloud storage insights dataset-configs create-link my_dataset --location=us-central1

After creation, grant the Storage Insights service agent (service-PROJECT_NUMBER@gcp-sa-storageinsights.iam.gserviceaccount.com) the required permissions. Without them, no data flows. Service agents can be per-config (default) or per-project (--identity=IDENTITY_TYPE_PER_PROJECT).

Use cases:

  • Estate analysis: find duplicates, temp data, and data in unexpected regions, or extract prefix lists to feed batch operations.

  • Activity: identify inactive buckets and map the hottest projects/prefixes. The regional activity view (request/response bytes per region) informs bucket relocation decisions.

  • Security: object securityInsights computes public access status (evaluates PAP, UBLA, ACLs, IAM, org policies, and shows where the grant originates). Audit encryption (encryptionType) and retention (retentionExpirationTime, softDeletePolicy).

  • Troubleshooting: object_events_view records errored operations with reasons (e.g., find buckets with high 429 rates).

  • Content analysis: join metadata to object data via BigQuery ObjectRef functions (ref column).

Dashboards: connect the linked dataset to Looker Studio, or start from the dashboard template. Dashboard queries consume BigQuery compute, so evaluate on a small dataset first.

Limitations: public access status skips objects in managed folders and ignores VPC-SC and IP filtering. CRC32C/MD5 checksums are missing for CMEK objects, and renaming an HNS folder makes its objects reappear as new entries.


3. Data Insights with Gemini Cloud Assist (Preview)

With a linked dataset, the Cloud Assist panel on the console's Storage Insights page answers natural-language prompts about your metadata and returns the underlying SQL. Examples: "5 largest buckets without Autoclass enabled", "objects with a retention expiration date within the next 30 days", "buckets with a high volume of small files". Including "Cloud Storage" in the prompt improves quality.

Setup: enable Gemini Cloud Assist and Storage Intelligence, create and link a dataset, grant the service agent roles/bigquery.dataViewer, and give users roles/bigquery.jobUser, roles/bigquery.dataViewer, roles/storageinsights.viewer.

Quotas and limits:

  • Prompts needing ≥ 800 GB of processing return SQL only, for you to run yourself. Processing is capped at 50 TiB/month/org.

  • Returns at most the top 5 matching resources per prompt.

  • Reads only the latest snapshot, so no time-series ("how much did my bucket grow"). Cost data, activity data ("last access time"), and some configs (e.g., soft delete) aren't in the dataset at all.

  • Still in Preview, so validate responses before acting.


4. Inventory Reports

Scheduled per-bucket object listings (CSV or Apache Parquet) written to a destination bucket, as a faster alternative to paginated Objects: list. The report config lives on the source bucket (max 100 per bucket) and defines the frequency (daily/weekly), the metadata fields (always project, bucket, and name, plus optional fields like size, timeCreated, updated, storageClass, etag, checksums, generation, contentType, and retentionExpirationTime), and the destination bucket (same project and location as the source, or the source bucket itself). Reports over 1M objects are sharded, with a *_manifest.json written when all shards are complete.

Use for: quick single-bucket analysis, transfer validation, per-bucket audits. Use datasets instead for: multi-bucket/org-wide analysis, trends, activity data.

[!NOTE]

Delivery is best-effort, so reports may skip days or miss objects. For complete daily coverage, use datasets instead. Not compatible with bucket IP filtering, and unavailable in a few locations (e.g., me-central1, me-central2, dual-regions eur5/eur7/eur8).


5. Storage Batch Operations

Serverless jobs that run one transformation across objects in one bucket, scaling to ~1B objects in ~3 hours with concurrent jobs. Jobs are LROs with progress tracking and automatic retries.

Job types:

  • delete

  • metadata update: custom metadata, or fixed fields like Content-Type, Cache-Control, Custom-Time, and retention config

  • object hold set/release

  • object rewrite: CMEK key or storage class

  • object context updates

Objects are selected either by a manifest (a CSV in GCS with the header bucket,name,generation, where generation is optional and rows for other buckets are ignored) or by up to 1,000 object prefixes (an empty list means the whole bucket). A common pattern is to query a dataset to generate the manifest.

# Bulk metadata update from a manifest:
gcloud storage batch-operations jobs create my-job \
    --bucket=my-bucket \
    --manifest-location=gs://my-bucket/manifest.csv \
    --put-metadata=Content-Language=en

# Always dry-run large deletes first (counts affected objects, no changes):
gcloud storage batch-operations jobs create my-dry-run \
    --bucket=my-bucket --included-object-prefixes=tmp/,staging/ \
    --delete-object --dry-run

gcloud storage batch-operations jobs describe my-job   # also: cancel, delete

[!CAUTION]

Batch deletes are recoverable only via soft delete (7-day default). If soft delete is disabled on the bucket, deleted objects are unrecoverable.

Limits: jobs auto-cancel after 14 days, at most 1,000 prefixes per job, at most ~20 concurrent jobs per bucket recommended, and Requester Pays buckets are unsupported. Pricing adds no fee beyond the subscription, but normal per-operation charges apply: transformations are Class A (skipped if the object is already in the desired state), deletes are free, and listing during jobs and dry runs is Class A.


6. Bucket Relocation

Moves a bucket to a different location without renaming it or manual data copying, preserving object metadata and storage classes, including Autoclass (legacy classes convert to Standard). Reads stay available throughout. Typical drivers: cut inter-region transfer costs, colocate with compute, or move from a region to a dual/multi-region for resilience (use the dataset regional activity view to find candidates).

Two types, determined by source/destination locations:

  • With write downtime (most moves: region↔region, region↔dual-region, across multi-region codes): writes are blocked only during the final synchronization step, which you initiate.

  • Without write downtime (locations sharing a multi-region code, e.g. configurable dual-region ↔ multi-region): no finalize step, but takes a minimum of 7 days regardless of size, and latency may increase.

# 1. Dry run first to catch incompatibilities early:
gcloud storage buckets relocate gs://my-bucket --location=us-central1 --dry-run

# 2. Initiate. Bucket metadata is write-locked, object reads/writes continue:
gcloud storage buckets relocate gs://my-bucket --location=us-central1

# 3. Finalize (write-downtime moves only). Object writes fail with HTTP 412
#    until complete, then the lock lifts automatically:
gcloud storage buckets relocate --finalize \
    --operation=projects/_/buckets/my-bucket/operations/OPERATION_ID

Copy duration scales with object count, churn, and size (objects over 10 GB move slowly, at roughly a day per TB-sized object). Check the compatibility list before starting: Firebase and appspot buckets can't be relocated at all, multipart uploads and retention policies have restrictions, and with-downtime moves support fewer features. ME-CENTRAL1 and ME-WEST1 aren't supported.


7. Pricing

  • Subscription: $2.50 per million objects/month, amortized daily, billed to the bucket's project, only for objects older than 24h. Early termination fee if a bucket leaves STANDARD tier within 30 days (deletions exempt).

  • Datasets: no extra SI fee (multiple configs over the same buckets pay once), but BigQuery storage and query charges apply (~300 MB metadata per TB of data daily). Disabling SI stops snapshots but does not delete BigQuery data, so delete dataset configs to stop charges.

  • Batch operations: standard Class A/B operation charges per object (deletes free).

  • Bucket relocation: $0.04/GB moved, plus inter-region transfer, one Class A op per object, and storage billed in both locations during the move. There are no retrieval or early-deletion fees, and transfer is waived if source and destination overlap in a region.

  • Trial: waives the object management fee and the early termination fee.

Details: https://cloud.google.com/storage/pricing#storage-intelligence


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.

Needs: Needs an MCP server, Needs a command-line tool, Needs Node.js

Security

What our scanner noticed· Low risk

  • Instructions that use the network

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
Google
Publisher
Google (Official)
Source
google/skills · skills/cloud/google-cloud-storage-basics · 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.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download google-cloud-storage-basics.zip