terraform-patterns
Skill by alirezarezvani
Terraform Patterns is an agent skill for reviewing and designing Terraform code. It covers modules, remote state, provider setup and IaC security reviews, and runs two bundled Python scanners. It is written for engineers who work with .tf files.
Install terraform-patterns
Built from the published package, never by AI.
git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills && mkdir -p ~/.claude/skills && cp -r /tmp/claude-skills/engineering/terraform-patterns/skills/terraform-patterns ~/.claude/skills/terraform-patternsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/claude-skills/engineering/terraform-patterns/skills/terraform-patterns ~/.gemini/antigravity-cli/skills/terraform-patternsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Terraform Patterns is an agent skill that gives opinionated guidance for writing Terraform. It covers module design, state backends, provider configuration, security hardening and CI/CD integration. The source describes it as a set of concrete decisions rather than a Terraform tutorial.
The skill offers three slash commands: review, module and security. Review and security workflows run tf_module_analyzer.py and tf_security_scanner.py against a Terraform directory, and both scripts can output JSON or text. The scanner also has a strict mode that elevates warnings. The skill is aimed at engineers who write, refactor or audit .tf files and infrastructure-as-code.
Written from the project's SKILL.md and checked against it.
What it can do
- /terraform-patterns reviewAnalyzes Terraform code for anti-patterns, security issues and structure problems.
- /terraform-patterns moduleDesigns or refactors a module with proper inputs, outputs and composition.
- /terraform-patterns securityAudits Terraform code for vulnerabilities, secrets exposure and IAM misconfigurations.
- tf_module_analyzer.pyCounts resources and checks variables, outputs, naming and module composition.
- tf_security_scanner.pyScans .tf files for hardcoded secrets, open security groups and missing encryption.
- State security auditChecks local state, remote encryption, state locking and access restrictions.
- Proactive triggersFlags issues such as missing remote backends, unpinned providers and missing tags.
What you need
- Python 3 to run the bundled scripts
- Terraform .tf files to analyze
Try asking
- Review this Terraform code for anti-patterns and security issues
- Design a Terraform module for a VPC with inputs and outputs
- Run a Terraform security review on the ./terraform directory
Good to know
- Security checks in the source reference AWS resources such as S3, RDS, IAM and CloudTrail.
- Not a Terraform tutorial, according to the source.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: engineering/terraform-patterns/skills/terraform-patterns/SKILL.md, engineering/terraform-patterns/skills/terraform-patterns/scripts/tf_module_analyzer.py, engineering/terraform-patterns/skills/terraform-patterns/scripts/tf_security_scanner.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md11 KB -
references/module-patterns.md10 KB -
references/patterns-catalog.md11 KB -
references/state-management.md12 KB -
scripts/tf_module_analyzer.py14 KB
Show all 6 files
-
scripts/tf_security_scanner.py18 KB
Alternatives to terraform-patterns
All alternatives →Runs the full Next.js deployment test suite for an internal vercel/next.js pull request. It validates the commit's preview package, then dispatches the test_e2e_deploy_release.yml workflow. Meant for maintainers who explicitly ask for the entire suite.
Instruments Python AI applications with DeepEval's native tracing so their execution appears span by span in Confident AI's Observatory. It is for developers building LLM apps, agents, RAG pipelines and chatbots.
Manages Azure Container Registry through the az acr Azure CLI command group. It covers registries, images, cloud builds, ACR Tasks, tokens, geo-replication and networking. Built for developers and operators who work with ACR in Azure.
Opens, runs, and shows apps on a temporary Crabbox machine, including native desktops and web previews. It is for OpenClaw users who want an app running and visible in their chat side panel.
Runs batch and HPC workloads on GKE using job queues and parallel processing. Aimed at teams running batch pipelines, HPC simulations, or ML training jobs on Google Kubernetes Engine.
Answers questions about GKE cluster and workload costs using BigQuery billing exports and live cluster metrics. Built for platform engineers and cloud teams who need to analyze and diagnose GKE spend.
Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli
terraform-patterns: common questions
What does the Terraform security scanner check?
The source lists hardcoded secrets, overly permissive IAM policies, open security groups on 0.0.0.0/0, missing encryption for S3, RDS and EBS, public access, and sensitive variable use.
Can the skill create a module scaffold?
Yes. The module command produces a file structure with boilerplate, variable validation blocks and lifecycle rules where appropriate.
Does the skill support OpenTofu?
The source lists OpenTofu migration among the topics covered in its patterns catalog reference.
How do I install terraform-patterns?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is terraform-patterns free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is terraform-patterns safe to use?
It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to terraform-patterns?
Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.
