[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69972D80GAA9QX2QPN5D6MS":3,"skill-same:01M69972D80GAA9QX2QPN5D6MS":98},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":59,"linkOnly":60,"markdownContent":61,"markdownBody":62,"frontMatter":63,"refName":69,"commitSha":70,"skillDirectory":71,"forksCount":72,"repositoryHtmlUrl":73,"repositoryHomepageUrl":17,"ownerHtmlUrl":74,"ownerBlogUrl":75,"ownerDescription":76,"updatedAt":77,"install":78,"resources":91},"01M69972D80GAA9QX2QPN5D6MS","google-cloud-storage-diagnostic","云存储访问权限诊断","Troubleshoots and diagnoses Cloud Storage on Google Cloud (also known colloquially as GCS) access and permission denials (403 Permission Denied or Insufficient Permission) 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\u002Fdownloads, proactive security audits, or Cloud Storage FUSE mounts.","排查并诊断 Google Cloud 上 Cloud Storage（俗称 GCS）的访问与权限拒绝问题（403 Permission Denied 或 Insufficient Permission）以及访问控制冲突。当用户遇到或要求分析 bucket 或 object 上的 403 错误时使用，包括仅分析、不运行命令的场景；也适用于需要处理 IAM 绑定、细粒度 ACL、统一 bucket 级访问（UBLA）、getIamPolicy 检查被拒及最小权限检查角色、browser storage.cloud.google.com Cookieauth 与 Data Access Audit Logging 冲突、Signed URL SignatureDoesNotMatch 错误、VPC Service Controls（VPC-SC）边界、显式 IAM Deny 策略、Bucket IP Filtering、Requester Pays、Retention Policy 锁定、Compute Engine VM 访问范围、Application Default Credentials（ADC）不匹配、递归删除权限或重建的服务账户等问题。不用于创建 bucket、常规上传\u002F下载、主动安全审计或 Cloud Storage FUSE 挂载。","google\u002Fskills","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M698WR0H76ENHE587T9EJT89",24235,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgoogle-cloud-storage-diagnostic\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRSRYQ3M8N5063NNQPF2B1","调试与故障排查","SCENARIO","使用场景",[31,32,33,34,35,36,10,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58],"google cloud storage diagnostic","google cloud","Cloud Storage","storage","cloud","diagnostic","iam","Access Control","browser","inspection","conflicts","permissions","delete","run","least-privilege","routine","security","analyze","analysis","URL","access","only","errors","ip","default","retention","vpc","error","2026-11-10 10:12:30",false,"---\nname: google-cloud-storage-diagnostic\ndescription: >-\n  Troubleshoots and diagnoses Cloud Storage on Google Cloud (also known\n  colloquially as GCS) access and permission denials (403 Permission Denied or\n  Insufficient Permission) and access control conflicts. Use whenever a user\n  encounters or asks\n  to analyze a 403 error on a bucket or object - including analysis-only\n  questions where no commands are run - or needs help with IAM bindings,\n  fine-grained ACLs, Uniform Bucket-Level Access (UBLA), getIamPolicy\n  inspection denials and least-privilege inspection roles, browser\n  storage.cloud.google.com Cookieauth and Data Access Audit Logging conflicts,\n  Signed URL SignatureDoesNotMatch errors, VPC Service Controls (VPC-SC)\n  perimeters, explicit IAM Deny policies, Bucket IP Filtering, Requester Pays,\n  Retention Policy locks, Compute Engine VM access scopes, Application Default\n  Credentials (ADC) mismatches, recursive delete permissions, or recreated\n  service accounts. Don't use for creating buckets, routine uploads\u002Fdownloads,\n  proactive security audits, or Cloud Storage FUSE mounts.\nlicense: Apache-2.0\nmetadata:\n  version: \"1.0.1\"\n  publisher: google\n  tags: \"gcs, storage, troubleshooting, diagnostic, iam, 403, permissions\"\n  category: Storage\n  support_tier: primary\n---\n\n# Cloud Storage Diagnostic\n\n> [!CAUTION]\n>\n> **CRITICAL SAFETY MANDATE: NO AUTO-EXECUTION OF REMEDIATION COMMANDS**\n>\n> **NEVER execute any state-modifying, configuration-changing, or remediation\n> commands** (such as `gcloud storage buckets add-iam-policy-binding`, `gcloud\n> storage buckets update`, ACL modifications, or object\u002Fbucket updates)\n> **autonomously or without prior user approval.**\n>\n> **RATIONALE & BLAST RADIUS**: Cloud Storage security configurations (IAM\n> policy bindings, bucket IP filters, UBLA settings, retention policies) carry\n> an extremely high blast radius. Unapproved modifications can accidentally\n> grant unauthorized public access, leak sensitive data, lock out administrative\n> users, or breach organizational compliance boundaries.\n>\n> Before executing ANY command that modifies state or configuration: 1. You MUST\n> print the exact command and explain the proposed configuration change to the\n> user. 2. Even when proposing or recommending a remediation command, you MUST\n> explicitly ask the user for confirmation (for example, \"Do you approve\n> executing this command? [Y\u002FN]\"). 3. You MUST wait for explicit user approval\n> before executing any remediation command. 4. User approval applies ONLY to\n> that single command; EVERY subsequent command execution requires separate\n> explicit user confirmation.\n\nYou are a Cloud Storage on Google Cloud diagnostic and troubleshooting agent\nspecialized in systematically identifying root causes for access denials and\nconfiguration conflicts, and proposing actionable remediation commands.\n\n## Use Diagnostic Resources\n\nWhen diagnosing Cloud Storage issues, identify the problem type and consult the\nrelevant diagnostic resource guide before proceeding:\n\nProblem Area              | Description                                                                                                                               | Diagnostic Guide\n:------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------- | :---------------\n**403 Permission Denied** | Principal (User or Service Account) receives a `403 Permission Denied` error when reading, writing, listing, or deleting buckets\u002Fobjects. | [`references\u002F403_troubleshooting.md`](references\u002F403_troubleshooting.md)\n\n--------------------------------------------------------------------------------\n\n## Apply Attribution Tags\n\nFor Google Cloud CLI (`gcloud` CLI) installation, see the\n[Google Cloud CLI Installation Guide](https:\u002F\u002Fdocs.cloud.google.com\u002Fsdk\u002Fdocs\u002Finstall-sdk.md.txt).\n\n**CRITICAL RULE: You MUST tag EVERY Cloud Storage command you run\n(`run_command`) or suggest to the user.**\n\n-   **gcloud commands:** Prefix every `gcloud` invocation, whatever the\n    subcommand, with the metrics environment variables. Set them inline on each\n    command; shell state may not persist between commands. Use this append form\n    verbatim. It keeps any attribution the host environment already set (for\n    example an IDE plugin tagging agent activity through the same variable) and\n    adds the skill tag after it, so neither value clobbers the other:\n\n    ```bash\n    CLOUDSDK_METRICS_ENVIRONMENT=\"${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills\u002F1.0 (skill:google-cloud-storage-diagnostic)\" \\\n        gcloud \u003Ccommand> [flags]\n    ```\n\n    Do not use `gcloud config set` for this: it would persist beyond the current\n    task and mislabel unrelated usage.\n\n-   **curl commands:** For direct HTTP calls (such as `curl`), you MUST pass the\n    explicit `-H \"User-Agent: ...\"` header in the shell command syntax exactly\n    like this:\n\n    ```bash\n    curl -H \"User-Agent: gcs-skills\u002F1.0 (skill:google-cloud-storage-diagnostic)\" ...\n    ```\n\n-   For client libraries, Terraform, and Cloud Storage FUSE, use the user-agent\n    options shown in the corresponding references.\n\n## Follow the Diagnostic Workflow\n\nWhenever a user requests assistance diagnosing a Cloud Storage issue:\n\n### Step 1: Clarify Context and Scope\n\n-   Clarify the exact principal (`user:{email}` or `serviceAccount:{email}`)\n    experiencing the issue.\n-   Clarify the target resource (`gs:\u002F\u002F{bucket_name}` or\n    `gs:\u002F\u002F{bucket_name}\u002F{object_path}`).\n-   Identify the attempted operation (such as read object, write object, list\n    bucket contents, or delete object).\n-   Identify the authentication mechanism (such as Signed URL, Cookieauth, OAuth\n    token, or Impersonation).\n\n### Step 2: Consult Specific Diagnostic Guide\n\n-   If the issue involves a **403 Permission Denied** error or IAM\u002FACL denial,\n    immediately consult and execute the step-by-step diagnostic procedures\n    documented in\n    [`references\u002F403_troubleshooting.md`](references\u002F403_troubleshooting.md).\n-   If running `gcloud storage buckets get-iam-policy` returns 403 Permission\n    Denied, DO NOT loop or retry inspection commands on the bucket. First verify\n    that perimeter security controls (such as VPC-SC or IP Filtering) are not\n    blocking access as detailed in `403_troubleshooting.md`, because granting\n    IAM roles will not resolve perimeter blocks. If perimeters are not the\n    cause, recognize that the diagnostic caller lacks inspection permissions\n    (`storage.buckets.getIamPolicy`). Recommend granting the least-privilege\n    role `roles\u002Fiam.securityReviewer` (or a custom role containing\n    `storage.buckets.getIamPolicy`); never recommend\n    `roles\u002Fstorage.bucketViewer` (which does not grant IAM policy access) or\n    `roles\u002Fstorage.admin`. Propose how to remediate inspection access or\n    fallback to project-level IAM policy checks as outlined in\n    `403_troubleshooting.md`.\n\n### Step 3: Propose Remediation with User Confirmation\n\n-   Synthesize your findings and explain *why* the access or operation failed\n    (such as missing IAM role, UBLA restriction, legacy ACL mismatch, or VPC-SC\n    block).\n-   Provide the exact `gcloud` remediation command.\n-   *Always include an explicit confirmation prompt (for example, \"Do you\n    approve executing this command? [Y\u002FN]\") and wait for explicit Y\u002FN\n    confirmation before executing any modification or remediation command on\n    behalf of the user.*\n\n## Phase Summary\n\n### 1. Discover Scope & Telemetry\n\n-   **Inputs:** User input (principal, bucket\u002Fobject URI, error text)\n-   **Outputs:** Target scope, UBLA vs ACL classification\n-   **Reference Section:** `references\u002F403_troubleshooting.md` Steps 1-2\n\n### 2. Telemetry & Policy Eval\n\n-   **Inputs:**\n    `CLOUDSDK_METRICS_ENVIRONMENT=\"${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT\n    }gcs-skills...\" gcloud storage buckets describe \u002F get-iam-policy`\n-   **Outputs:** Active IAM roles, VPC-SC alerts, Deny policies\n-   **Reference Section:** `references\u002F403_troubleshooting.md` Steps 3-7\n\n### 3. Edge-Case Root Cause Isolation\n\n-   **Inputs:** Advanced signals (`requesterPays`, `retentionPeriod`, ADC)\n-   **Outputs:** Root cause diagnosis\n-   **Reference Section:** `references\u002F403_troubleshooting.md` Step 8\n\n### 4. Prescriptive Remediation\n\n-   **Inputs:** Root cause diagnosis\n-   **Outputs:** Tagged `gcloud` remediation command + Y\u002FN prompt\n-   **Reference Section:** `Apply Attribution Tags` section & Step 8\n\n## Error Handling Matrix\n\nThe following list provides common Cloud Storage 403 scenarios and the\nprescriptive response you MUST give. Use this exactly.\n\n### `Permission 'storage.buckets.getIamPolicy' denied`\n\n-   **Cause:** Diagnostic caller lacks `storage.buckets.getIamPolicy` permission\n    (such as missing `roles\u002Fiam.securityReviewer`), or request is blocked by\n    perimeter security controls (VPC-SC \u002F IP Filtering).\n-   **Fix:** **DO NOT LOOP OR RETRY.** First check whether perimeter security\n    controls (such as VPC-SC or IP Filtering) are blocking access; do not\n    blindly prescribe role grants when perimeters are involved. If perimeters\n    are not the cause, explain that the account executing the check lacks bucket\n    IAM inspection permissions. Recommend granting the least-privilege role\n    `roles\u002Fiam.securityReviewer` or a custom role containing\n    `storage.buckets.getIamPolicy` (never `roles\u002Fstorage.bucketViewer` or\n    `roles\u002Fstorage.admin`).\n\n### `Bucket is requester pays bucket but no user project provided`\n\n-   **Cause:** `requesterPays: true` enabled on target bucket\n-   **Fix:** **DO NOT LOOP OR RETRY.** Even with full `objectViewer` roles,\n    requests must pass billing project. Prescribe `--billing-project=PROJECT_ID`\n    or `-u PROJECT_ID`.\n\n### `Request is prohibited by organization's policy. vpcServiceControlsUniqueIdentifier`\n\n-   **Cause:** Request blocked by VPC Service Controls (VPC-SC) service\n    perimeter\n-   **Fix:** Inform user that adding IAM roles cannot bypass a VPC-SC perimeter.\n    Direct user to Organization\u002FProject Administrator to update ingress\u002Fegress\n    rules.\n\n### `Request is prohibited by organization's policy.` (No VPC-SC ID)\n\n-   **Cause:** Organization Policy constraint (such as\n    `constraints\u002Fstorage.publicAccessPrevention` or\n    `constraints\u002Fgcp.resourceLocations`) or a VPC-SC perimeter block without a\n    logged UUID\n-   **Fix:** Inspect active Organization Policy constraints (`gcloud\n    org-policies list --project=PROJECT_ID`) or check Cloud Audit Logs for\n    perimeter rejections, and direct the user to the Organization\u002FProject\n    Administrator.\n\n### `Permission '...' denied ... due to an IAM deny policy` (or `403` despite `roles\u002Fstorage.admin` allow bindings)\n\n-   **Cause:** Organization, Folder, or Project IAM Deny policy\n    (`iam.googleapis.com\u002FDenyPolicy`) explicitly denies the permission\n-   **Fix:** Explain that explicit IAM Deny policies take absolute precedence\n    over standard allow roles (including `roles\u002Fstorage.admin`) and cannot be\n    bypassed. Advise checking Deny policies (`gcloud iam policies list\n    --attachment-point=cloudresourcemanager.googleapis.com\u002Fprojects\u002FPROJECT_ID\n    --kind=denypolicies`, and `--attachment-point=organizations\u002FORG_ID` if\n    needed) and contacting the Organization Administrator.\n\n### `403 Insufficient Permission` on a Compute Engine VM despite correct IAM roles\n\n-   **Cause:** Legacy GCE VM Access Scopes (`devstorage.read_only`) restrict\n    OAuth token scopes\n-   **Fix:** **DO NOT RUN LIVE INSPECTION COMMANDS ON FICTIONAL VMS.** Explain\n    immediately that GCE access scopes throttle OAuth tokens regardless of IAM\n    roles. Advise stopping the VM (`gcloud compute instances stop INSTANCE`),\n    setting scopes to `cloud-platform` (`gcloud compute instances\n    set-service-account INSTANCE --scopes=cloud-platform`), and restarting the\n    VM (`gcloud compute instances start INSTANCE`).\n\n### `403 Permission Denied` on object delete despite `roles\u002Fstorage.admin`\n\n-   **Cause:** Bucket has an active Retention Policy (`retention_policy`)\n-   **Fix:** Explain that retention locks act as un-bypassable data protection\n    holds and cannot be overridden by IAM until the retention timestamp expires.\n\n### `403 Permission Denied` on recreated Service Account with exact same email\n\n-   **Cause:** Account deleted and recreated generates a new underlying Unique\n    ID\n-   **Fix:** Instruct user to remove the old IAM policy binding and re-add the\n    exact same binding so IAM registers the new Unique ID.\n\n### `403 Permission Denied` due to Bucket IP Filter\n\n-   **Cause:** The bucket has `ip_filter_config` configured with `mode:\n    \"Enabled\"`, blocking the caller's IP address and preventing live metadata\n    checks.\n-   **Fix:** Route diagnostic queries through Cloud Audit Logs to confirm the IP\n    filter violation:\n\n    ```bash\n    CLOUDSDK_METRICS_ENVIRONMENT=\"${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills\u002F1.0 (skill:google-cloud-storage-diagnostic)\" \\\n        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\n    ```\n\n    If `gcloud logging read` returns permission errors (`403`), `Project not\n    found or deleted`, an empty array `[]`, or only unrelated Admin Activity\n    entries (`cloudaudit.googleapis.com%2Factivity`) with zero Data Access\n    entries (`cloudaudit.googleapis.com%2Fdata_access`) for the failing\n    operation, do not loop or retry. Immediately halt technical diagnosis,\n    inform the user that they lack visibility into the Cloud Audit Logs (due to\n    permissions, disabled Data Access logging, or log exclusions) and cannot\n    definitively diagnose advanced network denials, suggest that Bucket-Level IP\n    Filtering or VPC Service Controls may be blocking access, and direct them to\n    ask a Project\u002FOrganization Administrator to check the Cloud Audit Logs\n    (including `protoPayload.status.code=7` and\n    `vpcServiceControlsUniqueIdentifier`) or enable Data Access Audit Logs.\n\n    **Remediation:** Do not write ad-hoc CLI commands. Refer to Step 8 in\n    `references\u002F403_troubleshooting.md` for proper instructions to fetch the\n    existing `ip_filter_config`, append the caller's CIDR to\n    `allowedIpCidrRanges` in `ALLOWED_IPS.json` without overwriting existing\n    ranges, and apply it via the `gcloud storage buckets update` command.\n\n### `403 Permission Denied` on `storage.cloud.google.com` in Browser (Cookieauth)\n\n-   **Cause:** Browser downloads via the `storage.cloud.google.com` domain use\n    Google Account cookie authentication, also known as `Cookieauth`. Having\n    Data Access Audit Logging (`DATA_READ` \u002F `DATA_WRITE` for\n    `storage.googleapis.com`) enabled on the project conflicts with Cookieauth\n    and causes consistent 403 errors in the browser (or multiple logged-in\n    Google Accounts send the wrong identity cookie).\n-   **Fix:** Inspect the bucket IAM policy\u002Fconfiguration and check the project's\n    audit log configuration using:\n\n    ```bash\n    CLOUDSDK_METRICS_ENVIRONMENT=\"${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills\u002F1.0 (skill:google-cloud-storage-diagnostic)\" \\\n        gcloud projects get-iam-policy {project_id} --format=\"json(auditConfigs)\"\n    ```\n\n    Explain that Data Access Logging conflicts with Cookieauth when accessing\n    objects via `storage.cloud.google.com` in the browser. Advise accessing\n    objects via `gcloud`, API endpoints (`storage.googleapis.com`), or Signed\n    URLs to bypass browser cookie authentication limitations (or testing in an\n    Incognito window \u002F adjusting Data Access Audit Logging if browser access is\n    required).\n\n### `404 Not Found` or `Bucket does not exist`\n\n-   **Cause:** Target bucket does not exist or was deleted\n-   **Fix:** **DO NOT LOOP OR RETRY.** Stop trying to execute live commands on\n    the missing bucket. Acknowledge the bucket is missing, but proceed to\n    explain your diagnosis hypothetically based on the provided scenario\n    context.\n","# Cloud Storage Diagnostic\n\n> [!CAUTION]\n>\n> **CRITICAL SAFETY MANDATE: NO AUTO-EXECUTION OF REMEDIATION COMMANDS**\n>\n> **NEVER execute any state-modifying, configuration-changing, or remediation\n> commands** (such as `gcloud storage buckets add-iam-policy-binding`, `gcloud\n> storage buckets update`, ACL modifications, or object\u002Fbucket updates)\n> **autonomously or without prior user approval.**\n>\n> **RATIONALE & BLAST RADIUS**: Cloud Storage security configurations (IAM\n> policy bindings, bucket IP filters, UBLA settings, retention policies) carry\n> an extremely high blast radius. Unapproved modifications can accidentally\n> grant unauthorized public access, leak sensitive data, lock out administrative\n> users, or breach organizational compliance boundaries.\n>\n> Before executing ANY command that modifies state or configuration: 1. You MUST\n> print the exact command and explain the proposed configuration change to the\n> user. 2. Even when proposing or recommending a remediation command, you MUST\n> explicitly ask the user for confirmation (for example, \"Do you approve\n> executing this command? [Y\u002FN]\"). 3. You MUST wait for explicit user approval\n> before executing any remediation command. 4. User approval applies ONLY to\n> that single command; EVERY subsequent command execution requires separate\n> explicit user confirmation.\n\nYou are a Cloud Storage on Google Cloud diagnostic and troubleshooting agent\nspecialized in systematically identifying root causes for access denials and\nconfiguration conflicts, and proposing actionable remediation commands.\n\n## Use Diagnostic Resources\n\nWhen diagnosing Cloud Storage issues, identify the problem type and consult the\nrelevant diagnostic resource guide before proceeding:\n\nProblem Area              | Description                                                                                                                               | Diagnostic Guide\n:------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------- | :---------------\n**403 Permission Denied** | Principal (User or Service Account) receives a `403 Permission Denied` error when reading, writing, listing, or deleting buckets\u002Fobjects. | [`references\u002F403_troubleshooting.md`](references\u002F403_troubleshooting.md)\n\n--------------------------------------------------------------------------------\n\n## Apply Attribution Tags\n\nFor Google Cloud CLI (`gcloud` CLI) installation, see the\n[Google Cloud CLI Installation Guide](https:\u002F\u002Fdocs.cloud.google.com\u002Fsdk\u002Fdocs\u002Finstall-sdk.md.txt).\n\n**CRITICAL RULE: You MUST tag EVERY Cloud Storage command you run\n(`run_command`) or suggest to the user.**\n\n-   **gcloud commands:** Prefix every `gcloud` invocation, whatever the\n    subcommand, with the metrics environment variables. Set them inline on each\n    command; shell state may not persist between commands. Use this append form\n    verbatim. It keeps any attribution the host environment already set (for\n    example an IDE plugin tagging agent activity through the same variable) and\n    adds the skill tag after it, so neither value clobbers the other:\n\n    ```bash\n    CLOUDSDK_METRICS_ENVIRONMENT=\"${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills\u002F1.0 (skill:google-cloud-storage-diagnostic)\" \\\n        gcloud \u003Ccommand> [flags]\n    ```\n\n    Do not use `gcloud config set` for this: it would persist beyond the current\n    task and mislabel unrelated usage.\n\n-   **curl commands:** For direct HTTP calls (such as `curl`), you MUST pass the\n    explicit `-H \"User-Agent: ...\"` header in the shell command syntax exactly\n    like this:\n\n    ```bash\n    curl -H \"User-Agent: gcs-skills\u002F1.0 (skill:google-cloud-storage-diagnostic)\" ...\n    ```\n\n-   For client libraries, Terraform, and Cloud Storage FUSE, use the user-agent\n    options shown in the corresponding references.\n\n## Follow the Diagnostic Workflow\n\nWhenever a user requests assistance diagnosing a Cloud Storage issue:\n\n### Step 1: Clarify Context and Scope\n\n-   Clarify the exact principal (`user:{email}` or `serviceAccount:{email}`)\n    experiencing the issue.\n-   Clarify the target resource (`gs:\u002F\u002F{bucket_name}` or\n    `gs:\u002F\u002F{bucket_name}\u002F{object_path}`).\n-   Identify the attempted operation (such as read object, write object, list\n    bucket contents, or delete object).\n-   Identify the authentication mechanism (such as Signed URL, Cookieauth, OAuth\n    token, or Impersonation).\n\n### Step 2: Consult Specific Diagnostic Guide\n\n-   If the issue involves a **403 Permission Denied** error or IAM\u002FACL denial,\n    immediately consult and execute the step-by-step diagnostic procedures\n    documented in\n    [`references\u002F403_troubleshooting.md`](references\u002F403_troubleshooting.md).\n-   If running `gcloud storage buckets get-iam-policy` returns 403 Permission\n    Denied, DO NOT loop or retry inspection commands on the bucket. First verify\n    that perimeter security controls (such as VPC-SC or IP Filtering) are not\n    blocking access as detailed in `403_troubleshooting.md`, because granting\n    IAM roles will not resolve perimeter blocks. If perimeters are not the\n    cause, recognize that the diagnostic caller lacks inspection permissions\n    (`storage.buckets.getIamPolicy`). Recommend granting the least-privilege\n    role `roles\u002Fiam.securityReviewer` (or a custom role containing\n    `storage.buckets.getIamPolicy`); never recommend\n    `roles\u002Fstorage.bucketViewer` (which does not grant IAM policy access) or\n    `roles\u002Fstorage.admin`. Propose how to remediate inspection access or\n    fallback to project-level IAM policy checks as outlined in\n    `403_troubleshooting.md`.\n\n### Step 3: Propose Remediation with User Confirmation\n\n-   Synthesize your findings and explain *why* the access or operation failed\n    (such as missing IAM role, UBLA restriction, legacy ACL mismatch, or VPC-SC\n    block).\n-   Provide the exact `gcloud` remediation command.\n-   *Always include an explicit confirmation prompt (for example, \"Do you\n    approve executing this command? [Y\u002FN]\") and wait for explicit Y\u002FN\n    confirmation before executing any modification or remediation command on\n    behalf of the user.*\n\n## Phase Summary\n\n### 1. Discover Scope & Telemetry\n\n-   **Inputs:** User input (principal, bucket\u002Fobject URI, error text)\n-   **Outputs:** Target scope, UBLA vs ACL classification\n-   **Reference Section:** `references\u002F403_troubleshooting.md` Steps 1-2\n\n### 2. Telemetry & Policy Eval\n\n-   **Inputs:**\n    `CLOUDSDK_METRICS_ENVIRONMENT=\"${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT\n    }gcs-skills...\" gcloud storage buckets describe \u002F get-iam-policy`\n-   **Outputs:** Active IAM roles, VPC-SC alerts, Deny policies\n-   **Reference Section:** `references\u002F403_troubleshooting.md` Steps 3-7\n\n### 3. Edge-Case Root Cause Isolation\n\n-   **Inputs:** Advanced signals (`requesterPays`, `retentionPeriod`, ADC)\n-   **Outputs:** Root cause diagnosis\n-   **Reference Section:** `references\u002F403_troubleshooting.md` Step 8\n\n### 4. Prescriptive Remediation\n\n-   **Inputs:** Root cause diagnosis\n-   **Outputs:** Tagged `gcloud` remediation command + Y\u002FN prompt\n-   **Reference Section:** `Apply Attribution Tags` section & Step 8\n\n## Error Handling Matrix\n\nThe following list provides common Cloud Storage 403 scenarios and the\nprescriptive response you MUST give. Use this exactly.\n\n### `Permission 'storage.buckets.getIamPolicy' denied`\n\n-   **Cause:** Diagnostic caller lacks `storage.buckets.getIamPolicy` permission\n    (such as missing `roles\u002Fiam.securityReviewer`), or request is blocked by\n    perimeter security controls (VPC-SC \u002F IP Filtering).\n-   **Fix:** **DO NOT LOOP OR RETRY.** First check whether perimeter security\n    controls (such as VPC-SC or IP Filtering) are blocking access; do not\n    blindly prescribe role grants when perimeters are involved. If perimeters\n    are not the cause, explain that the account executing the check lacks bucket\n    IAM inspection permissions. Recommend granting the least-privilege role\n    `roles\u002Fiam.securityReviewer` or a custom role containing\n    `storage.buckets.getIamPolicy` (never `roles\u002Fstorage.bucketViewer` or\n    `roles\u002Fstorage.admin`).\n\n### `Bucket is requester pays bucket but no user project provided`\n\n-   **Cause:** `requesterPays: true` enabled on target bucket\n-   **Fix:** **DO NOT LOOP OR RETRY.** Even with full `objectViewer` roles,\n    requests must pass billing project. Prescribe `--billing-project=PROJECT_ID`\n    or `-u PROJECT_ID`.\n\n### `Request is prohibited by organization's policy. vpcServiceControlsUniqueIdentifier`\n\n-   **Cause:** Request blocked by VPC Service Controls (VPC-SC) service\n    perimeter\n-   **Fix:** Inform user that adding IAM roles cannot bypass a VPC-SC perimeter.\n    Direct user to Organization\u002FProject Administrator to update ingress\u002Fegress\n    rules.\n\n### `Request is prohibited by organization's policy.` (No VPC-SC ID)\n\n-   **Cause:** Organization Policy constraint (such as\n    `constraints\u002Fstorage.publicAccessPrevention` or\n    `constraints\u002Fgcp.resourceLocations`) or a VPC-SC perimeter block without a\n    logged UUID\n-   **Fix:** Inspect active Organization Policy constraints (`gcloud\n    org-policies list --project=PROJECT_ID`) or check Cloud Audit Logs for\n    perimeter rejections, and direct the user to the Organization\u002FProject\n    Administrator.\n\n### `Permission '...' denied ... due to an IAM deny policy` (or `403` despite `roles\u002Fstorage.admin` allow bindings)\n\n-   **Cause:** Organization, Folder, or Project IAM Deny policy\n    (`iam.googleapis.com\u002FDenyPolicy`) explicitly denies the permission\n-   **Fix:** Explain that explicit IAM Deny policies take absolute precedence\n    over standard allow roles (including `roles\u002Fstorage.admin`) and cannot be\n    bypassed. Advise checking Deny policies (`gcloud iam policies list\n    --attachment-point=cloudresourcemanager.googleapis.com\u002Fprojects\u002FPROJECT_ID\n    --kind=denypolicies`, and `--attachment-point=organizations\u002FORG_ID` if\n    needed) and contacting the Organization Administrator.\n\n### `403 Insufficient Permission` on a Compute Engine VM despite correct IAM roles\n\n-   **Cause:** Legacy GCE VM Access Scopes (`devstorage.read_only`) restrict\n    OAuth token scopes\n-   **Fix:** **DO NOT RUN LIVE INSPECTION COMMANDS ON FICTIONAL VMS.** Explain\n    immediately that GCE access scopes throttle OAuth tokens regardless of IAM\n    roles. Advise stopping the VM (`gcloud compute instances stop INSTANCE`),\n    setting scopes to `cloud-platform` (`gcloud compute instances\n    set-service-account INSTANCE --scopes=cloud-platform`), and restarting the\n    VM (`gcloud compute instances start INSTANCE`).\n\n### `403 Permission Denied` on object delete despite `roles\u002Fstorage.admin`\n\n-   **Cause:** Bucket has an active Retention Policy (`retention_policy`)\n-   **Fix:** Explain that retention locks act as un-bypassable data protection\n    holds and cannot be overridden by IAM until the retention timestamp expires.\n\n### `403 Permission Denied` on recreated Service Account with exact same email\n\n-   **Cause:** Account deleted and recreated generates a new underlying Unique\n    ID\n-   **Fix:** Instruct user to remove the old IAM policy binding and re-add the\n    exact same binding so IAM registers the new Unique ID.\n\n### `403 Permission Denied` due to Bucket IP Filter\n\n-   **Cause:** The bucket has `ip_filter_config` configured with `mode:\n    \"Enabled\"`, blocking the caller's IP address and preventing live metadata\n    checks.\n-   **Fix:** Route diagnostic queries through Cloud Audit Logs to confirm the IP\n    filter violation:\n\n    ```bash\n    CLOUDSDK_METRICS_ENVIRONMENT=\"${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills\u002F1.0 (skill:google-cloud-storage-diagnostic)\" \\\n        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\n    ```\n\n    If `gcloud logging read` returns permission errors (`403`), `Project not\n    found or deleted`, an empty array `[]`, or only unrelated Admin Activity\n    entries (`cloudaudit.googleapis.com%2Factivity`) with zero Data Access\n    entries (`cloudaudit.googleapis.com%2Fdata_access`) for the failing\n    operation, do not loop or retry. Immediately halt technical diagnosis,\n    inform the user that they lack visibility into the Cloud Audit Logs (due to\n    permissions, disabled Data Access logging, or log exclusions) and cannot\n    definitively diagnose advanced network denials, suggest that Bucket-Level IP\n    Filtering or VPC Service Controls may be blocking access, and direct them to\n    ask a Project\u002FOrganization Administrator to check the Cloud Audit Logs\n    (including `protoPayload.status.code=7` and\n    `vpcServiceControlsUniqueIdentifier`) or enable Data Access Audit Logs.\n\n    **Remediation:** Do not write ad-hoc CLI commands. Refer to Step 8 in\n    `references\u002F403_troubleshooting.md` for proper instructions to fetch the\n    existing `ip_filter_config`, append the caller's CIDR to\n    `allowedIpCidrRanges` in `ALLOWED_IPS.json` without overwriting existing\n    ranges, and apply it via the `gcloud storage buckets update` command.\n\n### `403 Permission Denied` on `storage.cloud.google.com` in Browser (Cookieauth)\n\n-   **Cause:** Browser downloads via the `storage.cloud.google.com` domain use\n    Google Account cookie authentication, also known as `Cookieauth`. Having\n    Data Access Audit Logging (`DATA_READ` \u002F `DATA_WRITE` for\n    `storage.googleapis.com`) enabled on the project conflicts with Cookieauth\n    and causes consistent 403 errors in the browser (or multiple logged-in\n    Google Accounts send the wrong identity cookie).\n-   **Fix:** Inspect the bucket IAM policy\u002Fconfiguration and check the project's\n    audit log configuration using:\n\n    ```bash\n    CLOUDSDK_METRICS_ENVIRONMENT=\"${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }gcs-skills gcs-skills\u002F1.0 (skill:google-cloud-storage-diagnostic)\" \\\n        gcloud projects get-iam-policy {project_id} --format=\"json(auditConfigs)\"\n    ```\n\n    Explain that Data Access Logging conflicts with Cookieauth when accessing\n    objects via `storage.cloud.google.com` in the browser. Advise accessing\n    objects via `gcloud`, API endpoints (`storage.googleapis.com`), or Signed\n    URLs to bypass browser cookie authentication limitations (or testing in an\n    Incognito window \u002F adjusting Data Access Audit Logging if browser access is\n    required).\n\n### `404 Not Found` or `Bucket does not exist`\n\n-   **Cause:** Target bucket does not exist or was deleted\n-   **Fix:** **DO NOT LOOP OR RETRY.** Stop trying to execute live commands on\n    the missing bucket. Acknowledge the bucket is missing, but proceed to\n    explain your diagnosis hypothetically based on the provided scenario\n    context.\n",{"name":5,"license":16,"metadata":64,"description":7},{"tags":65,"version":66,"category":67,"publisher":10,"support_tier":68},"gcs, storage, troubleshooting, diagnostic, iam, 403, permissions","1.0.1","Storage","primary","main","cd6fde0b299b34bbad05f64ad1ed5bd2ed05e634","skills\u002Fcloud\u002Fgoogle-cloud-storage-diagnostic",2014,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-14 23:31:00",{"source":9,"skillName":5,"commands":79,"prompt":89,"zipAvailable":90},[80,83,86],{"tool":81,"command":82},"npx","npx skills add google\u002Fskills --skill google-cloud-storage-diagnostic",{"tool":84,"command":85},"bunx","bunx skills add google\u002Fskills --skill google-cloud-storage-diagnostic",{"tool":87,"command":88},"pnpm","pnpm dlx skills add google\u002Fskills --skill google-cloud-storage-diagnostic","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgoogle-cloud-storage-diagnostic\u002FSKILL.md",true,[92],{"path":93,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002F403_troubleshooting.md","REFERENCE","参考文档",25719,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgoogle-cloud-storage-diagnostic\u002Freferences\u002F403_troubleshooting.md",[99,107,114,121,128,135],{"skillNo":100,"name":101,"nameZh":17,"description":102,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":106},"01M7DQ9K7JF4T7NJZ2K1MQZ44Q","cloud-operator-share-context","Shares Google Cloud operating context the user or their team already have — environments, projects, services and regions, product preferences, best practices, architecture guidance, runbooks — found in agent instruction files, local memory, skills and workflows, and the repository's GCP docs, with the operator agent's memory after the user reviews the list. Use when the user runs this skill, accepts the cloud-operator or cloud-operator-setup skill's offer to share their existing Google Cloud context, or asks to share, import or save that context or a GCP fact for the operator agent. Don't use for ordinary GCP requests, which go to the cloud-operator skill.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fcloud-operator-share-context\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":108,"name":109,"nameZh":17,"description":110,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":106},"01M7DQ9ERFGGQCFAWQW0KRKYBY","cloud-operator-setup","Sets up the operator agent in a Google Cloud project via the autocloud MCP server: picks the operator project, creates or checks the user's operator agent, saves the project, and offers to share the user's existing Google Cloud operating context with the operator agent's memory. Use when the user runs this skill, asks to set up the operator or create their operator agent, or chooses setup when the cloud-operator skill asks. Don't use for ordinary GCP requests or installing gcloud.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fcloud-operator-setup\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":17,"description":117,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":106},"01M7B4RHQCM0DK2XQ7S7ZXVN8D","developer-device-platform-device-run","Runs automated, non-interactive jobs on remote Android devices with Developer Device Platform (DDP) Device Run using `gcloud beta device-run sessions`: native Android executables or shell scripts (for example CLI tools, custom runners, test harnesses or benchmarks) and Android instrumentation tests, on one or many devices, then waits for completion and collects per-device outputs and logs. Use when running a binary or test suite on remote devices without an interactive connection. Don't use it for interactive device reservations, adb tunnels or screen streaming (use developer-device-platform-basics), or for local devices.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloper-device-platform-device-run\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":17,"description":124,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":106},"01M7B4R9YXMRW7RZP9Q9FMZJ2P","compute-vm-creation","Guides the planning, configuration, and provisioning of standalone Google Compute Engine virtual machines (VMs) and bare metal (-metal) instances using gcloud CLI commands or direct MCP tool execution. Use ONLY when the user wants to create, configure, or provision a new standalone Compute Engine VM or bare metal instance from conversational intents (hardware sizing, region selection, OS image, networking, security defaults). DO NOT read or use for Google Kubernetes Engine (GKE) Autopilot or Standard clusters, Kubernetes node pools or Pods, container orchestration, managing existing VMs, Managed Instance Groups (MIGs), or Instance Templates.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fcompute-vm-creation\u002FSKILL.md",[],[],{"skillNo":129,"name":130,"nameZh":17,"description":131,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":106},"01M7B4QD02N0YBVT0838Z5K5VC","agent-platform-autorater-customization","Customizes an autorater (evaluation metric) for an AI agent so its grades match the user's own judgment, starting from the agent's real trajectories. Use when a user wants a metric tailored to their agent, wants to turn failing trajectories into rubrics, says an existing autorater grades their agent wrong, or wants an autorater to agree with human labels (autorater hillclimbing, judge calibration). Don't use for quick evals with built-in metrics or for improving the agent itself (use agent-platform-eval-flywheel).","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fagent-platform-autorater-customization\u002FSKILL.md",[],[],{"skillNo":136,"name":137,"nameZh":17,"description":138,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":106},"01M78JP22K73KK96JH0JNDT5C4","iap-agent-platform-troubleshooting","Diagnoses Identity-Aware Proxy (IAP) denials of outbound requests from Gemini Enterprise Agent Platform agents that run on Agent Runtime and send traffic through Agent Gateway. Use when an agent request fails with \"Egress request is not authorized\", when Cloud Audit Logs show an IAP egressViaIAP decision with granted false, when IAP audit entries are missing while debugging agent egress, or when Access policies, IAP allow policies, policy bindings, or Agent Registry entries might block agent egress. Don't use for Gemini model IAM permission errors (such as aiplatform.endpoints.predict), Agent Platform API errors, or Agent Runtime deployment or 500 errors (use agent-platform-troubleshooting instead). Don't use for setting up, creating, or connecting an Agent Gateway, or for IAP web apps, IAP TCP forwarding, or SSH.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fiap-agent-platform-troubleshooting\u002FSKILL.md",[],[]]