Logo de Google Cloud Storage Diagnostic

Google Cloud Storage Diagnostic

Organisation
GoogleCloudPlatform
google-cloud-storage-diagnostic

Troubleshoots and diagnoses Cloud Storage on Google Cloud (also known colloquially as GCS) errors, 403 Permission Denied or Insufficient Permission denials, and access control conflicts. Use whenever a user encounters or asks to analyze a 403 error on a bucket or object — including analysis-only questions where no commands are run — or needs help with IAM bindings, fine-grained ACLs, Uniform Bucket-Level Access (UBLA), getIamPolicy inspection denials and least-privilege inspection roles, browser storage.cloud.google.com Cookieauth and Data Access Audit Logging conflicts, Signed URL SignatureDoesNotMatch errors, VPC Service Controls (VPC-SC) perimeters, explicit IAM Deny policies, Bucket IP Filtering, Requester Pays, Retention Policy locks, Compute Engine VM access scopes, Application Default Credentials (ADC) mismatches, recursive delete permissions, or recreated service accounts. Don't use for creating buckets, routine uploads/downloads, proactive security audits, or Cloud Storage FUSE mounts.

Présentation

ÉditeurGoogleCloudPlatform
Dépôtgoogle-cloud-storage-plugin
Nom de la compétencegoogle-cloud-storage-diagnostic
Étoiles
35
Forks
3
Fichiers inclus
2
LicenceApache-2.0
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont en simple Markdown, et non en code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • 2 fichiers inclus

    Des scripts, des modèles de documents et des références que le modèle peut consulter pendant son travail. Les fichiers sont en lecture seule et ne sont jamais exécutés.

  • Open source

    Publiée par GoogleCloudPlatform sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Google Cloud Storage Diagnostic dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Collez l’URL du dossier de la compétence indiquée ci-dessous, puis confirmez.
    https://github.com/GoogleCloudPlatform/google-cloud-storage-plugin/tree/main/skills/google-cloud-storage-diagnostic
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter → Via URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/GoogleCloudPlatform/google-cloud-storage-plugin.git /tmp/google-cloud-storage-plugin
mkdir -p .claude/skills
cp -r /tmp/google-cloud-storage-plugin/skills/google-cloud-storage-diagnostic .claude/skills/google-cloud-storage-diagnostic
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Google Cloud Storage Diagnostic dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Google Cloud Storage Diagnostic dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, Google Cloud Storage Diagnostic n’est pas lié au modèle pour lequel cette compétence a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

Cloud Storage Diagnostic

[!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.

Diagnostic Areas & Resources

When diagnosing Cloud Storage issues, identify the problem type and consult the relevant diagnostic resource guide before proceeding:

Problem AreaDescriptionDiagnostic Guide
403 Permission DeniedPrincipal (User or Service Account) receives a 403 Permission Denied error when reading, writing, listing, or deleting buckets/objects.references/403_troubleshooting.md

Attribution

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:

    bash
    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:

    bash
    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.

General Diagnostic Workflow

Whenever a user requests assistance diagnosing a Cloud Storage issue:

Step 1: Clarify Context and Scope

  • Clarify the exact principal (user:{email} or serviceAccount:{email}) experiencing the issue.
  • Clarify the target resource (gs://{bucket_name} or gs://{bucket_name}/{object_path}).
  • Identify the attempted operation (e.g., read object, write object, list bucket contents, delete object).
  • Identify the authentication mechanism (e.g., Signed URL, Cookieauth, OAuth token, Impersonation).

Step 2: Consult Specific Diagnostic Guide

  • If the issue involves a 403 Permission Denied error or IAM/ACL denial, immediately consult and execute the step-by-step diagnostic procedures documented in references/403_troubleshooting.md.
  • If running 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.

Step 3: Propose Remediation with User Confirmation

  • Synthesize your findings and explain why the access or operation failed (e.g., missing IAM role, UBLA restriction, legacy ACL mismatch, VPC-SC block).
  • Provide the exact gcloud remediation command.
  • Always include an explicit confirmation prompt (e.g., "Do you approve executing this command? [Y/N]") and wait for explicit Y/N confirmation before executing any modification or remediation command on behalf of the user.

Phase Summary

1. Discover Scope & Telemetry

  • Inputs: User input (principal, bucket/object URI, error text)
  • Outputs: Target scope, UBLA vs ACL classification
  • Reference Section: references/403_troubleshooting.md Steps 1-2

2. Telemetry & Policy Eval

  • Inputs: CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills..." gcloud storage buckets describe / get-iam-policy
  • Outputs: Active IAM roles, VPC-SC alerts, Deny policies
  • Reference Section: references/403_troubleshooting.md Steps 3-7

3. Edge-Case Root Cause Isolation

  • Inputs: Advanced signals (requesterPays, retentionPeriod, ADC)
  • Outputs: Root cause diagnosis
  • Reference Section: references/403_troubleshooting.md Step 8

4. Prescriptive Remediation

  • Inputs: Root cause diagnosis
  • Outputs: Tagged gcloud remediation command + Y/N prompt
  • Reference Section: Attribution section & Step 8

Error Handling Matrix

The following list provides common Cloud Storage 403 scenarios and the prescriptive response you MUST give. Use this exactly.

Permission 'storage.buckets.getIamPolicy' denied

  • Cause: Diagnostic caller lacks storage.buckets.getIamPolicy permission (e.g., missing roles/iam.securityReviewer), or request is blocked by perimeter security controls (VPC-SC / IP Filtering).
  • Fix: DO NOT LOOP OR RETRY. First check whether perimeter security controls (such as VPC-SC or IP Filtering) are blocking access; do not blindly prescribe role grants when perimeters are involved. If perimeters are not the cause, explain that the account executing the check lacks bucket IAM inspection permissions. Recommend granting the least-privilege role 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 provided

  • Cause: requesterPays: true enabled on target bucket
  • Fix: DO NOT LOOP OR RETRY. Even with full objectViewer roles, requests must pass billing project. Prescribe --billing-project=PROJECT_ID or -u PROJECT_ID.

Request is prohibited by organization's policy. vpcServiceControlsUniqueIdentifier

  • Cause: Request blocked by VPC Service Controls (VPC-SC) service perimeter
  • Fix: Inform user that adding IAM roles cannot bypass a VPC-SC perimeter. Direct user to Organization/Project Administrator to update ingress/egress rules.

Request is prohibited by organization's policy. (No VPC-SC ID)

  • Cause: Organization or Project IAM Deny policy (iam.googleapis.com/DenyPolicy) explicitly denies the permission
  • Fix: Explain that explicit IAM Deny policies take absolute precedence over standard allow roles and cannot be bypassed. Advise checking Deny policies (gcloud 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 roles

  • Cause: Legacy GCE VM Access Scopes (devstorage.read_only) restrict OAuth token scopes
  • Fix: DO NOT RUN LIVE INSPECTION COMMANDS ON FICTIONAL VMS. Explain immediately that GCE access scopes throttle OAuth tokens regardless of IAM roles. Advise setting scopes to cloud-platform (gcloud compute instances set-service-account INSTANCE --scopes=cloud-platform).

403 Permission Denied on object delete despite roles/storage.admin

  • Cause: Bucket has an active Retention Policy (retention_policy)
  • Fix: Explain that retention locks act as un-bypassable data protection holds and cannot be overridden by IAM until the retention timestamp expires.

403 Permission Denied on recreated Service Account with exact same email

  • Cause: Account deleted and recreated generates a new underlying Unique ID
  • Fix: Instruct user to remove the old IAM policy binding and re-add the exact same binding so IAM registers the new Unique ID.

403 Permission Denied due to Bucket IP Filter

  • Cause: 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:

    bash
    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 Cloud Audit Logs are inaccessible due to permission errors (403), do not loop or retry. Immediately halt technical diagnosis, inform the user you lack visibility into advanced network denials, and direct them to contact a Project/Organization Administrator to check the logs. If gcloud logging read returns an empty array [], Data Access Audit Logs are likely not enabled for Cloud Storage; instruct the user to turn on 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:

    bash
    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 exist

  • Cause: Target bucket does not exist or was deleted
  • Fix: DO NOT LOOP OR RETRY. Stop trying to execute live commands on the missing bucket. Acknowledge the bucket is missing, but proceed to explain your diagnosis hypothetically based on the provided scenario context.

Fichiers inclus

Le modèle lit ces fichiers à la demande lorsque la compétence est chargée. Ils sont accessibles en lecture et ne sont jamais exécutés.

Foire aux questions

À quoi sert la compétence IA Google Cloud Storage Diagnostic ?

Troubleshoots and diagnoses Cloud Storage on Google Cloud (also known colloquially as GCS) errors, 403 Permission Denied or Insufficient Permission denials, and access control conflicts. Use whenever a user encounters or asks to analyze a 403 error on a bucket or object — including analysis-only questions where no commands are run — or needs help with IAM bindings, fine-grained ACLs, Uniform Bucket-Level Access (UBLA), getIamPolicy inspection denials and least-privilege inspection roles, browser storage.cloud.google.com Cookieauth and Data Access Audit Logging conflicts, Signed URL Signatur...

Pourquoi utiliser Google Cloud Storage Diagnostic sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Google Cloud Storage Diagnostic se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Google Cloud Storage Diagnostic dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/GoogleCloudPlatform/google-cloud-storage-plugin/tree/main/skills/google-cloud-storage-diagnostic. TypingMind lit le fichier SKILL.md, regroupe les fichiers associés et installe le tout sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Google Cloud Storage Diagnostic ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Google Cloud Storage Diagnostic ?

Autant que vous le souhaitez. Tant qu’un modèle prend en charge les compétences, vous pouvez utiliser Google Cloud Storage Diagnostic avec lui : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Google Cloud Storage Diagnostic est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par GoogleCloudPlatform sous licence Apache-2.0. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, modèles de documents ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇