Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Specialized skill for Terraform and Infrastructure as Code operations. Execute terraform commands, validate HCL, analyze state and drift, generate modules, and support multi-cloud providers (AWS, GCP, Azure).
.claude/skills/a5c-ai-terraform-iac/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 101% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 76% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 111% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 30% | 0% |
| case-07 | ✓→✓ | = Same ✓ | 95% | 0% |
You are terraform-iac - a specialized skill for Terraform operations and Infrastructure as Code best practices. This skill provides deep expertise in managing infrastructure through code across AWS, GCP, and Azure.
This skill enables AI-powered Infrastructure as Code operations including:
Execute and analyze Terraform operations:
bash# Initialize workspace terraform init -backend-config=backend.hcl # Format check terraform fmt -check -recursive # Validation terraform validate # Plan with output terraform plan -out=tfplan -detailed-exitcode # Apply with auto-approve (for CI/CD) terraform apply -auto-approve tfplan # Show state terraform show -json tfplan > plan.json # State operations terraform state list terraform state show <resource>
Validate Terraform configurations:
bash# Terraform native validation terraform validate # TFLint for best practices tflint --init tflint --format=json # Checkov security scanning checkov -d . --output json # Terrascan policy checks terrascan scan -d . -o json
Generate Terraform modules following best practices:
hcl# Example module structure # modules/vpc/main.tf resource "aws_vpc" "main" { cidr_block = var.cidr_block enable_dns_hostnames = var.enable_dns_hostnames enable_dns_support = var.enable_dns_support tags = merge(var.tags, { Name = var.name }) } # modules/vpc/variables.tf variable "cidr_block" { description = "CIDR block for the VPC" type = string } variable "name" { description = "Name of the VPC" type = string } variable "enable_dns_hostnames" { description = "Enable DNS hostnames" type = bool default = true } variable "enable_dns_support" { description = "Enable DNS support" type = bool default = true } variable "tags" { description = "Additional tags" type = map(string) default = {} } # modules/vpc/outputs.tf output "vpc_id" { description = "ID of the VPC" value = aws_vpc.main.id } output "cidr_block" { description = "CIDR block of the VPC" value = aws_vpc.main.cidr_block }
bash# Refresh and detect drift terraform plan -refresh-only # Import existing resources terraform import <resource_type>.<name> <id> # Move resources in state terraform state mv <source> <destination> # Remove from state (orphaning) terraform state rm <resource>
hclprovider "aws" { region = var.aws_region default_tags { tags = { Environment = var.environment ManagedBy = "terraform" } } }
hclprovider "google" { project = var.gcp_project region = var.gcp_region } provider "google-beta" { project = var.gcp_project region = var.gcp_region }
hclprovider "azurerm" { features {} subscription_id = var.azure_subscription_id }
This skill can leverage the following MCP servers:
| Server | Description | Installation | |--------|-------------|--------------| | AWS IaC MCP Server | CloudFormation and CDK support | AWS Labs | | terraform-skill | Comprehensive Terraform guidance | GitHub |
infrastructure/
├── environments/
│ ├── dev/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── terraform.tfvars
│ ├── staging/
│ └── production/
├── modules/
│ ├── networking/
│ ├── compute/
│ └── database/
└── shared/
└── backend.tfyaml# Example GitHub Actions workflow name: Terraform on: pull_request: paths: ['infrastructure/**'] jobs: terraform: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: hashicorp/setup-terraform@v3 - name: Terraform Init run: terraform init - name: Terraform Validate run: terraform validate - name: Terraform Plan run: terraform plan -no-color continue-on-error: true
This skill integrates with the following processes:
iac-implementation.js - Initial IaC setup and configurationiac-testing.js - Testing Terraform configurationsdisaster-recovery-plan.js - DR infrastructure provisioningWhen executing operations, provide structured output:
json{ "operation": "plan", "workspace": "production", "status": "success", "changes": { "add": 3, "change": 2, "destroy": 0 }, "resources": [ { "type": "aws_instance", "name": "web", "action": "create" } ], "warnings": [], "errors": [], "artifacts": ["tfplan", "plan.json"] }
| Error | Cause | Resolution | |-------|-------|------------| | Error acquiring state lock | Concurrent operation | Wait or force-unlock | | Provider credentials not found | Missing auth | Configure provider credentials | | Resource already exists | Drift or import needed | Import or refresh state | | Cycle detected | Circular dependency | Refactor resource dependencies |
-target sparingly and document usage| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 9,718 | 10,380 | +7% | 1 | 1 | 0% | 1,577 | 3,174 | +101% | 0 | 0 | — |
case-02 | fail→pass | 14,653 | 14,478 | -1% | 1 | 1 | 0% | 2,347 | 4,141 | +76% | 0 | 0 | — |
case-03 | fail→fail | 11,041 | 10,115 | -8% | 1 | 1 | 0% | 2,068 | 3,717 | +80% | 0 | 0 | — |
case-04 | fail→fail | 10,746 | 11,961 | +11% | 1 | 1 | 0% | 2,142 | 4,255 | +99% | 0 | 0 | — |
case-05 | fail→fail | 16,086 | 19,519 | +21% | 1 | 1 | 0% | 3,262 | 6,233 | +91% | 0 | 0 | — |
case-06 | pass→pass | 10,573 | 4,366 | -59% | 1 | 1 | 0% | 1,859 | 2,423 | +30% | 0 | 0 | — |
case-07 | pass→pass | 11,492 | 11,746 | +2% | 1 | 1 | 0% | 2,075 | 4,042 | +95% | 0 | 0 | — |
case-08 | fail→fail | 4,317 | 5,633 | +30% | 1 | 1 | 0% | 691 | 2,692 | +290% | 0 | 0 | — |
case-09 | pass→pass | 2,198 | 2,247 | +2% | 1 | 1 | 0% | 401 | 2,146 | +435% | 0 | 0 | — |
case-10 | pass→pass | 5,687 | 6,058 | +7% | 1 | 1 | 0% | 1,018 | 2,703 | +166% | 0 | 0 | — |
case-11 | pass→pass | 3,363 | 3,724 | +11% | 1 | 1 | 0% | 606 | 2,507 | +314% | 0 | 0 | — |
case-12 | pass→pass | 4,535 | 4,102 | -10% | 1 | 1 | 0% | 682 | 2,599 | +281% | 0 | 0 | — |
case-13 | fail→fail | 7,856 | 6,779 | -14% | 1 | 1 | 0% | 1,297 | 3,089 | +138% | 0 | 0 | — |
case-14 | pass→pass | 9,634 | 6,366 | -34% | 1 | 1 | 0% | 1,793 | 2,998 | +67% | 0 | 0 | — |
case-15 | pass→pass | 14,838 | 11,641 | -22% | 1 | 1 | 0% | 2,437 | 3,890 | +60% | 0 | 0 | — |
case-16 | pass→pass | 4,767 | 5,206 | +9% | 1 | 1 | 0% | 950 | 2,752 | +190% | 0 | 0 | — |
case-17 | pass→pass | 4,563 | 4,413 | -3% | 1 | 1 | 0% | 724 | 2,598 | +259% | 0 | 0 | — |
case-18 | pass→pass | 7,852 | 7,732 | -2% | 1 | 1 | 0% | 1,350 | 3,055 | +126% | 0 | 0 | — |
case-19 | pass→pass | 3,701 | 5,218 | +41% | 1 | 1 | 0% | 637 | 2,595 | +307% | 0 | 0 | — |
case-20 | pass→pass | 7,058 | 6,018 | -15% | 1 | 1 | 0% | 1,166 | 2,908 | +149% | 0 | 0 | — |
case-21 | pass→pass | 13,029 | 10,301 | -21% | 1 | 1 | 0% | 2,169 | 3,591 | +66% | 0 | 0 | — |
case-22 | fail→pass | 16,705 | 19,047 | +14% | 1 | 1 | 0% | 2,741 | 5,785 | +111% | 0 | 0 | — |
case-23 | pass→pass | 15,013 | 15,039 | +0% | 1 | 1 | 0% | 2,253 | 4,395 | +95% | 0 | 0 | — |
case-24 | pass→pass | 12,516 | 16,463 | +32% | 1 | 1 | 0% | 2,218 | 4,140 | +87% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +13 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.