From terraform
Terraform-focused pre-commit + atomic-commit Skill for IaC repos (fmt/validate/tflint/terraform-docs) with strict atomicity and no AI commit signatures.
How this skill is triggered — by the user, by Claude, or both
Slash command
/terraform:terraform-atomic-commitThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this Skill in Terraform / Terragrunt repos (for example `terraform-modules/` and `infrastructure/`) when you want:
Use this Skill in Terraform / Terragrunt repos (for example terraform-modules/ and infrastructure/) when you want:
/terraform:pre-commit – to actively fix formatting + lint issues and get the working tree into a clean, reviewable state./terraform:atomic-commit – to enforce atomicity of the staged diff, run the repo’s quality gates, and propose a commit message (no AI signatures)./terraform:pre-commit and fix all issues in the files shown by git status (fmt, validate, docs).”/terraform:atomic-commit to confirm the staged diff is atomic and ready; propose a commit message.”This Skill behaves differently based on how it is invoked:
pre-commit mode:
atomic-commit mode:
pre-commit mode.[BLOCKING] – must fix before merge/commit (broken fmt/validate, dangerous workflow, non-atomic diff).[SHOULD_FIX] – strongly recommended before merge (lint warnings, missing docs update, missing pins).[NIT] – minor polish.terraform apply / terragrunt apply as part of this Skill.AGENTS.md, CLAUDE.md, .tool-versions, and .pre-commit-config.yaml override defaults here.terraform-docs sections accurate when present.Start by gathering:
git status --porcelaingit diff --statgit diff --cached --statgit diff --cached --name-onlyAGENTS.md / CLAUDE.md if present..pre-commit-config.yaml, .tool-versions, Taskfile.yml.terraform versionterragrunt --version (if present)tflint --version (if present)terraform-docs --version (if present)If pre-commit hooks fail due to tool-version mismatch, prefer installing the repo’s pinned tool versions (e.g. via asdf install or a repo task install:tools) over bypassing checks.
Scope changed files
.tf, .hcl, .json, .yml, and module README.md files.Formatting
terraform fmt -recursive (or repo-preferred equivalent) on changed module directories.Validate (focused, read-only)
terraform init -backend=falseterraform validate.terraform/ and lockfiles created during local validation.aws.global alias):
ci_providers.tf inside the module directory:
provider "aws" { region = "us-east-1" }provider "aws" { alias = "global" region = "us-east-1" }init/validate, and delete ci_providers.tf afterwards..terraform/ directories. Only commit .terraform.lock.hcl if the repo explicitly wants lockfiles versioned.run-all unless required)..tool-versions + asdf install).pre-commit run.TFLint (when configured)
tflint (pre-commit hook or .tflint.hcl), run it on changed modules/stacks..tflint.hcl + CI gate.terraform-docs consistency (when used)
<!-- BEGIN_TF_DOCS -->, regenerate docs and ensure the resulting diff is committed.terraform-docs markdown table --output-file README.md --output-mode inject <module_dir>terraform-docs tries to generate provider lockfiles, prefer a repo-approved invocation (some repos use --lockfile=false).git diff is clean (or explicitly commit the README changes as part of the same atomic change).[SHOULD_FIX] (or [BLOCKING] when the repo enforces it in CI).In atomic-commit mode, additionally:
Return:
Verdict: READY or NOT READYChecks: list of commands run + pass/failChanges made: brief listRemaining issues: with [BLOCKING] / [SHOULD_FIX] / [NIT]Proposed commit message: (atomic-commit mode only)npx claudepluginhub diversioteam/agent-skills-marketplace --plugin terraformReviews Terraform PRs with 8-category checklist on structure, state safety, security, naming, modules, variables, providers, and CI/CD. Outputs Approved/Needs Changes/Blocked verdict for PR reviews, pre-merge checks, and audits.
Validates, lints, audits, and plans Terraform HCL files using tflint, checkov, terraform validate/fmt/init; enforces security checklists and best practices.