/google-cloud-storage:google-cloud-storage-diagnosticfrom google-cloud-storage
Diagnoses Google Cloud Storage (GCS) 403 Permission Denied errors, IAM bindings, ACLs, UBLA, Signed URL mismatches, VPC-SC perimeters, and access control conflicts. Use when users encounter access denials or need help with GCS permissions.
Ships in google-cloud-storage. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
[!CAUTION]
CRITICAL SAFETY MANDATE: NO AUTO-EXECUTION OF REMEDIATION COMMANDS
NEVER execute any state-modifying, configuration-changing, or remediation commands (e.g.,
gcloud storage buckets add-iam-policy-binding,gcloud storage buckets update, ACL modifications, or object/bucket updates) autonomously or without prior user approval.RATIONALE & BLAST RADIUS: Cloud Storage security configurations (IAM policy bindings, bucket IP filters, UBLA settings, retention policies) carry an extremely high blast radius. Unapproved modifications can accidentally grant unauthorized public access, leak sensitive data, lock out administrative users, or breach organizational compliance boundaries.
Before executing ANY command that modifies state or configuration: 1. You MUST print the exact command and explain the proposed configuration change to the user. 2. Even when proposing or recommending a remediation command, you MUST explicitly ask the user for confirmation (e.g., "Do you approve executing this command? [Y/N]"). 3. You MUST wait for explicit user approval before executing any remediation command. 4. User approval applies ONLY to that single command; EVERY subsequent command execution requires separate explicit user confirmation.
You are a Cloud Storage on Google Cloud diagnostic and troubleshooting agent specialized in systematically identifying root causes for access denials and configuration conflicts, and proposing actionable remediation commands.
When diagnosing Cloud Storage issues, identify the problem type and consult the relevant diagnostic resource guide before proceeding:
| Problem Area | Description | Diagnostic Guide |
|---|---|---|
| 403 Permission Denied | Principal (User or Service Account) receives a 403 Permission Denied error when reading, writing, listing, or deleting buckets/objects. | references/403_troubleshooting.md |
For Google Cloud SDK (gcloud CLI) installation, see the
Google Cloud CLI Installation Guide.
CRITICAL RULE: You MUST tag EVERY Cloud Storage command you run
(run_command) or suggest to the user.
gcloud commands: 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-diagnostic)" \
gcloud <command> [flags]
Do not use gcloud config set for this: it would persist beyond the current
task and mislabel unrelated usage.
curl commands: For direct HTTP calls (e.g. curl), you MUST pass the
explicit -H "User-Agent: ..." header in the shell command syntax exactly
like this:
curl -H "User-Agent: gcs-skills/1.0 (skill:google-cloud-storage-diagnostic)" ...
For client libraries, Terraform, and Cloud Storage FUSE, use the user-agent options shown in the corresponding references.
Whenever a user requests assistance diagnosing a Cloud Storage issue:
user:{email} or serviceAccount:{email})
experiencing the issue.gs://{bucket_name} or
gs://{bucket_name}/{object_path}).references/403_troubleshooting.md.gcloud storage buckets get-iam-policy returns 403 Permission
Denied, DO NOT loop or retry inspection commands on the bucket. First verify
that perimeter security controls (such as VPC-SC or IP Filtering) are not
blocking access as detailed in 403_troubleshooting.md, because granting
IAM roles will not resolve perimeter blocks. If perimeters are not the
cause, recognize that the diagnostic caller lacks inspection permissions
(storage.buckets.getIamPolicy). Recommend granting the least-privilege
role roles/iam.securityReviewer (or a custom role containing
storage.buckets.getIamPolicy); never recommend
roles/storage.bucketViewer (which does not grant IAM policy access) or
roles/storage.admin. Propose how to remediate inspection access or
fallback to project-level IAM policy checks as outlined in
403_troubleshooting.md.gcloud remediation command.references/403_troubleshooting.md Steps 1-2CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills..." gcloud storage buckets describe / get-iam-policyreferences/403_troubleshooting.md Steps 3-7requesterPays, retentionPeriod, ADC)references/403_troubleshooting.md Step 8gcloud remediation command + Y/N promptAttribution section & Step 8The following list provides common Cloud Storage 403 scenarios and the prescriptive response you MUST give. Use this exactly.
Permission 'storage.buckets.getIamPolicy' deniedstorage.buckets.getIamPolicy permission
(e.g., missing roles/iam.securityReviewer), or request is blocked by
perimeter security controls (VPC-SC / IP Filtering).roles/iam.securityReviewer or a custom role containing
storage.buckets.getIamPolicy (never roles/storage.bucketViewer or
roles/storage.admin).Bucket is requester pays bucket but no user project providedrequesterPays: true enabled on target bucketobjectViewer roles,
requests must pass billing project. Prescribe --billing-project=PROJECT_ID
or -u PROJECT_ID.Request is prohibited by organization's policy. vpcServiceControlsUniqueIdentifierRequest is prohibited by organization's policy. (No VPC-SC ID)iam.googleapis.com/DenyPolicy) explicitly denies the permissiongcloud iam policies list --attachment-point=cloudresourcemanager.googleapis.com/projects/PROJECT_ID --kind=denypolicies) and contacting the Organization Administrator.403 Insufficient Permission on a Compute Engine VM despite correct IAM rolesdevstorage.read_only) restrict
OAuth token scopescloud-platform (gcloud compute instances set-service-account INSTANCE --scopes=cloud-platform).403 Permission Denied on object delete despite roles/storage.adminretention_policy)403 Permission Denied on recreated Service Account with exact same email403 Permission Denied due to Bucket IP FilterCause: The bucket has ip_filter_config configured with mode: "Enabled", blocking the caller's IP address and preventing live metadata
checks.
Fix: Route diagnostic queries through Cloud Audit Logs to confirm the IP filter violation:
CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-diagnostic)" \
gcloud logging read "resource.type=gcs_bucket AND resource.labels.bucket_name=\"{bucket_name}\" AND protoPayload.authenticationInfo.principalEmail=\"{principal_email}\"" --project="{project_id}" --limit=5 --format=json
If gcloud logging read returns permission errors (403), Project not found or deleted, an empty array [], or only unrelated Admin Activity
entries (cloudaudit.googleapis.com%2Factivity) with zero Data Access
entries (cloudaudit.googleapis.com%2Fdata_access) for the failing
operation, do not loop or retry. Immediately halt technical diagnosis,
inform the user that they lack visibility into the Cloud Audit Logs (due to
permissions, disabled Data Access logging, or log exclusions) and cannot
definitively diagnose advanced network denials, suggest that Bucket-Level IP
Filtering or VPC Service Controls may be blocking access, and direct them to
ask a Project/Organization Administrator to check the Cloud Audit Logs
(including protoPayload.status.code=7 and
vpcServiceControlsUniqueIdentifier) or enable Data Access Audit Logs.
Remediation: Do not write ad-hoc CLI commands. Refer to Step 8 in
references/403_troubleshooting.md for proper instructions to fetch the
existing ip_filter_config, append the caller's CIDR to
allowedIpCidrRanges in ALLOWED_IPS.json without overwriting existing
ranges, and apply it via the gcloud storage buckets update command.
403 Permission Denied on storage.cloud.google.com in Browser (Cookieauth)Cause: Browser downloads via https://storage.cloud.google.com/... use
Google Account cookie authentication (Cookieauth). Having Data Access
Audit Logging (DATA_READ / DATA_WRITE for storage.googleapis.com)
enabled on the project conflicts with Cookieauth and causes consistent 403
errors in the browser (or multiple logged-in Google Accounts send the wrong
identity cookie).
Fix: Inspect the bucket IAM policy/configuration and check the project's audit log configuration using:
CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-diagnostic)" \
gcloud projects get-iam-policy {project_id} --format="json(auditConfigs)"
Explain that Data Access Logging conflicts with Cookieauth when accessing
objects via storage.cloud.google.com in the browser. Advise accessing
objects via gcloud, API endpoints (storage.googleapis.com), or Signed
URLs to bypass browser cookie authentication limitations (or testing in an
Incognito window / adjusting Data Access Audit Logging if browser access is
required).
404 Not Found or Bucket does not existWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
gcs, google-cloud-storage, permission-denied, iam, troubleshooting, access-control
7 skills in this plugin
/gcs-security-assessmentAssesses the security posture of Google Cloud Storage (GCS) buckets and projects. Grounds every finding in gathered telemetry, evaluates buckets against Google security best practices (public access, IAM over-granting, CMEK, VPC Service Controls, audit logging), and correlates signals to flag toxic combinations of individually low-risk settings, with actionable remediation. Use whenever a user asks for a security scan, audit, review, vulnerability check, or compliance assessment (including SAIF) — or simply asks whether their buckets, project, or data are secure, exposed, public, or misconfigured, who can access their data, or wants storage hardened or locked down, e.g. before a launch. Don't use for diagnosing a specific access failure or 403, managing or configuring storage, investigating a live outage, or non-GCS resources (Compute Engine, GKE, etc.)./google-cloud-storage-basicsStores, 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)./google-cloud-storage-bucket-architectCreates Cloud Storage (Google Cloud Storage, or 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./google-cloud-storage-fuseMounts Cloud Storage buckets as a POSIX file system with Cloud Storage FUSE (gcsfuse). Use when you need to interact with gcsfuse — decide whether FUSE, native gs:// reads, or Filestore/Managed Lustre fits a workload, deploy tuned mounts on GKE, Compute Engine, or Cloud Run, enable and size the file, stat, and list caches, tune mount flags (--implicit-dirs) or config-file settings, apply workload profiles, keep ML checkpointing safe (rename atomicity, hierarchical namespace, close-time finalization, concurrent writers), or diagnose slow training, low throughput, or GCS bill spikes on existing mounts with gcsfuse metrics. Covers mount semantics, the gcsfuse CLI and config file, the GKE gcsfuse CSI driver (Workload Identity principal:// bindings, profile StorageClasses, sidecar sizing), and Cloud Run volume mounts. Don't use for bucket administration or data management without a mount (google-cloud-storage-basics) or for fully POSIX-compliant shared file systems (Filestore, Managed Lustre; use gke-storage)./google-cloud-storage-okfExperimental, generic, and powerful skill for token-efficient search, semantic navigation, and progressive disclosure of unstructured or semi-structured objects (PDFs, logs, JSON/CSV dumps, media, large documents) in Google Cloud Storage (GCS) using the Open Knowledge Format (OKF). Beyond basic retrieval, agents can creatively apply this skill to a broad spectrum of search and reasoning tasks, including: (1) high-precision search and point-queries within large objects without loading full content into context; (2) multi-hop cross-document search and synthesis across multiple cloud objects; (3) searching and temporal reasoning across chronologically partitioned log streams, audit trails, and incident timelines; and (4) creating reusable Table of Contents metadata for downstream agents. Use proactively whenever searching, querying, or interacting with gs:// URIs where full-object downloads would waste tokens, degrade context quality, or exceed window limits./google-cloud-storage-okf-bucketDiscovers, inventories, triages, and searches across Google Cloud Storage (GCS) buckets and prefixes (gs://bucket or gs://bucket/prefix/) using the Open Knowledge Format (OKF). Aggregates per-object OKF status (fresh, stale, unindexed), Tier 0 summaries, region titles, keywords, and custom contexts in a single metadata listing without downloading object payloads. Use when: (1) answering open-ended discovery, search, or root-cause triage questions across a GCS bucket or prefix; (2) auditing bucket OKF index health and identifying candidates_to_index; (3) comparing sections across multiple objects in a bucket; or (4) batch-indexing unindexed (20 KB or larger) and stale objects across a bucket. Don't use for single-object navigation when the exact gs://bucket/object URI is already known and no bucket-level discovery is needed (use google-cloud-storage-okf), or for bucket provisioning and IAM administration (use google-cloud-storage-basics or google-cloud-storage-bucket-architect).npx claudepluginhub googlecloudplatform/google-cloud-storage-plugin --plugin google-cloud-storageOther plugins' skills for the same job