Skip to main content
skill CX Codex

terraform-module-creator — Claude Code skill: how to install

Builds clean Terraform modules with separate resource files, strict variable validation, and outputs. Ideal for turning messy root configurations into shared infrastructure blocks.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add c0x12c/ai-toolkit --skill terraform-module-creator -a claude-code
Open on GitHub

What terraform-module-creator does

The skill asks for the intended module name, cloud resources to include, and target callers before writing files. It sets up a dedicated directory with main.tf, variables.tf, outputs.tf, versions.tf, and documentation. Each resource type gets its own .tf file instead of living in one crowded template. The primary resource is named this.

Variables avoid hardcoded defaults for critical parameters. The skill enforces regex patterns on naming strings and packs related options into object types with optional() attributes. Sensitive outputs like database credentials get marked with sensitive = true. Security groups rely on name_prefix to allow clean updates before destruction.

Provider blocks are deliberately omitted from the generated code. The root project must configure providers itself, because hardcoding them inside reusable modules breaks downstream pipelines.

What it helps with

  • convert scattered inline cloud resources into clean Terraform modules
  • split resources into separate files using consistent this naming
  • add regex validation to variables and hide secrets in module outputs
  • generate version constraints and caller examples for the module

Example prompts for the agent

  • Extract the database resources from main.tf into an rds Terraform module
  • Scaffold a new ECS module with an isolated security group configuration
  • Create an S3 module with input validation and pinned provider versions

How to install terraform-module-creator

1Skills CLI (Vercel)

npx skills add c0x12c/ai-toolkit --skill terraform-module-creator -a claude-code

2Manually: put the files in place

~/.claude/skills/terraform-module-creator/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/terraform-module-creator/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about terraform-module-creator

How do I install terraform-module-creator in Claude Code?

Run npx skills add c0x12c/ai-toolkit --skill terraform-module-creator -a claude-code. This adds the skill definition to your Claude Code workspace.

Why does the skill put each resource type in a separate file?

Isolating resources into dedicated files keeps the module readable as infrastructure grows. The main resource lives in its own file under the identifier this, while auxiliary parts like security groups stay in separate files.

Why are provider blocks left out of the generated module?

Reusable Terraform modules must inherit providers from the root configuration. Declaring provider blocks directly in a child module causes errors when deploying across multiple regions or accounts.

Similar skills

All skills for DevOps and infrastructure →

From the same set33

testing-strategies Gives your coding agent ready test patterns for a Micronaut and Kotlin backend: integration tests, repository tests, test data builders. CX Codex +1 ★ 109repo stars terraform-service-scaffold Generates service-level Terraform infrastructure with AWS modules, environment configurations, and ArgoCD GitOps templates. CX Codex +1 ★ 109repo stars terraform-security-audit Reviews Terraform files for security issues across six areas and returns a pass-or-fail report. Run it before a deployment or when reviewing a new service. CX Codex +1 ★ 109repo stars terraform-review Walks Terraform changes through an 8-category checklist and returns a verdict: Approved, Needs Changes or Blocked. Useful before merging an infrastructure PR. CX Codex +1 ★ 109repo stars terraform-best-practices This skill guides Terraform code reviews and authoring, covering file layout, modules, state, and security. Use it when shaping infrastructure configuration. CX Codex +1 ★ 109repo stars startup-pipeline Moves a startup idea through four stages: brainstorm, validation, market research and pitch materials. Gates between stages stop weak ideas early. CX Codex +1 ★ 109repo stars service-debugging A structured backend troubleshooting runbook that guides the agent from symptom gathering and log analysis to root-cause isolation. CX Codex +1 ★ 109repo stars security-checklist Audits Micronaut/Kotlin backends for access control, input checks, injection risks, and data exposure. Use it during implementation or review. CX Codex +1 ★ 109repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor