agentleFS
maroffomaroffo/claude-forge/skills/terraform/SKILL.md

terraform

Skill17 starsChanged 51 days agoMITView on GitHub

Terraform and Terragrunt for infrastructure as code. Use for IaC, modules, state management, HCL.

23 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ansible, kubernetes and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • julweberSkill

    ansible

    Ansible automation reference for playbooks, roles, inventory, variables, and modules. Includes Proxmox VE and Docker integration via community.general and community.docker collections. Use when writing playbooks, troubleshooting Ansible runs, or designing automation workflows. Triggers: ansible, playbook, inventory, role, task, handler, vars, jinja2, galaxy, proxmox_kvm, proxmox_lxc, docker_container, docker_compose.

    Also in 4 projects that use this

  • mjunaidcaSkill

    kubernetes

    Production-grade Kubernetes manifests and debugging for containerized applications. This skill should be used when users ask to deploy to Kubernetes, create K8s manifests, containerize for K8s, set up Deployments/Services/Jobs/StatefulSets/CronJobs, create namespaces with resource quotas, set up multi-team isolation, configure ResourceQuota/ LimitRange, secure with RBAC (ServiceAccount, Role, RoleBinding), configure init containers (model download, db wait, migrations), set up sidecars (logging, metrics), or debug pods (CrashLoopBackOff, logs, exec, describe, events). Auto-detects from Dockerfile/code, generates hardened manifests with educational comments. CKAD-aligned.

    Also in 5 projects that use this

  • thechandanbhagatSkill

    sql

    Write SQL queries, optimize database performance, design schemas, and debug SQL issues. Use for database operations, query optimization, and schema design.

    Also in 3 projects that use this

  • MicrosoftSkill

    github-actions

    Use when creating, editing, reviewing, or troubleshooting GitHub Actions workflows in Scope.

    Also in 5 projects that use this

  • VercelSkill

    react

    React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.

    Also in 5 projects that use this

  • garri333Skill

    codex-cli

    OpenAI Codex CLI mastery skill for installation, authentication, terminal commands, code generation from natural language, file editing, project scaffolding, and IDE integrations. Covers GPT-5.2 Instant/Thinking tiers and shell/container execution modes.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 21 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Security: No hardcoded secrets, encrypted state, locking enabled, least-privilege IAM, Checkov passes

    line 98

“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ABOUTME: Terraform/Terragrunt IaC patterns, modules, state management

ABOUTME: Best practices for HCL, DRY configs, security scanning

Terraform & Terragrunt

OpenTofu: open-source (MPL) fork, recommended for new projects because Terraform is BSL-licensed. The two have diverged since the fork, so check feature parity against the version the project runs.

Quick Reference

terraform init|plan|apply|destroy
terragrunt run --all apply
terraform fmt -recursive && terraform validate
terraform state list|show|rm|mv <resource>

See: _AST_GREP.md (sg patterns for HCL)


Project Structure

Simple: main.tf, variables.tf, outputs.tf, versions.tf

Multi-env:

terraform/
├── modules/{vpc,eks}/
└── environments/{dev,staging,prod}/

TF 1.5+ Blocks

import { to = aws_instance.web; id = "i-1234567890abcdef0" }
moved { from = aws_instance.web; to = module.web.aws_instance.main }
check "health" {
  data "http" "api" { url = "https://api.example.com/health" }
  assert { condition = data.http.api.status_code == 200; error_message = "API down" }
}

Terragrunt

Benefits: DRY configs, multi-env mgmt, dependency ordering, auto backend config

Structure

infrastructure/
├── terragrunt.hcl           # Root
├── _envcommon/{vpc,eks}.hcl
├── {dev,staging,prod}/
│   └── {region}/{vpc,eks}/terragrunt.hcl

Dependencies

dependency "vpc" { config_path = "../vpc" }
inputs = { vpc_id = dependency.vpc.outputs.vpc_id }

State Management

Split by: env, region, component, blast radius

backend "s3" { bucket = "my-state"; key = "prod/terraform.tfstate"; encrypt = true; use_lockfile = true }  # S3-native locking; dynamodb_table only on versions without it

Testing & Security

Pipeline: fmt/validate → TFLint → Checkov/Trivy → Infracost

terraform fmt -check -recursive && terraform validate
tflint --recursive
checkov -d . --framework terraform --compact
infracost breakdown --path .

Code Review Checklist

Security: No hardcoded secrets, encrypted state, locking enabled, least-privilege IAM, Checkov passes

Structure: Versioned modules, validated variables, consistent naming


Resources

ToolPurpose
TFLintLinter
CheckovSecurity
InfracostCost estimation

Docs: Terraform, OpenTofu, Terragrunt

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.