antonbabenko/terraform-skill

The Claude Agent Skill for Terraform and OpenTofu - testing, modules, CI/CD, and production patterns

729 stars48 forksUpdated Jan 19, 2026
npx skills add antonbabenko/terraform-skill

README

Terraform Skill for Claude

Claude Skill Terraform OpenTofu License

Comprehensive Terraform and OpenTofu best practices skill for Claude Code. Get instant guidance on testing strategies, module patterns, CI/CD workflows, and production-ready infrastructure code.

What This Skill Provides

๐Ÿงช Testing Frameworks

  • Decision matrix for choosing between native tests and Terratest
  • Testing strategy workflows (static โ†’ integration โ†’ E2E)
  • Real-world examples and patterns

๐Ÿ“ฆ Module Development

  • Structure and naming conventions
  • Versioning strategies
  • Public vs private module patterns

๐Ÿ”„ CI/CD Integration

  • GitHub Actions workflows
  • GitLab CI examples
  • Cost optimization patterns
  • Compliance automation

๐Ÿ”’ Security & Compliance

  • Trivy, Checkov integration
  • Policy-as-code patterns
  • Compliance scanning workflows

๐Ÿ“‹ Quick Reference

  • Decision flowcharts
  • Common patterns (โœ… DO vs โŒ DON'T)
  • Cheat sheets for rapid consultation

Installation

This plugin is distributed via Claude Code marketplace using .claude-plugin/marketplace.json.

Claude Code (Recommended)

/plugin marketplace add antonbabenko/terraform-skill
/plugin install terraform-skill@antonbabenko

Manual Installation

# Clone to Claude skills directory
git clone https://github.com/antonbabenko/terraform-skill ~/.claude/skills/terraform-skill

Private Testing

While the repository is private, you can test locally:

git clone git@github.com:antonbabenko/terraform-skill.git ~/.claude/skills/terraform-skill
# Claude Code will load it from the local filesystem

Verify Installation

After installation, try:

"Create a Terraform module with testing for an S3 bucket"

Claude will automatically use the skill when working with Terraform/OpenTofu code.

Quick Start Examples

Create a module with tests:

"Create a Terraform module for AWS VPC with native tests"

Review existing code:

"Review this Terraform configuration following best practices"

Generate CI/CD workflow:

"Create a GitHub Actions workflow for Terraform with cost estimation"

Testing strategy:

"Help me choose between native tests and Terratest for my modules"

What It Covers

Testing Strategy Framework

Decision matrices for:

  • When to use native tests (Terraform 1.6+)
  • When to use Terratest (Go-based)
  • Multi-environment testing patterns

Module Development Patterns

  • Naming conventions (terraform-<PROVIDER>-<NAME>)
  • Directory structure best practices
  • Input variable organization
  • Output value design
  • Version constraint patterns
  • Documentation standards

CI/CD Workflows

  • GitHub Actions examples
  • GitLab CI templates
  • Atlantis integration
  • Cost estimation (Infracost)
  • Security scanning (Trivy, Checkov)
  • Compliance checking

Security & Compliance

  • Static analysis integration
  • Policy-as-code patterns
  • Secrets management
  • State file security
  • Compliance scanning workflows

Common Patterns & Anti-patterns

Side-by-side โœ… DO vs โŒ DON'T examples for:

  • Variable naming
  • Resource naming
  • Module composition
  • State management
  • Provider configuration

Why This Skill?

Based on Production Experience:

  • Patterns from terraform-best-practices.com
  • Community-tested approaches from terraform-aws-modules
  • AWS Hero expertise in enterprise IaC
  • Real-world usage across 100+ modules

Version-Specific Guidance:

  • Terraform 1.0+ features
  • OpenTofu 1.6+ compatibility
  • Native test framework (1.6+)
  • Current tooling ecosystem (2024-2026)

Decision Frameworks: Not just "what to do" but "when and why" - helping you make informed architecture decisions.

Requirements

  • Claude Code or other Claude environment supporting skills
  • Terraform 1.0+ or OpenTofu 1.6+
  • Optional: MCP Terraform server for enhanced registry integration

Contributing

See CLAUDE.md for:

  • Skill development guidelines
  • Content structure philosophy
  • How to propose improvements
  • Testing and validation approach

Issues & Feedback: GitHub Issues

Releases

Releases are automated based on conventional commits in commit messages:

Commit TypeVersion BumpExample
feat!: or BREAKING CHANGE:Major1.2.3 โ†’ 2.0.0
feat:Minor1.2.3 โ†’ 1.3.0
fix:Patch1.2.3 โ†’ 1.2.4
Other commitsPatch (default)1.2.3 โ†’ 1.2.4

Releases are created automatically when changes are pushed to master.

Related Resources

Official Documentation

  • [

...

Read full README

Publisher

antonbabenkoantonbabenko

Statistics

Stars729
Forks48
Open Issues3
LicenseOther
CreatedJan 15, 2026