Skip to main content
skill CX Codex

terraform · bobmatnyc — Claude Code skill: what it does, how to install

This skill structures Terraform work around state, plans, modules, and CI checks. Use it when infrastructure changes need reviewable steps.

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

What terraform does

The skill guides an agent through a controlled Terraform workflow. It covers pinned versions, terraform init, terraform fmt, terraform validate, saved plans, and applying a reviewed plan. Remote state with locking and separate state for each environment are part of the workflow.

Its guidance also covers module interfaces, module versioning, composition, drift checks, and safer migrations. CI should create the plan, while a trusted runner applies it after approval; production can use prevent_destroy and policy checks. The terraform tool must be installed before these steps can run.

What it helps with

  • separate Terraform state by environment
  • create plans for CI review
  • inspect changes before applying them
  • guard production resources from deletion
  • compose modules with versioned interfaces

Example prompts for the agent

  • Set up a Terraform workflow for this project: pin the versions, run terraform init, terraform fmt, and terraform validate, then create a plan for review.
  • Check this configuration for drift and outline a safe state migration between environments.
  • Design a CI flow that reviews a Terraform plan and requires approval before applying it with state locking.

How to install terraform

1Skills CLI (Vercel)

npx skills add bobmatnyc/claude-mpm-skills --skill terraform -a claude-code

2Manually: put the files in place

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

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

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

Questions about terraform

How do I install terraform in Claude Code?

Run npx skills add bobmatnyc/claude-mpm-skills --skill terraform -a claude-code, then use ~/.claude/skills/terraform/SKILL.md.

What does the terraform skill do?

It gives the agent patterns for remote state, environment separation, module design, safe plan and apply workflows, drift control, and CI guardrails.

Which platforms support terraform?

The skill is available for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode.

Source text

SKILL.md · MIT
---
name: terraform
description: "Terraform infrastructure-as-code workflow patterns: state and environments, module design, safe plan/apply, drift control, and CI guardrails"
user-invocable: false
disable-model-invocation: true
version: 1.0.0
category: universal
author: Claude MPM Team
license: MIT
progressive_disclosure:
  entry_point:
    summary: "Manage infrastructure safely with Terraform: remote state, reproducible plans, reviewable changes, and guardrails"
    when_to_use: "When provisioning cloud or platform resources, standardizing environments, or building safe IaC workflows"
    quick_start: "1. Pin versions 2. terraform init/fmt/validate 3. Plan in CI 4. Review + approve 5. Apply with locking"
  token_estimate:
    entry: 140
    full: 8000
context_limit: 900
tags:
  - terraform
  - iac
  - infrastructure
  - provisioning
  - ci
  - state
requires_tools:
  - terraform
---

# Terraform

## Quick Start (workflow)

```bash
terraform init
terraform plan -out=tfplan
terraform apply tfplan
```

## Safety Checklist

- State: remote backend + locking; separate state per environment
- Reviews: plan in CI; apply from a trusted runner with approvals
- Guardrails: `prevent_destroy` and policy checks for prod

## Load Next (References)

- `references/state-and-environments.md` — backends, locking, workspaces vs separate state, drift
- `references/modules-and-composition.md` — module interfaces, versioning, composition patterns
- `references/workflows-and-guardrails.md` — CI plan/apply, policy-as-code, safe migrations

© Claude MPM Team · MIT · bobmatnyc/claude-mpm-skills

Similar skills

All skills for DevOps and infrastructure →

terraform by other authors comes first.

From the same set97

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