/iam-policy-validator:iam-policy-validator [validate|query|analyze] <policy-path|dir> [--config <file>] [--export-json <file>]from iam-policy-validator
Validates, analyzes, and queries AWS IAM policies using the iam-policy-validator CLI. Detects wildcard actions, privilege escalation, and overly permissive policies.
Ships in iam-policy-validator. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Validate AWS IAM policies against 22 built-in checks and query AWS service definitions. Self-contained: needs only the CLI (uvx, no install) plus Python 3.10+.
Home: https://github.com/boogy/iam-policy-validator · Docs: https://boogy.github.io/iam-policy-validator/
| Goal | Command |
|---|---|
| Validate a policy file or directory | iam-validator validate --path <path> |
| Validate and post findings to a PR | validate --format json -> verify -> post-to-pr (see below) |
| Query AWS actions, ARNs, conditions | iam-validator query action|arn|condition --service <svc> |
| Run AWS IAM Access Analyzer | iam-validator analyze --path <path> |
| Manage the AWS service cache | iam-validator cache info|clear|refresh|prefetch |
| Pre-download for offline/CI | iam-validator sync-services --output-dir ./aws_services/ |
| Generate shell completions | iam-validator completion bash|zsh |
# Scan one file (no install needed)
uvx iam-policy-validator validate --path policy.json
# Scan a directory recursively
uvx iam-policy-validator validate --path ./policies/
# Trust policy (auto-detect works, but explicit is safer)
uvx iam-policy-validator validate --path trust.json --policy-type TRUST_POLICY
# JSON output for scripting or PR handoff
uvx iam-policy-validator validate --path ./policies/ --format json --output findings.json
| Skill argument | Maps to CLI |
|---|---|
validate (default) | iam-validator validate --path <path> |
query | iam-validator query ... — see references/querying.md |
analyze | iam-validator analyze --path <path> (AWS IAM Access Analyzer) |
--config <file> | --config <file> (forwarded verbatim; YAML) |
--export-json <file> | --format json --output <file>, then hand off — do NOT post |
Defaults: no verb -> validate. With --export-json, follow the PR handoff and never post comments directly.
uvx iam-policy-validator validate --path policy.json # preferred, no install
uv add iam-policy-validator # or: pip install iam-policy-validator
iam-validator --version
Do not install the [mcp] extra — this skill is CLI-only.
post-to-pr (simpler)iam-validator validate --path ./policies/ --format json --output report.json
iam-validator post-to-pr --report report.json
Posts all findings. Good for CI where you trust the validator's output. See references/ci-integration.md.
# 1. Export findings
iam-validator validate --path ./policies/ --format json --output findings.json
# 2. Verify each finding with query (see verification-protocol.md)
iam-validator query action --name <svc:Action> --has-condition-key <key>
# 3. Render verified findings
python3 scripts/render_pr_comments.py findings.json --format json > comments.json
# 4. Post from a separate agent
Full protocol: references/pr-review-handoff.md. Verification checklist: references/verification-protocol.md.
| Code | Meaning |
|---|---|
0 | No error-severity findings (warnings may still exist) |
| non-zero | Error-severity findings, or --fail-on-warnings + warnings, or CLI error |
Read stderr and findings before drawing conclusions. A non-zero exit does not necessarily mean the policy is dangerous.
IDENTITY_POLICY (default), RESOURCE_POLICY, TRUST_POLICY, SERVICE_CONTROL_POLICY, RESOURCE_CONTROL_POLICY — auto-detected when --policy-type is omitted. Pass it explicitly for trust, resource, SCP, or RCP documents to avoid false positives.
--ci, post-to-pr, --github-*, --comment-tag, PR workflows--stdin, --custom-checks-dir, --stream, completion, and moreFor authoritative per-check detail, see https://boogy.github.io/iam-policy-validator/user-guide/checks/ rather than inventing specifics.
iam-validator <cmd> --help; don't fabricate them.uvx over global installs; ask before changing the environment.--policy-type for non-identity policies to avoid false positives.references/advanced-flags.md (opens in a new tab)references/checks.md (opens in a new tab)references/ci-integration.md (opens in a new tab)references/common-mistakes.md (opens in a new tab)references/configuration.md (opens in a new tab)references/output-formats.md (opens in a new tab)references/pr-review-handoff.md (opens in a new tab)references/querying.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)references/verification-protocol.md (opens in a new tab)scripts/render_pr_comments.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
iam-policy, aws-security, policy-validation, cli-tool, access-analyzer
npx claudepluginhub actions-marketplace-validations/boogy_iam-policy-validator --plugin iam-policy-validatorOther plugins' skills for the same job