/polymath-iac:policy-as-codefrom polymath-iac
Design policy-as-code guardrails (OPA/Rego, Sentinel, Checkov/Trivy) — enforce tagging, security, and cost rules in CI/plan with severity gates and exemptions.
Ships in polymath-iac. 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.
Guardrails beat gates-by-review: encode the rule once and it enforces itself on every plan. Write policies that block the dangerous and warn the merely untidy — and make exemptions explicit, not silent.
Mode: analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked [TBD] or [VERIFY], never filled in.
polymath-iac:policy-as-code.Not this when: you are scanning application code/CI broadly — that is polymath-security:devsecops-pipeline (this is the infra-policy layer it can call). For reviewing one generated plan by hand, polymath-cloud:plan-review.
0.0.0.0/0 ingress, encryption required), cost (instance-size/region caps, no orphaned resources), governance (mandatory tags, naming, allowed regions/services).terraform plan JSON in CI (pre-apply) and/or at admission (OPA Gatekeeper for K8s). Pre-apply is the cheapest place to stop a bad change.Policy-as-code design: AWS Terraform (Checkov + OPA/Conftest on plan JSON, in CI)
Rule Intent Tier Tool
S3 buckets block public access security BLOCK checkov CKV_AWS_53-56
no 0.0.0.0/0 ingress on 22/3389 security BLOCK checkov CKV_AWS_24/25
RDS storage encrypted security BLOCK checkov CKV_AWS_16
mandatory tags: owner, cost-center governance WARN → BLOCK after 30 days conftest policy/tags.rego
instance types ≤ 2xlarge outside prod cost WARN conftest policy/cost.rego
Enforcement: on `terraform show -json` in the PR pipeline (pre-apply); prod applies re-check in the apply job
Waivers: .checkov.yaml / waivers.yaml entries need owner + reason + expiry (≤ 90 days); expired waiver fails CI
Tests: conftest verify with pass/fail fixtures per rule, run in CI on policy changes
Rollout: advisory 2 weeks (measure: 41 violations found) → burn down → blocking
Report: weekly violation trend + waiver inventory to the platform channel
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mohammadbafkar/polymath --plugin polymath-iac3 skills in this plugin
/terraform-moduleAuthor a reusable Terraform module — input variables with validation, typed outputs, sane defaults, versioning, provider constraints, and composition boundaries./terraform-stateDesign Terraform state — remote backend, locking, state isolation/segmentation, drift detection, and safe import/move/rm operations without destroying live infra.