Agent skill
forge-lang-terraform
Terraform infrastructure-as-code safety practices. Enforces plan-before-apply workflow. Use when working with .tf files or infrastructure commands.
Install this agent skill to your Project
npx add-skill https://github.com/martimramos/claude-forge/tree/main/skills/languages/terraform
SKILL.md
Terraform Development
Safety Rules
NEVER run without user confirmation:
terraform applyterraform destroyterraform import
ALWAYS run first:
terraform planterraform validate
Workflow
┌────────────────────────────────────────────────┐
│ VALIDATE → PLAN → REVIEW → APPLY │
└────────────────────────────────────────────────┘
Step 1: Validate
terraform init
terraform validate
terraform fmt -check
Step 2: Plan
terraform plan -out=tfplan
Show plan to user and wait for confirmation.
Step 3: Apply (only after explicit approval)
terraform apply tfplan
Linting
# Format check
terraform fmt -check -recursive
# TFLint
tflint --recursive
# Checkov security scanning
checkov -d .
Project Structure
project/
├── main.tf
├── variables.tf
├── outputs.tf
├── versions.tf
├── terraform.tfvars.example
├── modules/
│ └── module_name/
│ ├── main.tf
│ ├── variables.tf
│ └── outputs.tf
└── README.md
Pre-Apply Checklist
Terraform Checklist:
- [ ] terraform init completed
- [ ] terraform validate passed
- [ ] terraform fmt -check passed
- [ ] tflint passed (if available)
- [ ] terraform plan reviewed
- [ ] User confirmed changes
- [ ] Ready to apply
State Safety
- Never edit terraform.tfstate manually
- Always use
terraform statecommands - Back up state before imports
- Use remote state with locking
Scripts
Validate before plan:
~/.claude/skills/languages/terraform/scripts/plan-check.sh
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
forge-lang-c
C development standards including make, gcc/clang, valgrind, and cppcheck. Use when working with C files, Makefiles, or CMakeLists.txt.
forge-lang-terragrunt
Terragrunt wrapper for Terraform with DRY configurations. Enforces plan-before-apply workflow. Use when working with terragrunt.hcl files.
forge-lang-cpp
C++ development standards including make/cmake, g++/clang++, and static analysis. Use when working with C++ files (.cpp, .hpp, .cc, .hh).
forge-lang-rust
Rust development standards including cargo test, clippy, and rustfmt. Use when working with Rust files, Cargo.toml, or Rust tests.
forge-lang-ansible
Ansible automation safety practices. Enforces check-mode-first workflow. Use when working with playbooks, roles, or inventory files.
forge-lang-typescript
TypeScript development standards including type checking, jest/vitest, eslint, and prettier. Use when working with TypeScript files, tsconfig.json, or .ts/.tsx files.
Didn't find tool you were looking for?