plugins/pm-engineering/skills/infra-as-code-review/SKILL.md
Write an infrastructure-as-code review checklist and conduct a structured review of Terraform, CloudFormation, Pulumi, or Ansible code. Use when asked to review IaC code, audit infrastructure configurations, check cloud security posture, or produce a reusable IaC review checklist. Produces a structured review report with severity-categorized findings, remediation guidance, and a reusable checklist.
npx skillsauth add mohitagw15856/pm-claude-skills infra-as-code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Produce a structured infrastructure-as-code review that applies security, reliability, and operational quality standards to a specific body of IaC code. The output serves two purposes: an actionable review report for the code at hand (with findings by severity and specific remediation steps), and a reusable checklist the team can apply to every future IaC change. If the user provides actual code, analyze it and populate the findings table with real issues. If no code is provided, produce the checklist and a template findings report.
Ask for these if not already provided:
Reviewer: [Name / Claude] IaC Tool: [Terraform / CloudFormation / Pulumi / Ansible / CDK] Cloud Provider: [AWS / GCP / Azure] Code Location: [Repo path or PR link] Review Date: [Date] Overall Risk: [Critical / High / Medium / Low]
| Severity | Finding Count | Resolved in This Review | Carry-Over Risk | |----------|---------------|------------------------|-----------------| | Critical | [n] | [n] | [Yes/No — explain] | | High | [n] | [n] | [Yes/No — explain] | | Medium | [n] | [n] | [Yes/No — explain] | | Low | [n] | [n] | [Yes/No — explain] | | Total | [n] | [n] | |
Recommendation: [Approve / Approve with Required Changes / Block — one sentence rationale]
| Field | Detail |
|-------|--------|
| Severity | Critical |
| Category | [IAM / Secrets / Encryption / Network / State / Naming / Cost] |
| Resource | [resource_type.resource_name] |
| File / Line | [path/to/file.tf:42] |
| Risk | [What can go wrong — be specific about the attack vector or failure mode] |
Current code:
# [paste the problematic snippet]
resource "aws_s3_bucket" "data" {
bucket = "my-bucket"
acl = "public-read" # PROBLEM: public read access
}
Remediation:
resource "aws_s3_bucket" "data" {
bucket = "my-bucket"
}
resource "aws_s3_bucket_public_access_block" "data" {
bucket = aws_s3_bucket.data.id
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}
Why this matters: [One sentence linking the specific risk to business impact — data exposure, compliance violation, etc.]
| Field | Detail |
|-------|--------|
| Severity | High |
| Category | [Category] |
| Resource | [resource_type.resource_name] |
| File / Line | [path/to/file.tf:line] |
| Risk | [Specific risk description] |
Current code:
# [problematic snippet]
Remediation:
# [fixed snippet]
| Field | Detail |
|-------|--------|
| Severity | Medium |
| Category | [Category] |
| Resource | [resource_type.resource_name] |
| File / Line | [path/to/file.tf:line] |
| Risk | [Specific risk description] |
Remediation: [Prose or code snippet — choose whichever is clearer for this finding]
| Field | Detail |
|-------|--------|
| Severity | Low |
| Category | [Category] |
| Resource | [resource_type.resource_name] |
| File / Line | [path/to/file.tf:line] |
| Suggestion | [What to improve and why] |
Use this checklist on every IaC pull request. Check every item; mark N/A only when the item genuinely does not apply to the resources being provisioned.
"*") in IAM policies — policies follow least-privilege"*") in IAM policies unless explicitly justified with a commentaws:RequestedRegion, sts:ExternalId)"*".tf, .yaml, or .json filesensitive = true is set on all output values and variables that contain secrets (Terraform).gitignore or equivalent excludes *.tfvars, terraform.tfstate, and any file that may contain resolved secretsencrypted = false or equivalentrequire_ssl = true or equivalent parameter)Deny on non-TLS requests (aws:SecureTransport: false)0.0.0.0/0 ingress except on ports 80/443 for public-facing services0.0.0.0/0publicly_accessible = false on RDS instances unless explicitly required and documented[env]-[team]-[resource-type]-[identifier]Environment (e.g., prod / staging / dev)Team or OwnerService or ApplicationCostCenter (if required by finance policy)ManagedBy: terraform (or equivalent IaC tool tag)default-vpc, launch-wizard-1)terraform.tfstate and *.tfstate.backup are in .gitignoresource = "git::...?ref=main"required_providers — no unconstrained >= x.yrequired_versionfor_each, count)r5.16xlarge) or storage allocations are justified in a commentlifecycle { prevent_destroy = true } is set on stateful resources in production (databases, state buckets)ignore_changes is used sparingly and each instance is documented with a rationale comment| ID | Title | Severity | Category | File | Status | |----|-------|----------|----------|------|--------| | CRIT-01 | [Title] | Critical | [Category] | [file:line] | Open | | HIGH-01 | [Title] | High | [Category] | [file:line] | Open | | MED-01 | [Title] | Medium | [Category] | [file:line] | Open | | LOW-01 | [Title] | Low | [Category] | [file:line] | Open |
List only Critical and High findings that must be resolved before this code is merged:
Medium and Low findings should be tracked as follow-up issues with a committed resolution date.
Review conducted by [Reviewer] on [Date] — checklist version [1.0]
business
Analyze why deals are won and lost and turn it into an action plan. Use when asked to run a win/loss analysis, review closed-won and closed-lost deals, understand why the team is losing to a competitor, or summarize sales feedback into patterns. Produces a structured win/loss report with themes, win/loss rates by segment and competitor, representative quotes, and prioritized actions for product, marketing, and sales.
development
Route a fuzzy request to the right skill in this library. Use when the user is unsure which skill fits, asks 'which skill should I use for X', describes a task without naming a skill, or when a request could plausibly match several skills. Produces a best-fit recommendation with the inputs to gather, a runner-up with the tie-breaker, and a workflow recipe when the job spans multiple skills.
testing
Triage a vulnerability or scanner finding — assess real severity, exploitability, and how urgently to fix. Use when asked to triage a CVE, prioritize scanner/pentest findings, assess a vuln's risk, or decide what to patch first. Produces a triage verdict: CVSS-informed severity adjusted for your context, exploitability, real risk, a fix/mitigation, and an SLA — so you fix what matters, not just what's red.
development
Stand up a Voice of Customer (VoC) program that turns feedback into action. Use when asked to build a VoC program, design a customer feedback loop, consolidate feedback sources, or set up a closed-loop feedback process. Produces a VoC program design — objectives, feedback sources and channels, a taxonomy, collection and analysis cadence, closed-loop routing, ownership, and success metrics.