[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-75136":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":10,"languages":10,"totalLinesOfCode":10,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":15,"starSnapshotCount":15,"syncStatus":38,"lastSyncTime":39,"discoverSource":40},75136,"terraform-skill","antonbabenko\u002Fterraform-skill","antonbabenko","Terraform & OpenTofu Skill for AI Agents - testing, modules, CI\u002FCD, and production patterns","",null,1999,172,22,1,0,9,43,174,27,19.71,"Other",false,"master",[25,26,27,28,29,30,31,32,33,34],"agent-skills","best-practices","claude-code","claude-skills","devops","infrastructure-as-code","modules","opentofu","terraform","testing","2026-06-12 02:03:33","# Terraform & OpenTofu Skill for AI Agents\n\n[![Agent Skill](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAgent-Skill-5865F2)](https:\u002F\u002Fagentskills.io)\n[![Terraform](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTerraform-1.0+-623CE4)](https:\u002F\u002Fwww.terraform.io\u002F)\n[![OpenTofu](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FOpenTofu-1.6+-FFD814)](https:\u002F\u002Fopentofu.org\u002F)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-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\u002FCD, 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\u002FCD 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\u002Fagent-plugins`\n(terraform-skill is listed there as an external plugin). Do not also add\n`antonbabenko\u002Fterraform-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:\u002F\u002Fagentskills.io)-compatible tool, via [skills.sh](https:\u002F\u002Fskills.sh\u002F):\n\n```bash\nnpx skills add https:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fterraform-skill\n```\n\n### Per-host instructions\n\n\u003C!-- prettier-ignore-start -->\n\n\u003Cdetails>\n\u003Csummary>Claude Code\u003C\u002Fsummary>\n\n```bash\n\u002Fplugin marketplace add antonbabenko\u002Fagent-plugins\n\u002Fplugin install terraform-skill@antonbabenko\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Gemini CLI\u003C\u002Fsummary>\n\n```bash\ngemini extensions install https:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fterraform-skill\n```\n\nUpdate with `gemini extensions update terraform-skill`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Cursor\u003C\u002Fsummary>\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fterraform-skill.git ~\u002F.cursor\u002Fskills\u002Fterraform-skill\n```\n\nCursor auto-discovers skills from `.agents\u002Fskills\u002F` and `.cursor\u002Fskills\u002F`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Copilot\u003C\u002Fsummary>\n\n```bash\n\u002Fplugin install https:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fterraform-skill\n# or\ngit clone https:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fterraform-skill.git ~\u002F.copilot\u002Fskills\u002Fterraform-skill\n```\n\nCopilot auto-discovers skills from `.copilot\u002Fskills\u002F`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>OpenCode\u003C\u002Fsummary>\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fterraform-skill.git ~\u002F.agents\u002Fskills\u002Fterraform-skill\n```\n\nOpenCode auto-discovers skills from `.agents\u002Fskills\u002F`, `.opencode\u002Fskills\u002F`, and `.claude\u002Fskills\u002F`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Codex (OpenAI)\u003C\u002Fsummary>\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fterraform-skill.git ~\u002F.agents\u002Fskills\u002Fterraform-skill\n```\n\nCodex auto-discovers skills from `~\u002F.agents\u002Fskills\u002F` and `.agents\u002Fskills\u002F`. Update with `cd ~\u002F.agents\u002Fskills\u002Fterraform-skill && git pull`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Antigravity\u003C\u002Fsummary>\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fterraform-skill.git ~\u002F.antigravity\u002Fskills\u002Fterraform-skill\n```\n\nUpdate with `cd ~\u002F.antigravity\u002Fskills\u002Fterraform-skill && git pull`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Manual (symlink local clone)\u003C\u002Fsummary>\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fterraform-skill\nmkdir -p ~\u002F.claude\u002Fplugins\nln -s \"$(pwd)\u002Fterraform-skill\" ~\u002F.claude\u002Fplugins\u002Fterraform-skill\n```\n\nClaude Code autodiscovers the skill at `skills\u002Fterraform-skill\u002FSKILL.md` on next launch. Edits to the clone are picked up live.\n\n\u003C\u002Fdetails>\n\n\u003C!-- prettier-ignore-end -->\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\u002Fplugin marketplace add antonbabenko\u002Fagent-plugins\n\u002Fplugin 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\u002Fagent-plugins](https:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fagent-plugins).\n\n## Quick start examples\n\n**Create a module with tests:**\n> \"Create a Terraform module for AWS VPC with native tests\"\n\n**Set up remote state:**\n> \"Configure S3 backend with DynamoDB locking for Terraform state\"\n\n**Review existing code:**\n> \"Review this Terraform configuration following best practices\"\n\n**Generate CI\u002FCD workflow:**\n> \"Create a GitHub Actions workflow for Terraform with cost estimation\"\n\n**Testing strategy:**\n> \"Help me choose between native tests and Terratest for my modules\"\n\n**State management:**\n> \"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>-\u003CNAME>`), directory structure, input\u002Foutput design, version constraints, and documentation standards.\n\n### CI\u002FCD workflows\n\nGitHub Actions, GitLab CI, Atlantis, Infracost cost estimation, Trivy\u002FCheckov 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:\u002F\u002Fwww.terraform-best-practices.com\u002F)\n- Approaches used across the [terraform-aws-modules](https:\u002F\u002Fgithub.com\u002Fterraform-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:\u002F\u002Fagentskills.io)-compatible host\n- Terraform 1.0+ or OpenTofu 1.6+\n- Optional: [Terraform MCP server](https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform-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:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform-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:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform-ls\u002Freleases)\n  page, or turn it on through your editor or agent host. Use whatever version\n  your host supports.\n  - Claude Code: install it as an LSP plugin -\n    `\u002Fplugin marketplace add boostvolt\u002Fclaude-code-lsps` then\n    `\u002Fplugin install terraform-ls@claude-code-lsps`.\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:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fterraform-skill\u002Fissues).\n\n## Related resources\n\n### Official documentation\n- [Terraform Language](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fdocs)\n- [Terraform Testing](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Flanguage\u002Ftests) - native test framework\n- [OpenTofu Documentation](https:\u002F\u002Fopentofu.org\u002Fdocs\u002F)\n- [HashiCorp Recommended Practices](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fcloud-docs\u002Frecommended-practices)\n\n### Community resources\n- [Terraform compliance-as-code docs](https:\u002F\u002Fcompliance.tf\u002Fdocs\u002F) - Compliance frameworks, controls, implementation guides, remediations, etc\n- [Awesome Terraform](https:\u002F\u002Fgithub.com\u002Fshuaibiyy\u002Fawesome-tf)\n- [Awesome Terraform Compliance](https:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fawesome-terraform-compliance)\n- [Terraform Best Practices](https:\u002F\u002Fterraform-best-practices.com) - the guide this skill is based on\n- [terraform-aws-modules](https:\u002F\u002Fgithub.com\u002Fterraform-aws-modules) - AWS modules collection\n- [Terratest](https:\u002F\u002Fterratest.gruntwork.io\u002Fdocs\u002F) - Go testing framework for Terraform\n- [Google Cloud Best Practices](https:\u002F\u002Fdocs.cloud.google.com\u002Fdocs\u002Fterraform\u002Fbest-practices\u002Fgeneral-style-structure)\n- [AWS Terraform Best Practices](https:\u002F\u002Fdocs.aws.amazon.com\u002Fprescriptive-guidance\u002Flatest\u002Fterraform-aws-provider-best-practices\u002Fintroduction.html)\n\n### Development tools\n- [pre-commit-terraform](https:\u002F\u002Fgithub.com\u002Fantonbabenko\u002Fpre-commit-terraform) - pre-commit hooks for Terraform\n- [terraform-docs](https:\u002F\u002Fterraform-docs.io\u002F) - generate documentation from modules\n- [terraform-switcher](https:\u002F\u002Fgithub.com\u002Fwarrensbox\u002Fterraform-switcher) - Terraform version manager\n- [TFLint](https:\u002F\u002Fgithub.com\u002Fterraform-linters\u002Ftflint) - Terraform linter\n- [Trivy](https:\u002F\u002Fgithub.com\u002Faquasecurity\u002Ftrivy) - IaC security scanner\n\n## License\n\nApache 2.0\n","这个项目为AI编码助手提供了Terraform和OpenTofu的最佳实践技能，包括测试、模块开发、CI\u002FCD集成及生产基础设施代码编写。其核心功能涵盖从测试框架选择到安全合规性检查的全流程支持，具体包括但不限于基于决策矩阵的测试策略、模块化开发规范、远程状态管理方案以及与主流CI\u002FCD平台如GitHub Actions和GitLab CI的无缝集成。此外，还提供了丰富的参考资料，如决策流程图、常见模式对比等。该项目非常适合需要提升自动化基础设施管理和持续交付效率的企业或个人开发者使用。",2,"2026-06-11 03:52:28","high_star"]