terraform-module-library Skill for Claude Code: Reusable Terraform Modules
terraform-module-library makes Claude write reusable Terraform modules for AWS, Azure, GCP and OCI in one standard layout.
- Installs
- 15.9K
- on skills.sh
- Stars
- 42.1K
- on GitHub
- Files
- 2
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
terraform-module-library is a pattern guide from wshobson's agents collection. Claude uses it to create modules with a fixed file layout (main.tf, variables.tf, outputs.tf, versions.tf, README.md, examples/ and tests/), input validation, and a Terratest test.
It triggers when you ask for infrastructure modules, standard cloud provisioning or reusable IaC components. The SKILL.md has a worked AWS VPC module, a module-composition example that wires a VPC into an RDS database, and ten best practices. Two reference files add AWS and OCI module patterns.
The testing example runs terraform apply and destroy through Terratest, so it creates real cloud resources when run against your account. Use a sandbox account for tests.
Good for
- Platform and DevOps engineers building shared Terraform modules
- Teams standardizing how cloud resources get provisioned
- Developers moving one-off Terraform into versioned, tested modules
Install terraform-module-library
Claude Code
- 1
Copy this prompt.
Install the terraform-module-library skill in Claude Code. Run this command: /plugin marketplace add wshobson/agents /plugin install cloud-infrastructure@claude-code-workflows Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Pick one route. The plugin routes install the whole cloud-infrastructure plugin: 7 agents and 8 skills (counted from the plugin folder in the repo tree, which has no hooks or MCP config files). The skills-only routes install just this skill, with no agents or commands.
From the project README. Source.
What's in the skill
When it loads
Build reusable Terraform modules for AWS, Azure, GCP, and OCI infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.
Sections in SKILL.md
- Purpose
- When to Use
- Module Structure
- Standard Module Pattern
- AWS VPC Module Example
- Best Practices
- Module Composition
- Testing
- Related Skills
Key facts
- License (per GitHub)
- MIT
- Author
- wshobson (repo owner)
- Installs on skills.sh
- 15,905 as of 2026-11-02
- Repo stars
- 42,081 as of 2026-11-02 (whole repo)
- Last repo commit
- 2026-10-30
- Files in the skill folder
- 3 files including SKILL.md
- skills.sh audits
- Gen Agent Trust Hub: pass; Socket: pass; Snyk: pass
What it includes
A folder tree of modules by cloud
Lays out terraform-modules/ with aws, azure, gcp and oci folders and modules such as vpc, eks, rds, s3, vnet, aks, gke, cloud-sql, vcn and oke.
Write ·
Module structureThe files every module has
main.tf, variables.tf, outputs.tf, versions.tf, README.md, an examples/complete folder and a Terratest file in tests/.
Write ·
Standard module patternFull main.tf, variables.tf and outputs.tf for a VPC
A VPC with private subnets and an optional internet gateway, a CIDR validation block and outputs for VPC ID, subnet IDs and CIDR.
AWS VPC module exampleTen rules for modules
Semantic versioning, documented variables, examples, validation blocks, outputs, pinned provider versions, locals, count or for_each, Terratest and consistent tags.
Best practicesWire a VPC module into an RDS module
Shows module blocks that pass module.vpc outputs to a PostgreSQL RDS module.
Module compositionA Go test that applies and destroys the example
Runs terraform.InitAndApply on examples/complete, checks the vpc_id output and destroys the resources afterwards.
Runs code ·
Testing with TerratestAWS patterns
VPC, EKS, RDS, S3, ALB, Lambda and security group modules, plus best practices.
references/aws-modules.mdOCI patterns
VCN, OKE, Autonomous Database, Object Storage and load balancer modules, plus best practices.
references/oci-modules.md
From the official docs
Permissions
Medium risk
The skill writes Terraform files and its test example applies and destroys real cloud resources. Run tests in a sandbox cloud account and read every plan before you apply.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
The test example creates and destroys real cloud resources
The Testing section calls terraform.InitAndApply and a deferred Destroy. Run tests in a sandbox cloud account with limited permissions.
Claude writes many files under your project
The standard pattern adds main.tf, variables.tf, outputs.tf, examples and tests per module. Review the diff and run terraform plan before any apply.
Technical details
| Talks to | Cloud provider APIs, when tests run terraform apply |
|---|---|
| Scopes |
|
Questions
What does the terraform-module-library skill do?
It makes Claude write Terraform modules in one reusable pattern. Each module gets the same files, validated inputs, examples and a test, for AWS, Azure, GCP or OCI.
How do I install it?
Use the install box above and pick one route. The skills CLI route installs only this skill. The plugin route installs the whole cloud-infrastructure plugin, which adds 7 agents and 8 skills (counted from the repo tree).
Does it work with Azure and GCP too?
The description and module tree name AWS, Azure, GCP and OCI. The worked example is AWS, and the bundled reference files cover AWS and OCI.
Does it need an API key or cloud account?
The SKILL.md names no API key. To run the Terratest example you need Terraform, Go and cloud credentials for your own account.
Is it safe?
The skill is guidance and bundles no scripts. Its Terratest example runs apply and destroy, which creates and removes real cloud resources, so use a sandbox account. Read every terraform plan before you apply, whoever wrote the module.
Which other skills go with it?
The SKILL.md lists multi-cloud-architecture for architecture decisions and cost-optimization for cheaper designs. They are optional companions in the same repo.
Information
updated Nov 2, 2026
- Repository
- wshobson/agents
- Folder
plugins/cloud-infrastructure/skills/terraform-module-library
Sources
Docs, issue trackers and discussions this page is built from.
Show all 5Hide
- terraform-module-library SKILL.md · github.com
- wshobson/agents README · github.com
- plugin.json · github.com
- references/aws-modules.md · github.com
- references/oci-modules.md · github.com