.agents/skills/cloud-iac-terraform/SKILL.md
Infrastructure as Code (IaC) mastery using Terraform/OpenTofu. Focuses on modularity, state management, and least-privilege security.
npx skillsauth add thesammykins/dotfiles cloud-iac-terraformInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Expert infrastructure automation using Terraform (HashiCorp) or OpenTofu. I enforce 2026 standards: native state encryption, Stack-based architecture, strict type safety, and policy-as-code validation.
<context_gathering> Execute these commands IN PARALLEL to establish ground truth:
# Check binaries and versions
terraform --version || echo "Terraform not found"
tofu --version || echo "OpenTofu not found"
# Analyze project structure
ls -F
find . -maxdepth 2 -name "*.tf"
find . -maxdepth 2 -name "*.tfstack.hcl" # Check for Terraform Stacks
find . -maxdepth 2 -name "*.tftest.hcl" # Check for native tests
# Check state configuration (don't read secrets, just config presence)
grep -r "backend" . --include="*.tf"
Capture these data points:
terraform (Standard/Stacks) or tofu (OpenTofu)?main.tf), Modular (modules/), or Stack (.tfstack.hcl)?.tftest.hcl) present?
</context_gathering>| Condition | Mode/Strategy |
|-----------|---------------|
| *.tfstack.hcl present | Terraform Stacks (Modern HCP workflow) |
| tofu installed & preferred | OpenTofu Legacy (Standard modules + encryption) |
| terraform only | Terraform Standard (Classic modules) |
| No backend block found | Bootstrap Mode (Local dev only - WARN USER) |
You MUST output this block before proceeding. NO EXCEPTIONS.
ANALYSIS RESULT
===============
Detected Context: [Tool: X, Arch: Y, State: Z]
Selected Strategy: [Strategy Name]
Plan:
1. [Init/Setup]
2. [Validation/Testing]
3. [Plan/Deploy]
</analysis>
terraform init
terraform validate
terraform fmt -recursive
terraform plan # Review changes
# Wait for user confirmation
terraform apply
# Use the detected binary (terraform or tofu)
$BINARY fmt -recursive
$BINARY validate
.tftest.hcl files exist.$BINARY test
$BINARY plan -out=tfplan -lock=true
$BINARY apply "tfplan"
.tfvars containing actual secrets. Use *.auto.tfvars (gitignored) or ENV vars.~> 5.0).Destroy, STOP and ask for explicit confirmation unless expected.
</execution>
# Verify state is consistent
$BINARY show
# If outputs exist, verify connectivity (optional)
# curl $(terraform output -raw api_url)
Final Report: Output a summary of resources created/modified and the location of the state file. </verification>
<anti_patterns>
terraform.tfstate to git.aws = ">= 0.0.0". Always pin major versions.password = "hunter2". Use var.password or Secrets Manager.terraform test capabilities in 2026.
</anti_patterns>development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
development
Autonomous feature development - setup and execution. Triggers on: ralph, set up ralph, run ralph, run the loop, implement tasks. Two phases: (1) Setup - chat through feature, create tasks with dependencies (2) Loop - pick ready tasks, implement, commit, repeat until done.
tools
Enforces the 2025 Python stack. Replaces legacy tools (pip, flake8, isort) with modern, fast equivalents (uv, ruff). Mandates strict type hints.
documentation
Generate a Product Requirements Document (PRD) for a new feature. Use when planning a feature, starting a new project, or when asked to create a PRD. Triggers on: create a prd, write prd for, plan this feature, requirements for, spec out.