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.
npx skills add bobmatnyc/claude-mpm-skills --skill terraform -a claude-codeWhat 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, andterraform 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-code2Manually: put the files in place
~/.claude/skills/terraform/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/terraform/
1Skills CLI (Vercel)
npx skills add bobmatnyc/claude-mpm-skills --skill terraform -a codex2Manually: put the files in place
.agents/skills/terraform/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add bobmatnyc/claude-mpm-skills --skill terraform -a cursor2Manually: put the files in place
.cursor/skills/terraform/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install bobmatnyc/claude-mpm-skills terraform2Manually: put the files in place
.github/skills/terraform/SKILL.md1Skills CLI (Vercel)
npx skills add bobmatnyc/claude-mpm-skills --skill terraform -a gemini-cli2Platform CLI
gemini skills install https://github.com/bobmatnyc/claude-mpm-skills --path universal/infrastructure/terraformManually: put the files in place
.devin/skills/terraform/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add bobmatnyc/claude-mpm-skills --skill terraform -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.