Sponsor Suno AI Music arrow_forward
Slash Command

Terraform Module Create

Generate reusable Terraform modules with best practices

Type
Slash Command
GitHub stars
2.8k
License
MIT
Repo last updated
Sep 27, 2026

What Terraform Module Create is

Terraform Module Create is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”

A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.

Terraform Module Create gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.

How to install Terraform Module Create

Claude Code

  1. Download terraform-module-create.md from the repository.
  2. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
  3. Run it by typing / followed by its name.

Claude Cowork

  1. Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
  2. In Customize → Skills, click +, then upload the ZIP.
  3. Run it from any task with / and the skill name.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/packages/devops-automation-pack/plugins/05-terraform/commands/terraform-module-create.md, shared under the repository's MIT license. Read the full file on GitHub.

Generates production-ready, reusable Terraform modules with proper structure, documentation, variable validation, and usage examples.

When to Use This

  • Creating reusable infrastructure components
  • Need standardized module structure
  • Want validated inputs and comprehensive outputs
  • Building infrastructure library for team
  • One-off infrastructure (use root module)
  • Simple single-resource creation

How It Works

You are a Terraform module expert. When user runs /terraform-module-create or /tm:

  1. Identify module purpose:
  • What resource/pattern? (VPC, compute, database, etc.)
  • Cloud provider? (AWS, GCP, Azure)
  • Required vs optional features?
  1. Generate module structure:
   modules/module-name/
   ├── main.tf          # Resource definitions
   ├── variables.tf     # Input variables with validation
   ├── outputs.tf       # Output values
   ├── versions.tf      # Terraform and provider versions
   ├── README.md        # Documentation
   └── examples/        # Usage examples
       └── complete/
           ├── main.tf
           └── README.md
  1. Apply best practices:
  • Input validation rules
  • Sensible defaults for optional vars
  • Comprehensive outputs
  • Consistent naming conventions
  • Tags/labels support
  1. Provide documentation:
  • Usage examples
  • Input/output reference
  • Dependencies and requirements

Output Format

# Complete module directory structure
# Ready to use and publish
## Usage Example

module "example" { source = "./modules/module-name"

[example configuration] }

Examples

Example 1: AWS VPC Module

User: /tm

Questions:

  • Module type? → AWS VPC
  • Features? → Public/private subnets, NAT gateway, Internet gateway
  • Availability zones? → Configurable (default 3)

Output:

# modules/aws-vpc/versions.tf
terraform {
  required_version = ">= 1.5.0"

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = ">= 5.0"
    }
  }
}

# modules/aws-vpc/variables.tf
variable "vpc_name" {
  description = "Name of the VPC"
  type        = string

  validation {
…
# modules/aws-vpc/README.md

# AWS VPC Terraform Module

Production-ready VPC module with public/private subnets, NAT gateways, and Internet gateway.

## Features

-  VPC with configurable CIDR
-  Public and private subnets across multiple AZs
-  Internet Gateway for public subnets
-  NAT Gateway(s) for private subnet internet access
-  Route tables with proper associations
-  Configurable: single NAT (cost savings) or per-AZ (HA)

## Usage

module "vpc" { source = "./modules/aws-vpc"

vpc_name = "myapp-vpc" vpc_cidr = "10.0.0.0/16" availability_zones = ["us-east-1a", "us-east-1b", "us-east-1c"]

public_subnet_cidrs = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"] private_subnet_cidrs = ["10.0.11.0/24", "10.0.12.0/24", "10.0.13.0/24"]

enable_nat_gateway = true single_nat_gateway = false # One NAT per AZ for high availability

tags = { Environment = "production" ManagedBy = "Terraform" } }


## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|----------|
| vpc_name | Name of the VPC | string | - | yes |
| vpc_cidr | CIDR block for VPC | string | "10.0.0.0/16" | no |
| availability_zones | List of AZs | list(string) | - | yes |
| public_subnet_cidrs | Public subnet CIDRs | list(string) | - | yes |
| private_subnet_cidrs | Private subnet CIDRs | list(string) | - | yes |
| enable_nat_gateway | Enable NAT Gateway | bool | true | no |
| single_nat_gateway | Use single NAT (cost savings) | bool | false | no |
| tags | Additional tags | map(string) | {} | no |

## Outputs

| Name | Description |
|------|-------------|
…

Example 2: GCP Compute Instance Module

User: /tm

Module: GCP Compute Engine instance with optional features

Output:

# modules/gcp-compute/variables.tf
variable "project_id" {
  description = "GCP project ID"
  type        = string
}

variable "region" {
  description = "GCP region"
  type        = string
  default     = "us-central1"
}

variable "zone" {
  description = "GCP zone"
  type        = string
  default     = "us-central1-a"
}
…

Pro Tips

Always validate inputs (prevent invalid configurations) Provide sensible defaults for optional variables Use tags/labels parameters for user customization Document outputs clearly (what they represent) Include usage examples in README

Module Publishing

To publish module to Terraform Registry:

# 1. Tag version
git tag v1.0.0
git push --tags

# 2. Module URL format
source = "github.com/username/terraform-aws-vpc?ref=v1.0.0"

# 3. Or publish to Terraform Registry
# https://registry.terraform.io/publish/module

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Terraform Module Create?

Terraform Module Create is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Generate reusable Terraform modules with best practices

How do I install Terraform Module Create in Claude Code?

Download terraform-module-create.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.

Can I use Terraform Module Create in Claude Cowork?

Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.

Is Terraform Module Create safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.