Skip to content
Back to skills

Terraform

ASecurity

Terraform infrastructure-as-code skills from HashiCorp. Covers HCL code generation with style conventions, testing with .tftest.hcl files, and module refactoring. Use when writing, reviewing, generating, or refactoring Terraform configurations, creating tests, or designing modules.

  • 28 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 27, 2026
data-aibashterraformtestingrefactoringgit

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add georgekhananaev/claude-skills-vault --skill terraform --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Terraform?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Terraform
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/georgekhananaev-terraform/badge)](https://www.skillsdirectory.com/skills/georgekhananaev-terraform)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: terraform
description: Terraform infrastructure-as-code skills from HashiCorp. Covers HCL code generation with style conventions, testing with .tftest.hcl files, and module refactoring. Use when writing, reviewing, generating, or refactoring Terraform configurations, creating tests, or designing modules.
metadata:
  author: HashiCorp
  source: https://github.com/hashicorp/agent-skills
  version: "1.0"
---

# Terraform Skills

HashiCorp's official Terraform agent skills for infrastructure-as-code development.

## Available Sub-Skills

| Skill | File | Use When |
|-------|------|----------|
| Style Guide | [terraform-style-guide-SKILL.md](terraform-style-guide-SKILL.md) | Writing or reviewing Terraform HCL code |
| Testing | [terraform-test-SKILL.md](terraform-test-SKILL.md) | Creating .tftest.hcl test files, writing assertions, mocking |
| Module Refactoring | [refactor-module-SKILL.md](refactor-module-SKILL.md) | Transforming monolithic configs into reusable modules |

## Quick Reference

### File Organization
| File | Purpose |
|------|---------|
| `terraform.tf` | Version requirements |
| `providers.tf` | Provider configurations |
| `main.tf` | Primary resources |
| `variables.tf` | Input variables (alphabetical) |
| `outputs.tf` | Output values (alphabetical) |
| `locals.tf` | Local values |

### Key Conventions
- Two spaces per indent, no tabs
- Lowercase with underscores for names
- Every variable needs `type` and `description`
- Every output needs `description`
- Prefer `for_each` over `count`
- Never hardcode credentials

### Validation
```bash
terraform fmt -recursive
terraform validate
```

## Source

From [hashicorp/agent-skills](https://github.com/hashicorp/agent-skills) - terraform code-generation and module-generation plugins.

Files in this skill

  • SKILL.md1.7 KB
  • refactor-module-SKILL.md13.3 KB
  • terraform-style-guide-SKILL.md7.5 KB
  • terraform-test-SKILL.md39.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.