Use when writing and organizing Terraform infrastructure-as-code configurations for cloud resource provisioning.
Provides Terraform HCL syntax guidance and best practices for infrastructure-as-code. Triggers when writing or organizing Terraform configurations, providers, resources, variables, outputs, or modules.
/plugin marketplace add TheBushidoCollective/han/plugin install jutsu-shfmt@hanThis skill cannot use any tools. It operates in read-only mode without the ability to modify files or execute commands.
Writing and organizing Terraform infrastructure-as-code configurations.
# Provider configuration
terraform {
required_version = ">= 1.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
backend "s3" {
bucket = "my-terraform-state"
key = "prod/terraform.tfstate"
region = "us-east-1"
}
}
provider "aws" {
region = var.region
}
resource "aws_instance" "web" {
ami = var.ami_id
instance_type = var.instance_type
tags = {
Name = "web-server"
Environment = var.environment
}
lifecycle {
create_before_destroy = true
prevent_destroy = false
}
}
variable "environment" {
description = "Environment name"
type = string
default = "development"
validation {
condition = contains(["development", "staging", "production"], var.environment)
error_message = "Environment must be development, staging, or production."
}
}
variable "instance_count" {
description = "Number of instances"
type = number
default = 1
}
variable "tags" {
description = "Resource tags"
type = map(string)
default = {}
}
output "instance_id" {
description = "ID of the EC2 instance"
value = aws_instance.web.id
}
output "public_ip" {
description = "Public IP address"
value = aws_instance.web.public_ip
sensitive = false
}
data "aws_ami" "amazon_linux" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["amzn2-ami-hvm-*-x86_64-gp2"]
}
}
data "aws_vpc" "default" {
default = true
}
locals {
common_tags = {
Project = "myapp"
ManagedBy = "terraform"
Environment = var.environment
}
name_prefix = "${var.project}-${var.environment}"
}
resource "aws_instance" "web" {
# ...
tags = merge(local.common_tags, {
Name = "${local.name_prefix}-web"
})
}
# Initialize
terraform init
# Format
terraform fmt -recursive
# Validate
terraform validate
# Plan
terraform plan -out=tfplan
# Apply
terraform apply tfplan
# Destroy
terraform destroy
# Show state
terraform show
# List resources
terraform state list
project/
├── main.tf # Main resources
├── variables.tf # Variable declarations
├── outputs.tf # Output declarations
├── versions.tf # Provider versions
├── terraform.tfvars # Variable values (gitignored if sensitive)
└── modules/ # Local modules
└── network/
# Bad
resource "aws_instance" "web" {
instance_type = "t2.micro"
}
# Good
resource "aws_instance" "web" {
instance_type = var.instance_type
}
locals {
timestamp = formatdate("YYYY-MM-DD-hhmmss", timestamp())
full_name = "${var.prefix}-${var.name}-${var.suffix}"
}
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
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.