Skip to main content
skill CX Codex

terraform-infrastructure — Claude Code skill: how to install

Guides the agent in configuring cloud infrastructure with Terraform modules and remote state. Useful when managing dev, staging, and prod environments.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill terraform-infrastructure -a claude-code
Open on GitHub

What terraform-infrastructure does

This skill guides AI coding assistants to write declarative Terraform configurations for AWS, Azure, GCP, and on-premise setups. It enforces modular project organization rather than placing all resources into the root module. Instructions cover backend definitions, such as S3 remote state paired with DynamoDB state locking.

The bundled references detail AWS infrastructure modules, input variables, outputs, and deployment scripts. The instructions strictly rule out keeping plaintext secrets in code or checking .tfstate files into Git. You need Terraform version 1.0 or higher. Running deployments without environment workspaces risks colliding state across teams.

What it helps with

  • configure S3 remote state backend with DynamoDB locking
  • organize Terraform infrastructure into reusable modules
  • manage isolated configurations for dev, staging, and prod
  • prepare deployment scripts with mandatory terraform plan review

Example prompts for the agent

  • Set up an AWS Terraform module with an S3 backend and DynamoDB lock table.
  • Generate variable definitions and outputs for separate dev and prod workspaces.
  • Write a main.tf configuration requiring Terraform 1.0 and AWS provider 5.0.

How to install terraform-infrastructure

1Skills CLI (Vercel)

npx skills add aj-geddes/useful-ai-prompts --skill terraform-infrastructure -a claude-code

2Manually: put the files in place

~/.claude/skills/terraform-infrastructure/SKILL.md

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

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

Questions about terraform-infrastructure

How to install terraform-infrastructure in Claude Code?

Run npx skills add aj-geddes/useful-ai-prompts --skill terraform-infrastructure -a claude-code. The skill file will be placed in ~/.claude/skills/terraform-infrastructure/SKILL.md.

What does terraform-infrastructure do?

It teaches your AI assistant best practices for Infrastructure as Code using Terraform. It provides patterns for multi-cloud deployments, remote state locking, and modular component structures.

What Terraform version is required?

The configuration requires Terraform version 1.0 or newer and HashiCorp AWS provider version ~> 5.0.

Source text

SKILL.md · MIT
---
name: terraform-infrastructure
description: >
  Infrastructure as Code using Terraform with modular components, state
  management, and multi-cloud deployments. Use for provisioning and managing
  cloud resources.
---

# Terraform Infrastructure

## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)

## Overview

Build scalable infrastructure as code with Terraform, managing AWS, Azure, GCP, and on-premise resources through declarative configuration, remote state, and automated provisioning.

## When to Use

- Cloud infrastructure provisioning
- Multi-environment management (dev, staging, prod)
- Infrastructure versioning and code review
- Cost tracking and resource optimization
- Disaster recovery and environment replication
- Automated infrastructure testing
- Cross-region deployments

## Quick Start

Minimal working example:

```hcl
# terraform/main.tf
terraform {
  required_version = ">= 1.0"

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

  # Remote state configuration
  backend "s3" {
    bucket         = "terraform-state-prod"
    key            = "prod/terraform.tfstate"
    region         = "us-east-1"
    encrypt        = true
    dynamodb_table = "terraform-locks"
  }
}

provider "aws" {
  region = var.aws_region

  default_tags {
// ... (see reference guides for full implementation)
```

## Reference Guides

Detailed implementations in the `references/` directory:

| Guide | Contents |
|---|---|
| [AWS Infrastructure Module](references/aws-infrastructure-module.md) | AWS Infrastructure Module |
| [Variables and Outputs](references/variables-and-outputs.md) | Variables and Outputs |
| [Terraform Deployment Script](references/terraform-deployment-script.md) | Terraform Deployment Script |

## Best Practices

### ✅ DO

- Use remote state (S3, Terraform Cloud)
- Implement state locking (DynamoDB)
- Organize code into modules
- Use workspaces for environments
- Apply tags consistently
- Use variables for flexibility
- Implement code review before apply
- Keep sensitive data in separate variable files

### ❌ DON'T

- Store state files locally in git
- Use hardcoded values
- Mix environments in single state
- Skip terraform plan review
- Use root module for everything
- Store secrets in code
- Disable state locking

© aj-geddes · MIT · aj-geddes/useful-ai-prompts

Similar skills

Everything for DevOps and infrastructure →

From the same set118

ios-swift-development A skill for building native iOS apps in Swift: MVVM, SwiftUI, URLSession networking, Combine and Core Data persistence. CX Codex +1 1,500installs flask-api-development Builds modular Flask REST APIs using blueprints, SQLAlchemy ORM, and JWT authentication. It helps organize microservices and validate incoming request payloads. CX Codex +1 1,400installs wireframe-prototyping Sketch a UI and build a prototype before development starts. Useful when you need early feedback from a team or a client. CX Codex +1 1,400installs markdown-documentation A skill that gives the agent a fixed set of Markdown rules for READMEs, wikis and docs pages. Useful when the model writes the text and it has to look consistent. CX Codex +1 1,300installs penetration-testing Security testing skill that guides ethical hacking, simulated attacks, and vulnerability documentation across applications and infrastructure. CX Codex +1 1,100installs responsive-web-design A skill that steers your coding agent toward mobile-first CSS with Flexbox, Grid and media queries. Useful when one layout has to hold up on phones and desktops. CX Codex +1 1,100installs css-architecture A skill that gives your coding agent conventions for structuring CSS with BEM, SMACSS and CSS-in-JS. Handy when stylesheets outgrow the naming scheme you started with. CX Codex +1 959installs api-contract-testing Verifies API contracts between consumers and providers without full integration tests. Helps stop breaking schema changes before deploying microservices. CX Codex +1 913installs

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