terraform-linting

terraform-linting is a skill for Claude Code, Codex from abdullahkhawer/devops-skills. It costs 40 tokens per session (702 once invoked), scanned A, original, Apache-2.0.

A Terraform code-checking skill that runs formatting, validation, and TFLint checks. Terraform is a tool for describing cloud and other infrastructure in text so it can be reviewed and managed as code.

In plain words
What is it for?
Use it to check Terraform files recursively, validate a prepared configuration, and review suggested formatting changes and lint findings.
Why use it?
It catches formatting, configuration, and common infrastructure mistakes before changes are applied. It checks the project's existing TFLint rules and does not initialize a real backend automatically.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to check Terraform files recursively, validate a prepared configuration, and review suggested formatting changes and lint findings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abdullahkhawer/devops-skills/terraform-linting
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add abdullahkhawer/devops-skills --skill terraform-linting
Clone the repo
git clone --depth 1 https://github.com/abdullahkhawer/devops-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for terraform-linting

README.md
[![agentmods](https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/terraform-linting/github.svg)](https://agentmods.dev/skills/abdullahkhawer/devops-skills/terraform-linting)
Your own site
<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/terraform-linting"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/terraform-linting/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for terraform-linting

Your own site · 80×15
<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/terraform-linting"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/terraform-linting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 702 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.00702
Opus 5.5 $0.00016 $0.00281
Sonnet 5.5 $0.00008 $0.00140
Haiku 4.5 $0.00004 $0.00070

Measured 23d ago against content hash 6ef7e1b870e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

terraform-linting scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 23d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/terraform-linting/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Terraform Linting Skill

Run this skill when asked to lint, format, or check style for Terraform code.

Step 1 — Detect available tooling

which terraform tflint 2>/dev/null
ls .tflint.hcl 2>/dev/null

If tflint is not installed, inform the user and ask before installing:

brew install tflint

terraform fmt and terraform validate ship with the Terraform CLI, so no separate install is needed for those.


Step 2 — Run formatting check

terraform fmt -recursive -check -diff

Show the diff to the user before applying any formatting changes.


Step 3 — Run validation

terraform validate

Requires terraform init to have been run in the directory first — if it fails with a missing-provider error, inform the user rather than running init yourself if it would touch a real backend.


Step 4 — Run the linter

tflint --recursive

Respect the project's .tflint.hcl if present (enabled plugins/rules) — do not override it. If no .tflint.hcl exists, run with default rules and mention that a config file could be added.

Report all findings grouped by file, with line numbers and rule names (e.g. terraform_deprecated_index, aws_instance_invalid_type).


Step 5 — Apply fixes (only with user confirmation)

terraform fmt -recursive
tflint --fix --recursive

Only run auto-fix commands after showing the user what will change and getting explicit confirmation. Most tflint findings (e.g. deprecated syntax, unused variables, invalid instance types) require manual review even when a --fix is available.


Standard conventions enforced

  • Formatting is always terraform fmt-compliant (2-space indentation, aligned = signs).
  • Resource and variable names: snake_case, descriptive, no redundant type prefixes (e.g. aws_instance.web, not aws_instance.aws_instance_web).
  • All variables have a description and, where sensible, a type constraint.
  • No hardcoded credentials, account IDs, or ARNs — use variables or data sources.
  • Provider versions are pinned via required_providers in a versions.tf or the root module.

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 23d ago First seen · 86 lines · 40 tokens per session scan A 6ef7e1b870e1

Subscribe to this mod's changes

terraform-linting is a skill published in the GitHub repository abdullahkhawer/devops-skills (8 stars, last pushed 24d ago), licensed Apache-2.0. It adds 40 tokens to every session and 702 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-23.

Related

Other skills, from other repositories

gcloud-usage

This skill should be used when user asks about "GCloud logs", "Cloud Logging queries", "Google Cloud metrics", "GCP observability", "trace analysis", or "debugging production issues on GCP".

fcakyon/claude-codex-settings · 49 tokens

proposal-troubleshoot

Diagnose a problem with the proposal skills themselves — a script that fails, a rule applied wrongly, output that contradicts the skill's own stated mandate — and assemble a bug report when it turns out to be a real defect. Use when a skill misbehaved, not when the proposal needs improving.

hutzelmann/thesis-proposal-skills · 66 tokens

azure-diagnostics

Diagnose Azure application and infrastructure issues with a structured, evidence-based workflow. Use this skill when users ask to troubleshoot outages, latency, failures, configuration drift, or anomalies. Root cause analysis using logs, metrics, traces, and dependency mapping.

manu14357/zskills · 53 tokens

apex-azure-diagnostics

WORKFLOW SKILL — Debug Azure production issues: Container Apps, Functions, App Service, AKS, VMs and messaging, with KQL log analysis. WHEN: 'troubleshoot container apps', 'troubleshoot AKS', 'pod crashloop', 'VM RDP or SSH failure', 'app service high CPU', 'service bus errors'. DO NOT USE FOR: pre-deploy validation…

jonathan-vella/apex-accelerator · 119 tokens

fabric-network-remediate

Diagnose and resolve Microsoft Fabric network performance issues including connectivity failures, latency, private endpoints, managed VNets, outbound access protection, gateway diagnostics, OneLake endpoint routing, service tag configuration, firewall allowlisting, DNS resolution, and Spark session startup delays. Use…

PatrickGallucci/fabric-skills · 86 tokens

gke-workload-scaling-troubleshooting

Diagnoses GKE HorizontalPodAutoscaler (HPA) failures — metrics showing as , FailedGetResourceMetric / FailedGetScale / FailedComputeMetricsReplicas events, missing Pod resource requests, custom/external metrics-pipeline breakage (FailedGetExternalMetric / FailedGetCustomMetric, unavailable metrics adapter…

google/skills · 170 tokens