Terraform Best Practices
ListedHelps with Terraform, best practices as part of deploying and managing cloud infrastructure workflows.
Install on your platform
Showing Claude Code. One command installs this skill into any of the agents below.
- 1
Run this in your project
terminal$ npx skills add terramate-io/agent-skills --skill terraform-best-practices -a claude-code Uses the open-source
skillsCLI and needs Node.js. Add-gto install it for your user instead of this project.
What we know about this skill
Publisher
terramate-io
Taken from the source listing. We haven't verified who controls this account.
Install target
Live repository
Not pinned. Installing fetches whatever the repository holds at the time you run the command.
Automated safety checks
This skill failed 1 of 6 checks. A failure is not proof of bad intent; it means something in the code needs a human to look at it before you run it.
No pipe-to-shell installers: failed
Runs code fetched at install time in 2 places.
No `curl … | sh` pattern, in the code or in the instructions, that runs code fetched at run time.
What it found
- skills/terraform-best-practices/AGENTS.md:707remote script piped into a shell
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash - skills/terraform-best-practices/rules/language-linting.md:112remote script piped into a shell
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
Declares what it does: passed
SKILL.md parses and declares a name and a description.
SKILL.md exists, its frontmatter parses, and it declares a name and a description.
No undeclared network calls: passed
Only contacts known or declared hosts: raw.githubusercontent.com, github.com.
Every host the skill dials — from its scripts, its config endpoints or the commands it tells the agent to run — is either well-known package and API infrastructure or declared in its own frontmatter. Links in documentation are not counted.
Hosts contacted
raw.githubusercontent.comsource hostgithub.comsource hostNo obfuscated payloads: passed
No encoded or obfuscated payloads.
No base64, hex or compressed blob is decoded and then executed, and no encoded shell commands.
No credential access: passed
Reads no keys, tokens, keychains or credential files.
Neither the code nor the SKILL.md instructions read SSH keys, cloud credentials, keychains, token stores, browser cookie databases or dotfiles that hold secrets.
Pinned to a commit: passed
Scanned terramate-io/agent-skills at fb28900fe7.
The exact upstream commit SHA that was scanned is recorded, so the result refers to specific bytes.
- Commit
- fb28900fe7
- Scanned
- 39 files, 13,654 lines
About this skill
What it does
This skill enables AI agents to apply industry-standard guidelines for writing, structuring, and maintaining Terraform infrastructure-as-code files. It ensures configurations remain consistent, secure, and maintainable across complex cloud environments by enforcing best practices during generation or review.
When to use it
- You need to generate new Terraform modules that adhere to community standards without manual code auditing.
- Your team requires automated checks to prevent drift between desired state definitions and actual infrastructure.
- You are refactoring legacy Terraform codebases to improve readability and reduce technical debt.
- Security compliance mandates specific naming conventions, variable handling, or resource tagging strategies.
Key capabilities
- Validates HCL syntax and structural integrity against known patterns.
- Enforces consistent naming conventions for resources, variables, and outputs.
- Suggests modularization strategies to break down monolithic configurations.
- Recommends secure practices such as avoiding hardcoded secrets and using proper state locking.
- Ensures proper use of
terraformblocks likerequired_providers,variable, andoutput.
Example prompts
- "Generate a Terraform configuration for an AWS VPC that follows terramate best practices, including proper variable definitions and output formatting."
- "Review this existing Terraform file and list specific violations of standard best practices regarding resource naming and state management."
- "Create a modular structure for a Kubernetes cluster deployment using Terraform, ensuring all modules are reusable and follow security guidelines."
Tips & gotchas
Ensure your AI agent has access to the latest Terraform documentation or schema definitions to provide accurate advice on version-specific features. This skill focuses on coding standards; it does not replace actual terraform validate or terraform plan execution in a real environment.