ops-infra-code — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited ops-infra-code (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill used to be an excerpt of Anton Babenko's terraform-skill. The upstream is now a strict superset (state management, CI/CD workflows, terraform-ls, OpenTofu-specific guidance, a failure-mode diagnosis workflow), and HashiCorp publishes its own Terraform skills. Install them; this file keeps the foundation's discipline and the core patterns below.
| Skill | Publisher | Covers | Pin |
|---|---|---|---|
antonbabenko/terraform-skill | Anton Babenko (community, Apache-2.0) | Terraform and OpenTofu: modules, testing strategy, state, CI/CD, security scans, version management | v1.17.1 |
hashicorp/agent-skills terraform/* | HashiCorp (MPL-2.0) | Official style guide, terraform test, module refactoring, Stacks, search/import, policy; Packer image builders | v1.0.0 |
# Babenko — the depth, Terraform and OpenTofu (pinned release)
git clone --depth 1 --branch v1.17.1 https://github.com/antonbabenko/terraform-skill ~/dev/vendor-skills/terraform-skill
ln -s ~/dev/vendor-skills/terraform-skill/skills/terraform-skill ./.claude/skills/terraform-skill
# HashiCorp — the skill folders you need, not the plugins (pinned release)
git clone --depth 1 --branch v1.0.0 https://github.com/hashicorp/agent-skills ~/dev/vendor-skills/hashicorp
ln -s ~/dev/vendor-skills/hashicorp/terraform/code-generation/skills/terraform-style-guide ./.claude/skills/terraform-style-guide
ln -s ~/dev/vendor-skills/hashicorp/terraform/code-generation/skills/terraform-test ./.claude/skills/terraform-testHashiCorp's Claude plugins (terraform-code-generation, -module-generation, -policy-code) also register an MCP server that runs the unpinned hashicorp/terraform-mcp-server Docker image with your TFE_TOKEN: install the skill folders unless you want that server.
HashiCorp's skills are Terraform-only; for OpenTofu, rely on Babenko's. Its security reference installs Trivy with an unpinned curl … | sh: prefer a pinned release or a package manager. For Pulumi, see pulumi/agent-skills.
Recipe entries: docs/recipes/recommended-vendor-skills.md §"Anton Babenko" and §"HashiCorp".
ops-infra-code agent, which preloads this skill and cannot load a vendor skill)Layout: modules/<name>/ (main.tf, variables.tf, outputs.tf, versions.tf) reused by environments/{dev,staging,prod}/; one state per environment. Hierarchy: resource → resource module (VPC + subnets) → infrastructure module (a region/account) → composition.
Naming: descriptive resource names (aws_s3_bucket.application_logs), this for the single resource of its type in a module, context-prefixed variables (vpc_cidr_block, not cidr).
Block order — resource: count/for_each first, then arguments, tags, depends_on, lifecycle last. Variable: description (always), type, default, validation, nullable = false.
`count` vs `for_each`:
| Case | Use |
|---|---|
| Create or not | count = var.enabled ? 1 : 0 |
| Items that can be added, removed or reordered | for_each = toset(var.items) — removing one item touches only that item |
| Access by name | for_each = var.map |
count = length(var.list) re-addresses every item after a removed one, so Terraform destroys and recreates them.
Testing ladder: terraform fmt -check + validate + tflint + trivy config . on every commit → terraform test (1.6+, mock providers from 1.7) for module logic → real-resource tests (Terratest) in a sandbox account only where behaviour cannot be mocked → policy as code (OPA/Conftest) for compliance.
*.tfstate, *.tfstate.backup, .terraform/ or a *.tfvars holding secrets; use a remote backend with locking and encryption at rest. Secrets come from a secret manager or the CI's secret store, never from a committed variable — .claude/rules/security.md.terraform plan (or tofu plan) output before any apply; in CI, apply the saved plan file that was reviewed, not a fresh plan.trivy config . or checkov -d . as a blocking step — the ops-ci skill wires it./ops:ops-deploy (pre-deploy checklist, rollback plan) and .claude/rules/deploy-safety.md.~> 5.0 allows any 5.x (≥ 5.0, < 6.0); ~> 5.0.1 allows only 5.0.x. Pin providers to a major, production modules to an exact version, and commit .terraform.lock.hcl.prevent_destroy on those resources, moved blocks for renames instead of destroy/create.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.