/dstack-infra:terraform-style-checkfrom DStack Infra
Enforces Terraform HCL style and validity: organizes files, fixes naming conventions, pins provider/module versions, and runs fmt + validate on root modules or specific .tf files.
Ships in DStack Infra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Terraform configurations drift toward misplaced blocks, loose names, unpinned versions, and open security defaults. This skill brings a root module or a set of .tf files back to file organization, naming, version pinning, and security best practices, and proves it with terraform fmt and terraform validate. Reach for it when writing, reviewing, or generating Terraform HCL. It does not cover module authoring, state operations, terraform apply, or remote state.
You work reversibly and locally: write only the named local HCL files, with rollback through version control. Never mutate anything remote.
terraform apply, terraform plan, or any state-mutating command.main.tf, <resource_type>.tf, variables.tf, outputs.tf, versions.tf) when moving blocks into them..tf files to check. The target must exist on disk.terraform must be available on PATH..tf files under the target directory and record the file set. Do not read or modify files outside this set.main.tf for provider and terraform blocks, <resource_type>.tf for resources, variables.tf for variable declarations, outputs.tf for outputs, versions.tf for required_providers and required_version. Move misplaced blocks into their conventional file, creating it when it does not exist yet.aws_instance.web_server, not aws_instance.this). Give each variable a descriptive noun (vpc_cidr_block, not cidr).required_providers needs an exact version constraint (= X.Y.Z or ~> X.Y.Z with the minor pinned). Every registry module source needs a version constraint and every Git module source pins ?ref=; record local-path modules as manual-review since they accept no version constraint. Fill missing provider pins from the currently resolved version in .terraform.lock.hcl when available; for modules use the registry version or ?ref=, or flag for manual review. Flagging a missing pin for manual review is a non-blocking partial success: the step counts as done for that provider or module, and the flag goes into the compliance report.server_side_encryption_configuration, public access blocks (block_public_acls, block_public_policy, restrict_public_buckets, ignore_public_acls, all true), and versioning enabled. Security groups default to deny-all ingress. RDS instances need storage_encrypted = true and publicly_accessible = false. EC2 instances need metadata_options.http_tokens = "required". Apply the defaults where missing, unless the file carries an explicit # tfsec:ignore or # checkov:skip annotation for that resource.terraform fmt -recursive -diff on the target scope. When the input is a specific file list rather than a directory, run terraform fmt -diff on each file individually instead of -recursive. Capture stdout and stderr. This step passes when terraform fmt exits zero.terraform validate on the target directory. When the input is a specific file list rather than a directory, skip terraform validate (it needs a full module directory) and note the skip in the compliance report. Capture stdout and stderr. This step passes when terraform validate exits zero, or when the skip is recorded for single-file input..tf file set. Confirm no file outside the original set was created or modified, except conventionally named destination files from step 2. List any new conventionally named files explicitly.git checkout or manual deletion.terraform is not available on PATH and stop. Do not attempt installation. The check cannot proceed.The formatted and validated HCL files in place, plus a compliance report listing files touched, per-category pass or fail (organization, naming, version pinning, security), and the terraform fmt and validate exit codes. On failure the report adds the specific diagnostic, the failed step, and the set of files modified before the failure.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
5 skills in this plugin
/ci-cdUse when setting up or modifying CI/CD pipelines, quality gates, test runners, or deployment pipeline configuration through workflow files. Not for triggering a deployment./environment-contract-auditUse when environment-dependent code, templates, or deployment configuration changes, or when runtime configuration is missing. Produces a bidirectionally reconciled environment-variable contract./observabilityUse when adding telemetry, composing an observability surface, reviewing alerts, shipping a production feature, or diagnosing a production issue. Not for live failures, profiling, or launch runbooks./workflow-capacity-auditUse for a read-only audit of CI workflow capacity, duplication, queue time, runner compatibility, and required-check safety. Not for fixing workflows or auditing workflow vulnerabilities.npx claudepluginhub gosuda/dstack-skills --plugin dstack-infraOther plugins' skills for the same job