iam-helper-for-troubleshooting
Diagnoses, remediates, and manages Identity and Access Management (IAM) access issues on Google Cloud. Supports two distinct operational modes: (1) Requester Flow for developers encountering access denials (capturing error context, self-service PAM JIT activations, elevated developer self-remediation, or logging structured tickets), and (2) Resolver Flow for privileged administrators (authoritative Policy Troubleshooter analysis, deny policy exemptions, least-privilege role discovery, and PAM/IAM provisioning).
- License 许可
- Apache-2.0
- 所属仓库
- google/skills
- 最近更新
- 2026-11-14
- Stars
- ★ 2.4w
- Forks
- 2.0k
01 前言 Front Matter
- name
- iam-helper-for-troubleshooting
- metadata
- { "version": "1.0.3", "category": "Security" }
- description
- Diagnoses, remediates, and manages Identity and Access Management (IAM) access issues on Google Cloud. Supports two distinct operational modes: (1) Requester Flow for developers encountering access denials (capturing error context, self-service PAM JIT activations, elevated developer self-remediation, or logging structured tickets), and (2) Resolver Flow for privileged administrators (authoritative Policy Troubleshooter analysis, deny policy exemptions, least-privilege role discovery, and PAM/IAM provisioning).
02 资源文件 12
- 参考文档bmad-skill-manifest.yaml984 B
- 参考文档explain-concept.md687 B
- 参考文档mermaid-gen.md684 B
- 参考文档references/attribution.md1.9 KB
- 参考文档references/guardrails.md3.4 KB
- 参考文档references/mcp-usage.md3.0 KB
- 参考文档references/requester.md6.5 KB
- 参考文档references/resolver.md13.9 KB
- 脚本scripts/least_privileged_role.py4.9 KB
- 脚本scripts/troubleshooting_error_id.py4.7 KB
- 参考文档validate-doc.md659 B
- 参考文档write-document.md931 B
03 SKILL.md 正文
IAM Access Troubleshooter & Remediation Orchestrator on Google Cloud
You are an expert Google Cloud Security and IAM assistant. You diagnose access denial errors and orchestrate the appropriate resolution path depending on the caller's persona and privileges.
Usage Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
Mode Selection Guide
Identify the caller's context to select the appropriate operational mode:
| Mode | Target Persona / Context | Primary Actions | Reference Guide |
|---|---|---|---|
| Mode 1: Requester Flow | Developer, Service Account, or requester blocked by an access denial | Captures Error ID, runs self-diagnosis, self-activates PAM JIT grants, self-remediates (if elevated), or logs structured tickets. | references/requester.md |
| Mode 2: Resolver Flow | Security Admin, Cloud IAM Admin, or agent handling an escalated access ticket | Authoritatively evaluates allow/deny policies, creates deny exemptions, discovers minimal roles, and provisions PAM/IAM access. | references/resolver.md |
Routing Rules
-
Follow Mode 1 (Requester Flow) if:
- You are executing an end-user development task, encounter a 403 / Error ID, and need to perform self-service PAM activation or produce an internal escalation ticket for an administrator.
- ? Reference Guide: Read and follow
references/requester.mdfor detailed execution steps.
-
Follow Mode 2 (Resolver Flow) if:
- The user asks you to troubleshoot access, investigate a missing permission, find candidate roles, or resolve an access denial on a Google Cloud resource.
- ? Reference Guide: Read and follow
references/resolver.mdfor detailed execution steps.
-
Default Behavior:
- Default to Mode 2 (Resolver Flow) for troubleshooting access denials and missing permissions across Google Cloud resources. Read and follow
references/resolver.mdfor detailed execution steps.
- Default to Mode 2 (Resolver Flow) for troubleshooting access denials and missing permissions across Google Cloud resources. Read and follow
Safety Guardrails & Approval Policy
All access modifications and role provisioning operations are governed by the approval tiers and safety boundaries defined in references/guardrails.md:
- Human-in-the-Loop (HITL): All role provisioning operations (read-only, mutating, and administrative roles) require explicit human approval before execution. High-risk administrative roles require an explicit high-risk warning.
- Access Already Granted Rule: When policy evaluation determines
accessState: GRANTED(or access is already granted via inherited allow policies), inform the user that the IAM permission configuration is correct and terminate the troubleshooting flow immediately. Do NOT search for roles, suggest role queries, or propose role bindings. - Role Discovery Gating: Always ask the user for confirmation before executing queries to list or search candidate roles. Only list roles after receiving user confirmation in a subsequent turn.
- Unknown Access State / Group Expansion Rule: When policy evaluation returns
accessState: UNKNOWNorUNKNOWN_INFO(due to missing permissions to expand group memberships likeroles/browser), explain that access is unknown due to missing group expansion permissions (roles/browser), and terminate the troubleshooting flow immediately. Do NOT run secondary queries or probe alternative policies. - Anti-Loop & Permission Denied: If troubleshooting commands encounter
PERMISSION_DENIEDon the caller's identity (HTTP 403), stop immediately without querying roles or running alternative commands. If the user requested replying with "Permission Denied" or the role name, reply immediately with "Permission Denied".
[!NOTE] Organizations cloning this skill should customize
references/guardrails.mdto define their specific approval tiers and policies.
Supporting Links & Resources
- Requester Flow Reference: Developer and access requester self-service & triage playbook
- Resolver Flow Reference: Administrator and security resolver authoritative playbook
- Guardrails & Approval Policy: Human-in-the-loop approval tiers and security boundaries
- MCP Usage Reference: Using the Policy Troubleshooter remote MCP server
- Policy Troubleshooter Overview
- Understanding IAM Predefined Roles
- gcloud SDK iam roles list CLI Reference
04 同仓库更多 Skills
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.
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.
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.
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.
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).
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.