Iam Helper For Policy Management
GoogleOfficialPublished by Google
- Skill
- Tool integration
- Security
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a standardized workflow for managing Google Cloud IAM v1 allow policies and v2 deny policies. It enforces a strict Plan & Confirm protocol for all mutating operations to prevent accidental security misconfigurations. The skill handles the lifecycle of policies across the Resource Manager hierarchy, including organizations, folders, and projects, while ensuring all commands are properly attributed for auditability.
What it does
- Lists and inspects existing IAM allow and deny policies.
- Generates gcloud commands for adding, updating, or removing policy bindings.
- Enforces a mandatory confirmation step before executing any policy changes.
- Verifies the state of policies post-execution to ensure accuracy.
- Applies required usage attribution tags to all CLI and API interactions.
- Prevents the assignment of dangerous blanket roles like allUsers or allAuthenticatedUsers.
When to use it
- When you need to grant or revoke access for users, service accounts, or groups.
- When creating organization-level guardrails using IAM v2 deny policies.
- When auditing current IAM policy configurations across your resource hierarchy.
- When you need to perform bulk updates to IAM policies via JSON or YAML files.
Advantages
- Reduces risk of accidental access changes through mandatory confirmation.
- Ensures consistent and auditable command execution with automated attribution.
- Promotes least-privilege security by blocking blanket public access requests.
- Simplifies complex policy management across different resource levels.
Usage examples
- “List all IAM allow policies for project my-project-123.”
- The agent executes the appropriate gcloud command with attribution and displays the current policy configuration.
- “Add user [email removed] as a viewer to project my-project-123.”
- The agent generates the command, warns about the impact, and waits for your explicit approval before applying the change.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/google/iam-helper-for-policy-management/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip iam-helper-for-policy-management.zip -d .agents/skills
Documentation by Google
IAM Helper for Policy Management
Orchestrates the lifecycle and management of IAM allow and deny policies across IAM v1 (allow policies) and IAM v2 (deny policies).
Usage Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
Core Concepts & Paradigms
IAM operates across two policy paradigms:
IAM v1 (Allow Policies): Grants roles to principals (users, service accounts, groups, domains) on specific resources. Supports Resource Manager resources (organizations, folders, projects) as well as individual resources across supported Google Cloud services.
IAM v2 (Deny Policies): Sets explicit organization-, folder-, or project-level guardrails that prevent specified principals from using designated permissions, regardless of any allow policies granted. Evaluated before allow policies.
Workflow & Decision Tree
When receiving a policy management request, determine whether the operation is Read-Only or Mutating, and whether it targets IAM v1 (Allow Policies) or IAM v2 (Deny Policies):
1. Read-Only Operations (Autonomous Execution)
Read-only actions include the following:
IAM v1 Allow Policies:
get-iam-policyon project/folder/organization, orgcloud iam list-testable-permissions //cloudresourcemanager.googleapis.com/projects/PROJECT_ID.IAM v2 Deny Policies:
gcloud iam policies listorgcloud iam policies getwith--attachment-pointand--kind=denypolicies.
For read-only actions, execute the command autonomously to inspect state, and present the query results clearly to the user.
2. Mutating Operations (Plan & Confirm Protocol)
Mutating operations include the following:
IAM v1 Allow Policies:
add-iam-policy-binding,remove-iam-policy-binding, orset-iam-policyacross project, folder, organization, or resource levels (see references/v1-allow-policies.md).IAM v2 Deny Policies:
create,update, ordeletedeny policies on attachment points (cloudresourcemanager.googleapis.com/projects/PROJECT_ID,cloudresourcemanager.googleapis.com/folders/FOLDER_ID, orcloudresourcemanager.googleapis.com/organizations/ORG_ID) using YAML/JSON policy files (see references/v2-deny-policies.md).
For mutating operations, follow the Plan & Confirm Protocol below. DO NOT execute mutating commands autonomously without prior user approval.
Execution & Safety Protocol
Plan and Confirm (No Autonomous Mutation): Mutating allow and deny policy changes modify live security perimeters and access controls. You MUST NOT execute mutating
gcloudcommands directly via tool calls without explicit prior confirmation from the user. When asked to apply a mutating change, do the following:Formulate the Command: Generate the exact, fully constructed
gcloudcommand (including all parameters such as--member,--role,--attachment-point,--kind=denypolicies, and--policy-file).Warn of Impact & Propagation: Issue a general warning that the change could impact access in a live environment and takes time to propagate across Google Cloud global infrastructure.
Request User Confirmation: Prompt the user for approval before applying the changes to the live environment.
Post-Execution Verification: After the user approves and the mutating policy change is executed, run the corresponding verification command (see references/v1-allow-policies.md and references/v2-deny-policies.md for exact verification steps) to verify that the active state matches expectations before reporting completion.
Security Guardrail (Public & Blanket Access Refusal): Never grant
allUsersorallAuthenticatedUsersbasic roles (roles/owner,roles/editor,roles/viewer,roles/admin,roles/writer, androles/reader) or broad permissions. Explicitly refuse blanket public access requests, explain the severe security risks of public project ownership/access, and propose scoped, least-privileged role bindings for specific authenticated identities instead.
Supporting Links
Files
- ATTRIBUTION.mdAdded by AutoGineer882 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md5.5 KiB
- references/attribution.md1.9 KiB
- references/v1-allow-policies.md6.1 KiB
- references/v2-deny-policies.md7.6 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/iam-helper-for-policy-management · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download iam-helper-for-policy-management.zip