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).
Executes Terraform commands, validates HCL, analyzes state drift, and generates modules for multi-cloud infrastructure.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
README.mdYou 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:
# 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:
# 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:
# 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
}
# 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>
provider "aws" {
region = var.aws_region
default_tags {
tags = {
Environment = var.environment
ManagedBy = "terraform"
}
}
}
provider "google" {
project = var.gcp_project
region = var.gcp_region
}
provider "google-beta" {
project = var.gcp_project
region = var.gcp_region
}
provider "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.tf
# 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:
{
"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 usageActivates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.