terraform-skill
Qué hace
Esta skill guía el trabajo de infraestructura como código con Terraform u OpenTofu. Está pensada para desarrolladores e ingenieros de DevOps que gestionan recursos en la nube con código.
Cuándo usarla
- ✓Cuando creas un nuevo módulo de Terraform o reorganizas una configuración existente.
- ✓Cuando necesitas configurar pruebas o un pipeline de CI/CD para el código de infraestructura.
- ✓Cuando depuras problemas del estado de Terraform o revisas configuraciones en busca de fallos de seguridad.
Link de la skill
https://github.com/agentscope-ai/QwenPaw/blob/main/plugins/bundle/cloudpaw/skills/terraform-skill/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Revisa mi proyecto de Terraform en busca de problemas de seguridad y sugiere una estructura de módulos.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Explica cómo elegir un enfoque de pruebas, estructurar módulos, configurar pipelines y ejecutar herramientas de análisis como trivy y checkov. Aplica estas prácticas al revisar o escribir configuraciones.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Terraform Skill for Claude
Comprehensive Terraform and OpenTofu guidance covering testing, modules, CI/CD, and production patterns. Based on terraform-best-practices.com and enterprise experience.
When to Use This Skill
Activate this skill when:
- Creating new Terraform or OpenTofu configurations or modules
- Setting up testing infrastructure for IaC code
- Deciding between testing approaches (validate, plan, frameworks)
- Structuring multi-environment deployments
- Implementing CI/CD for infrastructure-as-code
- Reviewing or refactoring existing Terraform/OpenTofu projects
- Choosing between module patterns or state management approaches
Don't use this skill for:
- Basic Terraform/OpenTofu syntax questions (Claude knows this)
- Provider-specific API reference (link to docs instead)
- Cloud platform questions unrelated to Terraform/OpenTofu
Core Principles
1. Code Structure Philosophy
Module Hierarchy:
| Type | When to Use | Scope |
|---|---|---|
| Resource Module | Single logical group of connected resources | VPC + subnets, Security group + rules |
| Infrastructure Module | Collection of resource modules for a purpose | Multiple resource modules in one region/account |
| Composition | Complete infrastructure | Spans multiple regions/accounts |
Hierarchy: Resource → Resource Module → Infrastructure Module → Composition
Directory Structure:
environments/ # Environment-specific configurations
├── prod/
├── staging/
└── dev/
modules/ # Reusable modules
├── networking/
├── compute/
└── data/
examples/ # Module usage examples (also serve as tests)
├── complete/
└── minimal/
Key principle from terraform-best-practices.com:
- Separate environments (prod, staging) from modules (reusable components)
- Use examples/ as both documentation and integration test fixtures
- Keep modules small and focused (single responsibility)
For detailed module architecture, see: Code Patterns: Module Types & Hierarchy
2. Naming Conventions
Resources:
# Good: Descriptive, contextual
resource "aws_instance" "web_server" { }
resource "aws_s3_bucket" "application_logs" { }
# Good: "this" for singleton resources (only one of that type)
resource "aws_vpc" "this" { }
resource "aws_security_group" "this" { }
# Avoid: Generic names for non-singletons
resource "aws_instance" "main" { }
resource "aws_s3_bucket" "bucket" { }
Singleton Resources:
Use "this" when your module creates only one resource of that type:
✅ DO:
resource "aws_vpc" "this" {} # Module creates one VPC
resource "aws_security_group" "this" {} # Module creates one SG
❌ DON'T use "this" for multiple resources:
resource "aws_subnet" "this" {} # If creating multiple subnets
Use descriptive names when creating multiple resources of the same type.
Variables:
# Prefix with context when needed
var.vpc_cidr_block # Not just "cidr"
var.database_instance_class # Not just "instance_class"
Files:
main.tf- Primary resourcesvariables.tf- Input variablesoutputs.tf- Output valuesversions.tf- Provider versionsdata.tf- Data sources (optional)
Testing Strategy Framework
Decision Matrix: Which Testing Approach?
| Your Situation | Recommended Approach | Tools | Cost |
|---|---|---|---|
| Quick syntax check | Static analysis | terraform validate, fmt |
Free |
| Pre-commit validation | Static + lint | validate, tflint, trivy, checkov |
Free |
| Terraform 1.6+, simple logic | Native test framework | Built-in terraform test |
Free-Low |
| Pre-1.6, or Go expertise | Integration testing | Terratest | Low-Med |
| Security/compliance focus | Policy as code | OPA, Sentinel | Free |
| Cost-sensitive workflow | Mock providers (1.7+) | Native tests + mocking | Free |
| Multi-cloud, complex | Full integration | Terratest + real infra | Med-High |
Testing Pyramid for Infrastructure
/\
/ \ End-to-End Tests (Expensive)
/____\ - Full environment deployment
/ \ - Production-like setup
/________\
/ \ Integration Tests (Moderate)
/____________\ - Module testing in isolation
/ \ - Real resources in test account
/________________\ Static Analysis (C
Preguntas frecuentes
¿Enseña la sintaxis básica de Terraform?
No. Se centra en pruebas, módulos, CI/CD y decisiones de arquitectura, no en la sintaxis básica.
¿Funciona con OpenTofu?
Sí. La skill cubre tanto Terraform como OpenTofu.
¿Qué herramientas de seguridad menciona?
Menciona trivy y checkov para analizar el código de infraestructura en busca de problemas de seguridad.
Detalles
Descripción original del autor
Use when working with Terraform or OpenTofu - creating modules, writing tests (native test framework, Terratest), setting up CI/CD pipelines, reviewing configurations, choosing between testing approaches, debugging state issues, implementing security scanning (trivy, checkov), or making infrastructure-as-code architecture decisions
repo: agentscope-ai/QwenPaw
Popularidad
- Estrellas en GitHub
- 37 mil
- Posición en el ranking
- #7569
- Licencia
- Apache-2.0
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
computer_use
37 milPermite a tu agente manejar una app en vivo de Windows o macOS observando la pantalla, haciendo clic y comprobando cada resultado, cuando ninguna herramienta directa puede hacer el trabajo.
browser
37 milPermite a tu agente manejar un navegador web real mediante el SDK de QwenPaw Browser, leyendo páginas, actuando sobre ellas y comprobando los resultados antes de dar algo por logrado.
channel_message
37 milPermite a tu agente enviar un mensaje unidireccional a un canal o sesión de chat concretos, como un aviso de tarea terminada, una vez que ha encontrado el destino adecuado.
chat_with_agent
37 milPermite a tu agente consultar a otro agente de IA para obtener una segunda opinión, un plan o una revisión, y continuar esa conversación con su contexto anterior.
Skills parecidas
openclaw-update
394 milAyuda a tu agente a actualizar una Gateway de OpenClaw que ya existe, eligiendo el método de actualización que encaja con cómo se instaló y manteniendo tu sesión activa.
diagnose-gateway
394 milAyuda a tu agente a averiguar por qué falla tu Gateway de OpenClaw, revisando ajustes, canales y puertos sin cambiar nada.
crabbox-apps
394 milAyuda a tu agente a abrir y ejecutar una app en una máquina temporal en la nube y mostrar su vista en el panel lateral de tu chat.