{"id":39893400,"url":"https://github.com/antonbabenko/terraform-skill","last_synced_at":"2026-05-17T10:01:49.688Z","repository":{"id":333198518,"uuid":"1135169266","full_name":"antonbabenko/terraform-skill","owner":"antonbabenko","description":"Terraform \u0026 OpenTofu Skill for AI Agents - testing, modules, CI/CD, and production patterns","archived":false,"fork":false,"pushed_at":"2026-05-16T15:53:26.000Z","size":132,"stargazers_count":1846,"open_issues_count":2,"forks_count":161,"subscribers_count":21,"default_branch":"master","last_synced_at":"2026-05-16T17:49:00.973Z","etag":null,"topics":["agent-skills","best-practices","claude-code","claude-skills","devops","infrastructure-as-code","modules","opentofu","terraform","testing"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antonbabenko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["antonbabenko"],"patreon":"antonbabenko","custom":["https://paypal.me/antonbabenko","https://www.buymeacoffee.com/antonbabenko"]}},"created_at":"2026-01-15T18:26:37.000Z","updated_at":"2026-05-15T19:14:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/antonbabenko/terraform-skill","commit_stats":null,"previous_names":["antonbabenko/terraform-skill"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/antonbabenko/terraform-skill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonbabenko%2Fterraform-skill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonbabenko%2Fterraform-skill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonbabenko%2Fterraform-skill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonbabenko%2Fterraform-skill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonbabenko","download_url":"https://codeload.github.com/antonbabenko/terraform-skill/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonbabenko%2Fterraform-skill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33134470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-skills","best-practices","claude-code","claude-skills","devops","infrastructure-as-code","modules","opentofu","terraform","testing"],"created_at":"2026-01-18T15:03:12.830Z","updated_at":"2026-05-17T10:01:49.625Z","avatar_url":"https://github.com/antonbabenko.png","language":null,"funding_links":["https://github.com/sponsors/antonbabenko","https://patreon.com/antonbabenko","https://paypal.me/antonbabenko","https://www.buymeacoffee.com/antonbabenko"],"categories":["Others","Sponsors ❤️","Skills","Community","6 つのトラック","🧠 Agent Skills","Cloud \u0026 DevOps","Skills \u0026 Plugins","claude-code"],"sub_categories":["Community Skills","Infrastructure \u0026 DevOps","Tier 5：チーム / ロール別 Playbooks"],"readme":"# Terraform \u0026 OpenTofu Skill for AI Agents\n\n[![Agent Skill](https://img.shields.io/badge/Agent-Skill-5865F2)](https://agentskills.io)\n[![Terraform](https://img.shields.io/badge/Terraform-1.0+-623CE4)](https://www.terraform.io/)\n[![OpenTofu](https://img.shields.io/badge/OpenTofu-1.6+-FFD814)](https://opentofu.org/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n\nA best-practices skill for Terraform and OpenTofu, for AI coding agents (Claude Code, Cursor, Copilot, Gemini CLI, OpenCode, Codex, and more). It helps the agent test code, structure modules, set up CI/CD, and write production infrastructure code.\n\n## What this skill provides\n\n**Testing frameworks**\n- Decision matrix for native tests vs Terratest\n- Testing workflows (static, integration, E2E)\n- Examples and patterns\n\n**Module development**\n- Structure and naming conventions\n- Versioning strategies\n- Public vs private module patterns\n\n**State management**\n- Remote backends (S3, Azure, GCS, Terraform Cloud)\n- Locking and security\n- Multi-team state isolation\n- Migration and recovery procedures\n\n**CI/CD integration**\n- GitHub Actions workflows\n- GitLab CI examples\n- Cost optimization\n- Compliance automation\n\n**Security and compliance**\n- Trivy and Checkov integration\n- Policy-as-code patterns\n- Compliance scanning workflows\n\n**Quick reference**\n- Decision flowcharts\n- Common patterns (DO vs DON'T)\n- Cheat sheets\n\n## Installation\n\nInstalled through one Claude Code marketplace, `antonbabenko/agent-plugins`\n(terraform-skill is listed there as an external plugin). Do not also add\n`antonbabenko/terraform-skill` as a marketplace - both use the same marketplace\nname and will clash.\n\n### Quick install (any agent)\n\nWorks with any [Agent Skills](https://agentskills.io)-compatible tool, via [skills.sh](https://skills.sh/):\n\n```bash\nnpx skills add https://github.com/antonbabenko/terraform-skill\n```\n\n### Per-host instructions\n\n\u003c!-- prettier-ignore-start --\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClaude Code\u003c/summary\u003e\n\n```bash\n/plugin marketplace add antonbabenko/agent-plugins\n/plugin install terraform-skill@antonbabenko\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGemini CLI\u003c/summary\u003e\n\n```bash\ngemini extensions install https://github.com/antonbabenko/terraform-skill\n```\n\nUpdate with `gemini extensions update terraform-skill`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCursor\u003c/summary\u003e\n\n```bash\ngit clone https://github.com/antonbabenko/terraform-skill.git ~/.cursor/skills/terraform-skill\n```\n\nCursor auto-discovers skills from `.agents/skills/` and `.cursor/skills/`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCopilot\u003c/summary\u003e\n\n```bash\n/plugin install https://github.com/antonbabenko/terraform-skill\n# or\ngit clone https://github.com/antonbabenko/terraform-skill.git ~/.copilot/skills/terraform-skill\n```\n\nCopilot auto-discovers skills from `.copilot/skills/`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eOpenCode\u003c/summary\u003e\n\n```bash\ngit clone https://github.com/antonbabenko/terraform-skill.git ~/.agents/skills/terraform-skill\n```\n\nOpenCode auto-discovers skills from `.agents/skills/`, `.opencode/skills/`, and `.claude/skills/`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCodex (OpenAI)\u003c/summary\u003e\n\n```bash\ngit clone https://github.com/antonbabenko/terraform-skill.git ~/.agents/skills/terraform-skill\n```\n\nCodex auto-discovers skills from `~/.agents/skills/` and `.agents/skills/`. Update with `cd ~/.agents/skills/terraform-skill \u0026\u0026 git pull`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eAntigravity\u003c/summary\u003e\n\n```bash\ngit clone https://github.com/antonbabenko/terraform-skill.git ~/.antigravity/skills/terraform-skill\n```\n\nUpdate with `cd ~/.antigravity/skills/terraform-skill \u0026\u0026 git pull`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eManual (symlink local clone)\u003c/summary\u003e\n\n```bash\ngit clone https://github.com/antonbabenko/terraform-skill\nmkdir -p ~/.claude/plugins\nln -s \"$(pwd)/terraform-skill\" ~/.claude/plugins/terraform-skill\n```\n\nClaude Code autodiscovers the skill at `skills/terraform-skill/SKILL.md` on next launch. Edits to the clone are picked up live.\n\n\u003c/details\u003e\n\n\u003c!-- prettier-ignore-end --\u003e\n\n### Verify installation\n\nAfter installation, try:\n```\n\"Create a Terraform module with testing for an S3 bucket\"\n```\n\nClaude picks up the skill automatically when working with Terraform or OpenTofu code.\n\n## Recommended companion: code-intelligence\n\nInstall the `code-intelligence` plugin alongside this one:\n\n```bash\n/plugin marketplace add antonbabenko/agent-plugins\n/plugin install code-intelligence@antonbabenko\n```\n\nIt holds the general, any-language rules for navigating code (when to use a\nlanguage server, plain text search, or fuzzy search; how to anchor a lookup to\na position; what to do when a tool fails; saying so when one tool is swapped\nfor another). terraform-skill is the Terraform-specific version of those rules.\nWhy install it:\n\n- **Fewer tokens** - the rules live in one place. The agent loads them when\n  needed instead of repeating them in every language skill.\n- **More accurate** - it finds definitions and references by meaning, not by\n  plain text matching, so renames and refactors do not miss spots or change\n  the wrong ones.\n- **Faster** - it picks the right tool the first time instead of retrying,\n  and says up front when it had to use a different one.\n\nterraform-skill works on its own without it. The name `code-intelligence` is\nnot unique; if a `code-intelligence` skill is active, check it is the one from\n[antonbabenko/agent-plugins](https://github.com/antonbabenko/agent-plugins).\n\n## Quick start examples\n\n**Create a module with tests:**\n\u003e \"Create a Terraform module for AWS VPC with native tests\"\n\n**Set up remote state:**\n\u003e \"Configure S3 backend with DynamoDB locking for Terraform state\"\n\n**Review existing code:**\n\u003e \"Review this Terraform configuration following best practices\"\n\n**Generate CI/CD workflow:**\n\u003e \"Create a GitHub Actions workflow for Terraform with cost estimation\"\n\n**Testing strategy:**\n\u003e \"Help me choose between native tests and Terratest for my modules\"\n\n**State management:**\n\u003e \"How should I organize state files for a multi-team environment?\"\n\n## What it covers\n\n### Testing strategy\n\nDecision matrices for native tests (Terraform 1.6+) vs Terratest (Go-based), plus multi-environment testing patterns.\n\n### Module development\n\nNaming conventions (`terraform-\u003cPROVIDER\u003e-\u003cNAME\u003e`), directory structure, input/output design, version constraints, and documentation standards.\n\n### CI/CD workflows\n\nGitHub Actions, GitLab CI, Atlantis, Infracost cost estimation, Trivy/Checkov scanning, and compliance checks.\n\n### Security and compliance\n\nStatic analysis, policy-as-code, secrets management, state file security, backend encryption, and compliance scanning workflows.\n\n### Patterns and anti-patterns\n\nSide-by-side DO vs DON'T examples for variable naming, resource naming, module composition, state management, and provider configuration.\n\n## Why this skill\n\n**Sources:**\n- Patterns from [terraform-best-practices.com](https://www.terraform-best-practices.com/)\n- Approaches used across the [terraform-aws-modules](https://github.com/terraform-aws-modules) collection\n- AWS Hero experience with enterprise IaC\n\n**Version-specific guidance:**\n- Terraform 1.0+ features\n- OpenTofu 1.6+ compatibility\n- Native test framework (1.6+)\n- Current tooling ecosystem (2024-2026)\n\n**Decision frameworks:** not just \"what to do\" but \"when and why\".\n\n## Requirements\n\n- An AI agent with skill support: Claude Code, Cursor, Copilot, Gemini CLI, OpenCode, Codex, or any [Agent Skills](https://agentskills.io)-compatible host\n- Terraform 1.0+ or OpenTofu 1.6+\n- Optional: [Terraform MCP server](https://github.com/hashicorp/terraform-mcp-server) for registry integration\n\n## Code intelligence (optional)\n\nThe skill works without a language server. To jump to a definition, find\nreferences, outline a file, or show hover docs, it can also use\n[terraform-ls](https://github.com/hashicorp/terraform-ls), HashiCorp's official\nTerraform language server.\n\n- **Optional.** Without terraform-ls the skill falls back to text search\n  (`rg`) plus reading files. Nothing breaks; you get text matches instead of\n  matches by meaning.\n- **Needs.** A local `terraform` (or `tofu`) binary on `PATH`, and\n  `terraform init` run in the workspace, before it can resolve names across\n  modules and providers.\n- **Install.** Get it from the\n  [terraform-ls releases](https://github.com/hashicorp/terraform-ls/releases)\n  page, or turn it on through your editor or agent host. Use whatever version\n  your host supports.\n\nHow the skill uses it:\n\n- Use the language server to follow a name to where it is defined or used; use\n  `rg` plus reading files for exact text, known names, `.tfvars`, comments, and\n  non-HCL files.\n- Point the language server at a spot in the file first (find an occurrence,\n  then ask about that position).\n- terraform-ls cannot rename for you. To rename a variable, local, or output:\n  find every reference, then edit each by hand. To rename a resource or module\n  address: use a `moved` block, not a text replace.\n\n## Contributing\n\nSee [CLAUDE.md](CLAUDE.md) for skill development guidelines, content structure, how to propose improvements, and the validation approach.\n\nReport bugs or request features via [GitHub Issues](https://github.com/antonbabenko/terraform-skill/issues).\n\n## Related resources\n\n### Official documentation\n- [Terraform Language](https://developer.hashicorp.com/terraform/docs)\n- [Terraform Testing](https://developer.hashicorp.com/terraform/language/tests) - native test framework\n- [OpenTofu Documentation](https://opentofu.org/docs/)\n- [HashiCorp Recommended Practices](https://developer.hashicorp.com/terraform/cloud-docs/recommended-practices)\n\n### Community resources\n- [Terraform compliance-as-code docs](https://compliance.tf/docs/) - Compliance frameworks, controls, implementation guides, remediations, etc\n- [Awesome Terraform](https://github.com/shuaibiyy/awesome-tf)\n- [Awesome Terraform Compliance](https://github.com/antonbabenko/awesome-terraform-compliance)\n- [Terraform Best Practices](https://terraform-best-practices.com) - the guide this skill is based on\n- [terraform-aws-modules](https://github.com/terraform-aws-modules) - AWS modules collection\n- [Terratest](https://terratest.gruntwork.io/docs/) - Go testing framework for Terraform\n- [Google Cloud Best Practices](https://docs.cloud.google.com/docs/terraform/best-practices/general-style-structure)\n- [AWS Terraform Best Practices](https://docs.aws.amazon.com/prescriptive-guidance/latest/terraform-aws-provider-best-practices/introduction.html)\n\n### Development tools\n- [pre-commit-terraform](https://github.com/antonbabenko/pre-commit-terraform) - pre-commit hooks for Terraform\n- [terraform-docs](https://terraform-docs.io/) - generate documentation from modules\n- [terraform-switcher](https://github.com/warrensbox/terraform-switcher) - Terraform version manager\n- [TFLint](https://github.com/terraform-linters/tflint) - Terraform linter\n- [Trivy](https://github.com/aquasecurity/trivy) - IaC security scanner\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonbabenko%2Fterraform-skill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonbabenko%2Fterraform-skill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonbabenko%2Fterraform-skill/lists"}