terraform-patterns
O que ela faz
Esta skill ajuda a escrever e revisar código Terraform, que define a infraestrutura da nuvem em arquivos. Ela é para engenheiros que gerenciam infraestrutura e querem configurações mais seguras e limpas.
Quando usar
- ✓Quando você está revisando arquivos Terraform em busca de erros ou má estrutura.
- ✓Quando você está desenhando um módulo Terraform reutilizável.
- ✓Quando você quer uma revisão de segurança do código de infraestrutura antes de mudanças.
Link da skill
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/terraform-patterns/skills/terraform-patterns/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Revise meus arquivos Terraform em busca de problemas de segurança e padrões ruins antes de eu aplicá-los.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
Ela analisa a estrutura dos módulos e verifica a configuração em busca de configurações incorretas e segredos expostos, depois sugere correções.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Terraform Patterns
Predictable infrastructure. Secure state. Modules that compose. No drift.
Opinionated Terraform workflow that turns sprawling HCL into well-structured, secure, production-grade infrastructure code. Covers module design, state management, provider patterns, security hardening, and CI/CD integration.
Not a Terraform tutorial — a set of concrete decisions about how to write infrastructure code that doesn't break at 3 AM.
Slash Commands
| Command | What it does |
|---|---|
/terraform-patterns review |
Analyze Terraform code for anti-patterns, security issues, and structure problems |
/terraform-patterns module |
Design or refactor a Terraform module with proper inputs, outputs, and composition |
/terraform-patterns security |
Audit Terraform code for security vulnerabilities, secrets exposure, and IAM misconfigurations |
When This Skill Activates
Recognize these patterns from the user:
- "Review this Terraform code"
- "Design a Terraform module for..."
- "My Terraform state is..."
- "Set up remote state backend"
- "Multi-region Terraform deployment"
- "Terraform security review"
- "Module structure best practices"
- "Terraform CI/CD pipeline"
- Any request involving:
.tffiles, HCL, Terraform modules, state management, provider configuration, infrastructure-as-code
If the user has .tf files or wants to provision infrastructure with Terraform → this skill applies.
Workflow
/terraform-patterns review — Terraform Code Review
Analyze current state
- Read all
.tffiles in the target directory - Identify module structure (flat vs nested)
- Count resources, data sources, variables, outputs
- Check naming conventions
- Read all
Apply review checklist
MODULE STRUCTURE ├── Variables have descriptions and type constraints ├── Outputs expose only what consumers need ├── Resources use consistent naming: {provider}_{type}_{purpose} ├── Locals used for computed values and DRY expressions └── No hardcoded values — everything parameterized or in locals STATE & BACKEND ├── Remote backend configured (S3, GCS, Azure Blob, Terraform Cloud) ├── State locking enabled (DynamoDB for S3, native for others) ├── State encryption at rest enabled ├── No secrets stored in state (or state access is restricted) └── Workspaces or directory isolation for environments PROVIDERS ├── Version constraints use pessimistic operator: ~> 5.0 ├── Required providers block in terraform {} block ├── Provider aliases for multi-region or multi-account └── No provider configuration in child modules SECURITY ├── No hardcoded secrets, keys, or passwords ├── IAM follows least-privilege principle ├── Encryption enabled for storage, databases, secrets ├── Security groups are not overly permissive (no 0.0.0.0/0 ingress on sensitive ports) └── Sensitive variables marked with sensitive = trueGenerate report
python3 scripts/tf_module_analyzer.py ./terraformRun security scan
python3 scripts/tf_security_scanner.py ./terraform
/terraform-patterns module — Module Design
Identify module scope
- Single responsibility: one module = one logical grouping
- Determine inputs (variables), outputs, and resource boundaries
- Decide: flat module (single directory) vs nested (calling child modules)
Apply module design checklist
STRUCTURE ├── main.tf — Primary resources ├── variables.tf — All input variables with descriptions and types ├── outputs.tf — All outputs with descriptions ├── versions.tf — terraform {} block with required_providers ├── locals.tf — Computed values and naming conventions ├── data.tf — Data sources (if any) └── README.md — Usage examples and variable documentation VARIABLES ├── Every variable has: description, type, validation (where applicable) ├── Sensitive values marked: sensitive = true ├── Defaults provided for optional settings ├── Use object types for related settings: variable "config" { type = object({...}) } └── Validate with: validation { condition = ... } OUTPUTS ├── Output IDs, ARNs, endpoints — things consumers need ├── Include description on every output ├── Mark sensitive outputs: sensitive = true └── Don't output entire resources — only specific attributes COMPOSITI
Perguntas frequentes
Ela cobre estado remoto?
Sim. Inclui a configuração de um backend de estado remoto.
Ela executa o terraform apply para mim?
Não. Ela revisa e sugere mudanças; você executa suas próprias etapas de deploy.
Quais nuvens ela cobre?
Ela cobre padrões gerais do Terraform, incluindo configuração de provedores, IAM e configurações multirregião.
Detalhes
Descrição original do autor
Use for any Terraform module, state backend, provider setup or IaC security review, before editing .tf files. Analyzes modules with tf_module_analyzer.py and scans for misconfigurations with tf_security_scanner.py.
Popularidade
- Estrelas no GitHub
- 29 mil
- Posição no ranking
- #9612
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
agent-launcher-orchestrator
29 milAjuda seu agente a planejar, criar, testar e agendar um agente gerenciado do Claude na sua própria conta, passo a passo, a partir de um objetivo claro.
grade-iterate
29 milPermite que seu agente avalie o trabalho de um agente de IA gerenciado com base em uma rubrica e o melhore em um número fixo de rodadas, para que ele nunca entre em loop infinito.
interview
29 milPermite que seu agente entreviste você sobre uma ideia de agente de IA e transforme suas respostas em um plano de construção simples antes de qualquer lançamento.
run-without-you
29 milAjuda seu agente a configurar um agente gerenciado de IA para rodar em um agendamento ou quando um evento acontecer, com o horário do cron verificado antes do lançamento.
Skills parecidas
openclaw-update
394 milAjuda seu agente a atualizar um OpenClaw Gateway existente, escolhendo o método que combina com a instalação e mantendo sua sessão funcionando.
diagnose-gateway
394 milAjuda seu agente a descobrir por que seu OpenClaw Gateway está falhando, verificando configurações, canais e portas sem alterar nada.
crabbox-apps
394 milAjuda seu agente a abrir e executar um app em uma máquina temporária na nuvem e depois mostrar a visualização dele no painel lateral do seu chat.