Terraform and OpenTofu Guide
agentscope-ai/QwenPaw
Guidance for writing and testing Terraform and OpenTofu code: module structure, naming, test approaches, CI/CD workflows, state handling and security scanning.
Generate Terraform HCL code following HashiCorp's official style conventions and best practices.
$ npx skills add warpdotdev/oz-skills --skill terraform-style-check -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install warpdotdev/oz-skills terraform-style-check --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/warpdotdev/oz-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/terraform-style-check .claude/skills/terraform-style-check && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "terraform-style-check" agent skill from https://github.com/warpdotdev/oz-skills/tree/main/.agents/skills/terraform-style-check into .claude/skills/terraform-style-check/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-style-check", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/warpdotdev/oz-skills/tree/main/.agents/skills/terraform-style-checkType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add warpdotdev/oz-skills --skill terraform-style-check -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install warpdotdev/oz-skills terraform-style-check --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/warpdotdev/oz-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/terraform-style-check .agents/skills/terraform-style-check && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "terraform-style-check" agent skill from https://github.com/warpdotdev/oz-skills/tree/main/.agents/skills/terraform-style-check into .agents/skills/terraform-style-check/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-style-check", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add warpdotdev/oz-skills --skill terraform-style-check -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install warpdotdev/oz-skills terraform-style-check --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/warpdotdev/oz-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/terraform-style-check .cursor/skills/terraform-style-check && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "terraform-style-check" agent skill from https://github.com/warpdotdev/oz-skills/tree/main/.agents/skills/terraform-style-check into .cursor/skills/terraform-style-check/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-style-check", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/warpdotdev/oz-skills.git --path .agents/skills/terraform-style-check--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add warpdotdev/oz-skills --skill terraform-style-check -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install warpdotdev/oz-skills terraform-style-check --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/warpdotdev/oz-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/terraform-style-check .gemini/skills/terraform-style-check && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "terraform-style-check" agent skill from https://github.com/warpdotdev/oz-skills/tree/main/.agents/skills/terraform-style-check into .gemini/skills/terraform-style-check/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-style-check", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install warpdotdev/oz-skills terraform-style-checkInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add warpdotdev/oz-skills --skill terraform-style-check -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/warpdotdev/oz-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/terraform-style-check .github/skills/terraform-style-check && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "terraform-style-check" agent skill from https://github.com/warpdotdev/oz-skills/tree/main/.agents/skills/terraform-style-check into .github/skills/terraform-style-check/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-style-check", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add warpdotdev/oz-skills --skill terraform-style-check -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install warpdotdev/oz-skills terraform-style-check --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/warpdotdev/oz-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/terraform-style-check .opencode/skills/terraform-style-check && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "terraform-style-check" agent skill from https://github.com/warpdotdev/oz-skills/tree/main/.agents/skills/terraform-style-check into .opencode/skills/terraform-style-check/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-style-check", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
terraform-style-checkGenerate Terraform HCL code following HashiCorp's official style conventions and best practices.
Terraform Style Check is an agent skill from warpdotdev/oz-skills. Generate Terraform HCL code following HashiCorp's official style conventions and best practices. Use when writing, reviewing, or generating Terraform configurations.
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in DevOps & Cloud, covering Infrastructure as code. It works with Terraform. The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 6c08c49. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
terraformFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
developer.hashicorp.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Terraform Style Check loads about 1.9k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 343 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from warpdotdev/oz-skills at commit 6c08c49, republished under its MIT licence (© warpdotdev). 343 words, ~1,871 tokens.
.claude/skills/terraform-style-check/SKILL.md (or your agent's skills folder).Generate and maintain Terraform code following HashiCorp's official style conventions and best practices.
Reference: HashiCorp Terraform Style Guide
When generating Terraform code:
| File | Purpose |
|---|---|
terraform.tf | Terraform and provider version requirements |
providers.tf | Provider configurations |
main.tf | Primary resources and data sources |
variables.tf | Input variable declarations (alphabetical) |
outputs.tf | Output value declarations (alphabetical) |
locals.tf | Local value declarations |
# terraform.tf
terraform {
required_version = ">= 1.7"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
# variables.tf
variable "environment" {
description = "Target deployment environment"
type = string
validation {
condition = contains(["dev", "staging", "prod"], var.environment)
error_message = "Environment must be dev, staging, or prod."
}
}
# locals.tf
locals {
common_tags = {
Environment = var.environment
ManagedBy = "Terraform"
}
}
# main.tf
resource "aws_vpc" "main" {
cidr_block = var.vpc_cidr
enable_dns_hostnames = true
tags = merge(local.common_tags, {
Name = "${var.project_name}-${var.environment}-vpc"
})
}
# outputs.tf
output "vpc_id" {
description = "ID of the created VPC"
value = aws_vpc.main.id
}resource "aws_instance" "web" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
subnet_id = "subnet-12345678"
tags = {
Name = "web-server"
Environment = "production"
}
}Arguments precede blocks, with meta-arguments first:
resource "aws_instance" "example" {
# Meta-arguments
count = 3
# Arguments
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
# Blocks
root_block_device {
volume_size = 20
}
# Lifecycle last
lifecycle {
create_before_destroy = true
}
}# Bad
resource "aws_instance" "webAPI-aws-instance" {}
variable "name" {}
# Good
resource "aws_instance" "web_api" {}
variable "application_name" {}Every variable must include type and description:
variable "instance_type" {
description = "EC2 instance type for the web server"
type = string
default = "t2.micro"
validation {
condition = contains(["t2.micro", "t2.small", "t2.medium"], var.instance_type)
error_message = "Instance type must be t2.micro, t2.small, or t2.medium."
}
}
variable "database_password" {
description = "Password for the database admin user"
type = string
sensitive = true
}Every output must include description:
output "instance_id" {
description = "ID of the EC2 instance"
value = aws_instance.web.id
}
output "database_password" {
description = "Database administrator password"
value = aws_db_instance.main.password
sensitive = true
}# Bad - count for multiple resources
resource "aws_instance" "web" {
count = var.instance_count
tags = { Name = "web-${count.index}" }
}
# Good - for_each with named instances
variable "instance_names" {
type = set(string)
default = ["web-1", "web-2", "web-3"]
}
resource "aws_instance" "web" {
for_each = var.instance_names
tags = { Name = each.key }
}resource "aws_cloudwatch_metric_alarm" "cpu" {
count = var.enable_monitoring ? 1 : 0
alarm_name = "high-cpu-usage"
threshold = 80
}When generating code, apply security hardening:
sensitive = trueresource "aws_s3_bucket" "data" {
bucket = "${var.project}-${var.environment}-data"
tags = local.common_tags
}
resource "aws_s3_bucket_versioning" "data" {
bucket = aws_s3_bucket.data.id
versioning_configuration {
status = "Enabled"
}
}
resource "aws_s3_bucket_server_side_encryption_configuration" "data" {
bucket = aws_s3_bucket.data.id
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "aws:kms"
kms_master_key_id = aws_kms_key.s3.arn
}
}
}
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
}terraform {
required_version = ">= 1.7"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0" # Allow minor updates
}
}
}Version constraint operators:
= 1.0.0 - Exact version>= 1.0.0 - Greater than or equal~> 1.0 - Allow rightmost component to increment>= 1.0, < 2.0 - Version rangeprovider "aws" {
region = "us-west-2"
default_tags {
tags = {
ManagedBy = "Terraform"
Project = var.project_name
}
}
}
# Aliased provider for multi-region
provider "aws" {
alias = "east"
region = "us-east-1"
}Never commit:
terraform.tfstate, terraform.tfstate.backup.terraform/ directory*.tfplan.tfvars files with sensitive dataAlways commit:
.tf configuration files.terraform.lock.hcl (dependency lock file)Run before committing:
terraform fmt -recursive
terraform validateAdditional tools:
tflint - Linting and best practicescheckov / tfsec - Security scanningterraform fmtterraform validatesensitive = trueBased on: HashiCorp Terraform Style Guide
© warpdotdev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/terraform-style-check of warpdotdev/oz-skills.
Open the folder on GitHubat commit 6c08c49
Terraform Style Check next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Terraform Style Check this skillwarpdotdev/oz-skills | 825 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Terraform and OpenTofu Guideagentscope-ai/QwenPaw | 36k | 6 repos | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| Terraform Skillantonbabenko/terraform-skill | 2.4k | 1 repos | ~5.1k | Automated safety check: Pass | Apache-2.0 | |
| Review Docshashicorp/terraform-provider-aws | 11k | — | ~1.3k | Automated safety check: Pass | MPL-2.0 | |
| Senior DevOps Toolkitmaslennikov-ig/claude-code-orchestrator-kit | 260 | 6 repos | ~1.1k | Automated safety check: Notes | Custom licence | |
| Cloudflarehodgef/apiker | 127 | 7 repos | ~2.2k | Automated safety check: Pass | MIT |
agentscope-ai/QwenPaw
Guidance for writing and testing Terraform and OpenTofu code: module structure, naming, test approaches, CI/CD workflows, state handling and security scanning.
antonbabenko/terraform-skill
A skill your agent uses when writing, reviewing, or debugging Terraform/OpenTofu modules, tests, CI, scans, or state ops - diagnoses failure mode (identity churn, secrets, blast radius, CI drift…
hashicorp/terraform-provider-aws
Review a Terraform AWS Provider PR's end-user documentation (website/docs//.markdown): whether docs are needed, description openings, argument/attribute style, section structure, tags wording, code…
maslennikov-ig/claude-code-orchestrator-kit
Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…
hodgef/apiker
Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF…
patrickchugh/terravision
Draw cloud architecture diagrams for AWS, Azure or GCP with the official provider icon sets, using TerraVision.
warpdotdev/oz-skills
Optimize for search engine visibility, ranking, and AI citations.
warpdotdev/oz-skills
Audit web applications for WCAG accessibility compliance. An agent skill from warpdotdev/oz-skills.
warpdotdev/oz-skills
Test local web applications with Playwright. An agent skill from warpdotdev/oz-skills.
warpdotdev/oz-skills
Triage GitHub bug reports for actionability. An agent skill from warpdotdev/oz-skills.
warpdotdev/oz-skills
Generate reproducible analysis artifacts — SQL queries, Python visualizations, and summary tables — as you work through a BigQuery data analysis.
warpdotdev/oz-skills
Diagnose and fix GitHub Actions CI failures. An agent skill from warpdotdev/oz-skills.
Works with
Categories
Generate Terraform HCL code following HashiCorp's official style conventions and best practices. Terraform Style Check is an agent skill from warpdotdev/oz-skills. Generate Terraform HCL code following HashiCorp's official style conventions and best practices.
Terraform Style Check fits situations like: generating Terraform configurations; tasks that involve Infrastructure as code.
Run `npx skills add warpdotdev/oz-skills --skill terraform-style-check -a claude-code`. Or copy the skill folder (.agents/skills/terraform-style-check in warpdotdev/oz-skills) into .claude/skills/terraform-style-check in your project. Claude Code loads it when a task matches its description.
Run `npx skills add warpdotdev/oz-skills --skill terraform-style-check -a codex`. Or copy the skill folder (.agents/skills/terraform-style-check in warpdotdev/oz-skills) into .agents/skills/terraform-style-check in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add warpdotdev/oz-skills --skill terraform-style-check -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/terraform-style-check, .gemini/skills/terraform-style-check, .github/skills/terraform-style-check and .opencode/skills/terraform-style-check in your project.
Going by SKILL.md and its folder, Terraform Style Check needs the command-line tools its instructions call (terraform).
SKILL.md names 1 domain. As links in the text: developer.hashicorp.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Terraform Style Check is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Terraform Style Check: Terraform and OpenTofu Guide (agentscope-ai/QwenPaw, 36k stars), Terraform Skill (antonbabenko/terraform-skill, 2.4k stars), Review Docs (hashicorp/terraform-provider-aws, 11k stars) and Senior DevOps Toolkit (maslennikov-ig/claude-code-orchestrator-kit, 260 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
warpdotdev (a GitHub organization) maintains it in warpdotdev/oz-skills, which has 825 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on August 15, 2026.
Source: warpdotdev/oz-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.