iam-helper-for-policy-simulator
Safely simulates and applies Identity and Access Management (IAM) v1 (Allow) policy changes on Google Cloud.
Skill by googleOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/google-iam-helper-for-policy-simulator
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: cloud
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/iam-helper-for-policy-simulator
What's inside
- Skill name
iam-helper-for-policy-simulator- Description
- Safely simulates and applies Identity and Access Management (IAM) v1 (Allow) policy changes on Google Cloud. Uses the Policy Simulator to replay historical access logs against proposed policies to prevent breaking active workloads before applying the changes. Use when simulating or applying IAM v1 allow policies across Projects, Folders, or Organizations. Don't use for analyzing IAM v2 deny policies, VPC Service Controls, or performing general policy troubleshooting.
- License
- Apache-2.0
- Metadata
- version: 1.0.2 · category: Security
- Instructions
- 159 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (3)
- SKILL.md
- attribution.md · references/
- analyze_simulation.py · scripts/
SKILL.md (first lines)
# IAM Policy Simulator (v1 Allow)
You are an advanced security assistant helping users safely modify IAM
policies. You must NEVER apply a modifying policy change without first
running a Policy Simulation to ensure existing workloads are not disrupted. You
must only use standard public gcloud commands.
## Usage Attribution
**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
MUST read and follow the instructions in
[Usage Attribution](references/attribution.md).
## Core Concepts & Prerequisites
* **IAM v1 (Allow Policies)**: Specifies who has access (a role) to a
resource.
* **Policy Simulator**: Replays the last 90 days of access logs against a
proposed policy to verify if any historical access would be blocked by the
change.
* **Required Permissions**: The execution environment must have
`roles/policysimulator.admin`, `roles/cloudasset.viewer`, and the
appropriate IAM Admin roles for the target resource.
* **Resource Scope**: Changes can target Projects, Folders, or Organizations.
## Execution Workflow: Plan, Simulate, Analyze, Apply
### Step 1: Retrieve Current Policy (Plan)
Fetch the baseline IAM v1 policy for the target resource (Project, Folder, or
Organization) and save it to the `/tmp/` directory:
**For Projects:**
```bash
gcloud projects get-iam-policy TARGET_PROJECT_ID --format=json > /tmp/current_policy.json
```
**For Folders:**
```bash
gcloud resource-manager folders get-iam-policy TARGET_FOLDER_ID --format=json > /tmp/current_policy.json
```
**For Organizations:**
```bash
gcloud organizations get-iam-policy TARGET_ORG_ID --format=json > /tmp/current_policy.json
```
**CRUCIAL SAFETY GATE:** Verify that the policy was successfully retrieved. If
the command fails or the resulting JSON is empty, you MUST terminate the
workflow immediately and inform the user. Do not proceed to prepare or simulate
an empty or partial policy.
### Step 2: Prepare Proposed Policy
Create a `/tmp/proposed_policy.json` file. Modify `/tmp/current_policy.json` by
adding or removing role bindings in the `bindings` array to match the requested
change.
**CRUCIAL NO-OP CHECK:** Compare the proposed policy to the current policy. If
no changes were actually made (e.g., you are trying to remove a role the user
doesn't hold, or add a role they already have), you MUST inform the user that no
changes are necessary and **terminate the workflow immediately**. Do not run a
simulation.
### Step 3: Run Policy Simulation
Run the simulator to replay the last 90 days of access logs against the proposed
policy change. Execute the exact command for your resource type:
**For Projects:**
```bash
gcloud iam simulator replay-recent-access //cloudresourcemanager.googleapis.com/projects/TARGET_PROJECT_ID /tmp/proposed_policy.json --project=TARGET_PROJECT_ID --format=json > /tmp/simulation_results.json
```
**For Folders:**
```bash
gcloud iam simulator replay-recent-access //cloudresourcemanager.googleapis.com/folders/TARGET_FOLDER_ID /tmp/proposed_policy.json --format=json > /tmp/simulation_results.json
```
**For Organizations:**
```bash
gcloud iam simulator replay-recent-access //cloudresourcemanager.googleapis.com/organizations/TARGET_ORG_ID /tmp/proposed_policy.json --format=json > /tmp/simulation_results.json
```
*(Note: If the Policy Simulator API is not enabled, it will prompt you to enable
it. Select Yes. Do not use placeholders verbatim; replace TARGET_PROJECT_ID,
TARGET_FOLDER_ID, or TARGET_ORG_ID with the actual resource ID).*
**CRUCIAL SAFETY GATE:** Verify the command exited successfully. If the
simulator command crashes, times out, or returns a non-zero exit code, you MUST
NOT treat the failure as a "safe" result. Terminate the workflow immediately and
report the simulator failure to the user.
### Step 4: Analyze Simulation Results
Analyze the contents of `/tmp/simulation_results.json` using the provided helper
script. Do not write custom scripts on the fly. You MUST execute the following
command:
```bash
python3 scripts/analyze_simulation.py
```
* **SAFE (No Breakage):** If the script outputs `REVOKED_COUNT=0`, the change
is safe.
* **UNSAFE (Breakage):** If the script outputs `REVOKED_COUNT` > 0 (meaning
the logs contain `ACCESS_REVOKED` or `ACCESS_MAYBE_REVOKED`):
* Identify the `principal`, `permission`, and `fullResourceName` from the
printed JSON.
* **Do NOT apply the policy.**
* The change will break an active workload. Inform the user of the
specific disrupted accesses.From google/skills, Apache-2.0.
More from google/skills
- 0.865score
google-ads-api-account-diagnostics
google-ads-api-teamOfficial
Diagnoses Google Ads account performance issues such as conversion loss (value or volume), low lead flow/volume, and lost impression share (opportunities) due…
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-triage
Google LLCOfficial
Expert guidance for security alert triage in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-detection-engineering
Google LLCOfficial
Author, validate, test, and deploy YARA-L 2.0 detection rules and evaluate end-to-end detection coverage gaps in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-hunt
Google LLCOfficial
Expert guidance for proactive threat hunting in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-cases
Google LLCOfficial
Manage Google Security Operations (SecOps) SOAR cases throughout their lifecycle.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-investigate
Google LLCOfficial
Expert guidance for deep security incident and entity investigations in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.824score
google-ads-api-quickstart
google-ads-api-teamOfficial
Guides developers through Google Ads API quickstart: credential setup, choosing from 6 client libraries/REST, configuring environments, and running a…
SkillBFreshness: B★ 21.5KClaude Code +9 - 0.819score
google-ads-api-mcp-setup
google-ads-api-teamOfficial
Guides developers through downloading, configuring, and installing the official open-source Google Ads MCP Server.
SkillBFreshness: B★ 21.5KClaude Code +9 - 0.815score
ima-dai-sdk
Google LLCOfficial
Integrates the Google Interactive Media Ads (IMA) Dynamic Ad Insertion (DAI) SDK into websites, web apps, mobile apps, or TV apps.
SkillBFreshness: B★ 21.5KClaude Code +9 - 0.815score
ima-sdk-client-side
Google LLCOfficial
Supports Interactive Media Ads (IMA) SDK.
SkillBFreshness: B★ 21.5KClaude Code +9 - 0.699score
gcloud
googleOfficial
Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
agent-platform-deploy
googleOfficial
Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up…
SkillAFreshness: A★ 21.5KClaude Code +9
Signals
- Stars
- 21,542
- Forks
- 1,821
- Open issues
- 21
- Last commit (this folder)
- Oct 22, 2026 (6 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.0.2
- License
- Apache-2.0
- Repository
- github.com/google/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from google
- 0.699score
retrieving-developer-knowledge
googleOfficial
Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI/Gemini, Android, Chrome, Web, Flutter, Go, Firebase, and…
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
data-manager-api-setup
googleOfficial
Guides developers through client library installation and authentication setup steps for the Data Manager API.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
agent-platform-migrate-from-ai-studio
googleOfficial
Guides agents and users through migrating from Gemini API in Google AI Studio to Gemini Enterprise Agent Platform (formerly Vertex AI).
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
gcloud
googleOfficial
Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
google-cloud-recipe-onboarding
googleOfficial
Guides a developer's first steps on Google Cloud, covering account creation, billing setup, project management, and deploying a first resource.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
agent-platform-deploy
googleOfficial
Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up…
SkillAFreshness: A★ 21.5KClaude Code +9
Cite this page
iam-helper-for-policy-simulator skill. Agent Mart. https://agentmart.dev/skills/google-iam-helper-for-policy-simulator (last updated 2026-10-24)