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 2mo 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 2mo 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. 2mo 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 (11 stars, last pushed 2mo 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

terraform-linting compared with skills from other repositories

terraform-linting next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
terraform-lintingabdullahkhawer/devops-skillsSkill112mo agoApache-2.0A40Claude Code, Codex
gcloud-usagefcakyon/claude-codex-settingsSkill1.2ktodayApache-2.0A49Claude Code
proposal-troubleshoothutzelmann/thesis-proposal-skillsSkill106d agoMITA66Claude Code
apex-azure-diagnosticsjonathan-vella/apex-acceleratorSkill513d agoMITC110Claude Code
workers-profilingfcakyon/claude-codex-settingsSkill1.2ktodayApache-2.0A31Claude Code
azure-diagnosticsmanu14357/zskillsSkill164mo agoMITA53Claude Code, Codex
fabric-network-remediatePatrickGallucci/fabric-skillsSkill185mo agoMITA86Claude Code, Codex