Guide · Agent skill
How to use the Cloud Storage 403 Diagnostic agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The Cloud Storage 403 Diagnostic skill is a set of instructions that lets an AI agent work through "403 Permission Denied" errors on Google Cloud Storage buckets and objects. It is for engineers and Cloud admins who need to know why a user or service account cannot read, write, list or delete data. After this guide you will know what the skill does, how to install it, how to ask for help in plain language, and what it will and will not do on your project.
Quick start
- 1Install the Google Cloud CLI. Install gcloud by following the Google Cloud CLI Installation Guide linked in the skill, then confirm you can access the project.
- 2Download the skill ZIP. Download the google-cloud-storage-diagnostic ZIP from this page.
- 3Unzip into a skills folder. Extract the archive into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder.
- 4Or upload it in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP.
- 5Describe the 403 error. Give the agent the principal, the bucket or object path, the operation and the exact error message.
- 6Review each proposed command. Read the exact gcloud command the agent prints and the change it explains.
- 7Approve or decline one command at a time. Reply Y to run a single approved command, or N to stop. Every later command needs its own approval.
What does the skill make the agent do?
Once installed, the agent follows a structured diagnostic procedure for access-denied problems. It identifies the principal (a user or service account) trying to reach a resource, the target bucket or object, the operation attempted, and the authentication mechanism used. It then checks likely causes such as IAM permissions, ACLs, VPC Service Controls perimeters, IAM Deny policies, Bucket IP Filtering and credential mismatches, and explains what it found.
The skill's own guide tells the agent to check whether Uniform Bucket-Level Access (UBLA) is enabled before looking at object ACLs, because when UBLA is enabled object-level ACLs are ignored.
- Clarifies the principal, target resource, operation and authentication method
- Checks IAM bindings, ACLs, UBLA, perimeters and credentials
- Explains the likely root cause in plain terms
- Proposes a fix only after you approve it
Install the skill from a ZIP file
Download the ZIP for the skill from this page. The skill's files are SKILL.md and references/403_troubleshooting.md. Unzip the archive into one of these locations, depending on how you want to use it:
- Personal use across projects: ~/.claude/skills/
- Single project: the .claude/skills/ folder inside your project
- Claude apps: upload the ZIP under Settings → Capabilities → Skills
Install the Google Cloud CLI and check access
The skill runs gcloud inspection commands against your project, so you need the Google Cloud CLI (gcloud) installed. The source links to the Google Cloud CLI Installation Guide for setup. You also need access to the project and bucket you are diagnosing, with credentials that can run gcloud storage commands. Curl is optional and only needed for direct HTTP calls.
How to ask for help with natural requests
You do not need special syntax. Describe the failing call, the principal and the resource. The agent will ask for anything it is missing, such as the principal's email, the bucket or object path, or the exact error text. Requests the skill is built for include:
- "My service account gets 403 Permission Denied when reading gs://my-bucket/reports/. Why?"
- "Why can this user list objects in the bucket but not delete them?"
- "Our VPC Service Controls perimeter may be blocking Cloud Storage access. Can you check?"
- "Signed URLs for this bucket return SignatureDoesNotMatch. What is wrong?"
- "Explain why get-iam-policy returns 403 on this bucket."
Understand the approval step
The skill's safety rule is that the agent must never run a command that changes state or configuration without your prior approval. Before any change, it prints the exact command, explains the proposed change, and asks for confirmation such as "Do you approve executing this command? [Y/N]". Each approval covers only that single command. Commands the source names as state-changing include gcloud storage buckets add-iam-policy-binding and gcloud storage buckets update.
The agent is also told not to loop on inspection commands. If gcloud storage buckets get-iam-policy returns 403, it should first rule out perimeter controls such as VPC-SC or IP Filtering, since granting IAM roles will not fix a perimeter block. If perimeters are not the cause, the caller likely lacks the storage.buckets.getIamPolicy permission. The skill recommends the least-privilege role roles/iam.securityReviewer, or a custom role that contains that permission, and says not to use roles/storage.bucketViewer or roles/storage.admin for this.
Attribution tags on commands
The skill requires every gcloud command it runs or suggests to carry a metrics environment variable that labels the activity as coming from this skill. The variable is set inline on each command, not with gcloud config set, so the label does not persist after the task. Curl calls must include a User-Agent header. You do not need to write these yourself, but you will see them in the commands the agent shows you.
CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills/1.0 (skill:google-cloud-storage-diagnostic)" gcloud <command> [flags]Safety notes: scripts and network
This skill runs scripts and uses the network. Its diagnosis depends on running gcloud inspection commands against your Google Cloud project, so it will send requests to Google Cloud on your behalf using your credentials. Review each command before you approve it. Its scope is troubleshooting denials only, so it is not a general security audit tool, and it should not be used for Cloud Storage FUSE mounts.
- Use an account that has only the access you need for diagnosis
- Read each proposed command before answering Y
- Do not approve a command you do not understand
- Remember that an approval covers one command only
What people use it for
- Finding why a service account gets 403 when reading objects in a bucket with uniform bucket-level access turned on
- Checking whether a VPC Service Controls perimeter is blocking a Compute Engine VM or other caller
- Diagnosing a 403 on gcloud storage buckets get-iam-policy and identifying the missing inspection permission
- Explaining a SignatureDoesNotMatch error on a Signed URL
- Investigating a recreated service account that no longer matches its old bucket permissions
Frequently asked questions
How do I install the cloud storage 403 diagnostic skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps you can instead upload the ZIP under Settings → Capabilities → Skills.
Is the Cloud Storage 403 diagnostic skill free?
The skill is published under the Apache-2.0 licence, which is the licence stated on its page. Google Cloud usage itself may have its own costs, and this page does not give pricing details.
What do I need to run this skill?
You need the Google Cloud CLI (gcloud) for inspection commands, access to the Google Cloud project and bucket being diagnosed, and credentials that can run gcloud storage commands. Curl is optional for direct HTTP calls.
Will the skill change my buckets or permissions automatically?
No. The skill requires the agent to print each state-changing command and wait for your explicit approval. Each approval applies only to that single command.
What is the skill not meant for?
It is not for creating buckets, routine uploads or downloads, Cloud Storage FUSE mounts, or proactive security audits of a project. It only diagnoses access denials.
What should I do if get-iam-policy returns 403 Permission Denied?
Do not keep retrying the command. First check that VPC Service Controls or IP Filtering are not blocking access, because IAM roles will not fix a perimeter block. If they are not the cause, the caller likely needs storage.buckets.getIamPolicy, and the skill suggests roles/iam.securityReviewer or a custom role containing that permission.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits engineers and Cloud admins who need a structured, approval-gated explanation of a 403 on Cloud Storage and who can run gcloud against their project. If you need to create buckets, manage routine transfers, run a full security audit or mount buckets with FUSE, pick a different tool.
Download the skill