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]
development
Build a framework for creating shareable, high-reach social media content. Use when asked to plan viral content, develop a shareable content strategy, create a hook writing system, or build a repeatable process for content that gets shared. Produces a platform-specific viral content framework with hook formulas, content structures, shareability triggers, and a content testing system.
development
Generate article or newsletter thumbnail candidates using the Gemini API from inside Claude Code. Claude reads article copy, proposes composition concepts, writes image generation prompts incorporating brand specs, calls Gemini to generate the images, evaluates the results via computer vision, and returns ranked candidates with rationale. Use when asked to create thumbnails, generate cover images, or produce visual candidates for an article or newsletter.
testing
Flips Claude's default from "find reasons you're right" to "find reasons you're wrong." A genuine thinking partner, not a mirror with grammar. Use before high-stakes decisions, plans, assumptions, or pitches you haven't stress-tested.
development
Scrapes a Substack Notes page and exports engagement data (likes, comments, restacks) to a formatted .xlsx file with conditional formatting and summary stats.