Terraform and OpenTofu
Sets up Terraform or OpenTofu modules, state and secrets with safe plan and apply for predictable changes.
Claude's review
8/10 Terraform patterns with safe plan and apply rules, refactoring and secrets guidance
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
Terraform and OpenTofu infrastructure-as-code patterns for project layout, remote state, modules, variables, secrets, safe plan/apply workflows, and CI. Use when writing or reviewing .tf files, structuring modules or environments, configuring backends and state locking, or debugging plan drift, state, and provider errors.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: terraform-patterns
description: Terraform and OpenTofu infrastructure-as-code patterns for project layout, remote state, modules, variables, secrets, safe plan/apply workflows, and CI. Use when writing or reviewing .tf files, structuring modules or environments, configuring backends and state locking, or debugging plan drift, state, and provider errors.
metadata:
origin: ECC
---
# Terraform Patterns
Production-grade Terraform (and OpenTofu) patterns for writing infrastructure code that is reviewable, repeatable, and safe to apply.
## When to Activate
- Writing or reviewing `.tf` or `.tfvars` files
- Structuring a repo into modules and environments
- Configuring a remote backend, state locking, or state migration
- Passing variables and handling secrets in infrastructure code
- Setting up plan/apply automation in CI
- Debugging a failed plan, state drift, a lock error, or a provider version conflict
- Refactoring resources without destroying them (`moved`, `import`)
## When to Use
> Same as **When to Activate** above. This alias satisfies repo skill-format conventions. Use this skill any time you are writing, reviewing, or debugging Terraform or OpenTofu configuration.
## How It Works
This skill gives **copy-pasteable patterns** and a **safe command workflow**, organized by task:
1. **Project layout** - Environments as thin roots that call reusable modules.
2. **Versions and providers** - Pin Terraform and provider versions; commit the lock file.
3. **Remote state** - Encrypted, locked, per-environment state.
4. **Variables and outputs** - Typed, validated inputs and minimal outputs.
5. **Secrets** - Keep values out of code, state exposure in mind.
6. **Resources** - `for_each` over `count`, `lifecycle`, and tagging.
7. **Modules** - Small, single-purpose, versioned.
8. **Refactoring** - `moved` and `import` blocks instead of destroy/recreate.
9. **Safe workflow and CI** - Plan is saved, reviewed, then applied.
10. **Debugging and anti-patterns** - Common errors and what to avoid.
...From affaan-m's repository, MIT licence.
Related skills
-
Checked
Incident postmortem writer
Writes blameless incident postmortems with fishbone and five whys analysis, so the team fixes root causes.
8/101 credit -
Checked
Akka.NET cluster management
Sets up Akka.NET cluster bootstrapping, service discovery and health checks, with no static seed nodes needed.
7/101 credit -
Checked
AWS Lambda web apps
Builds and deploys Express, Fastify or Hono apps on AWS Lambda web functions, so your site runs serverless.
7/101 credit -
Checked
Cloud IAM audit
Audits and designs access across AWS, GCP, Azure and identity providers for least privilege and clean SSO.
7/101 credit -
Checked
Grafana APM and RUM
Sets up Grafana Cloud app monitoring, Faro frontend RUM and LLM tracing to show latency and errors.
7/101 credit -
Checked
Grafana synthetic checks
Writes Grafana Cloud synthetic checks in k6 with assertions that really fail, so outages get caught early.
8/101 credit