lang-tf

Standardize Terraform and OpenTofu code with formatting, linting, and security checks.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/dragoscirjan/opencode-config --skill lang-tf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lang-tf
Source: https://github.com/dragoscirjan/opencode-config/tree/main/skills/lang-tf
Command: npx skills add https://github.com/dragoscirjan/opencode-config --skill lang-tf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams write consistent, safe, and maintainable Terraform and OpenTofu code by enforcing shared standards for formatting, structure, validation, and state handling.

Core Features & Use Cases

  • Style Guidance: Follows the HashiCorp style guide to keep infrastructure code readable and predictable.
  • Tooling Recommendations: Promotes formatting, linting, and security checks with Terraform or OpenTofu formatters, TFLint, and tfsec or Checkov.
  • IaC Design Practices: Encourages one concern per file, reusable modules, provider version pinning, variable validation, and remote state with locking.
  • Use Case: A platform engineer can use this Skill to review a new module and confirm it meets organization standards before merging.

Quick Start

Ask the skill to review your Terraform or OpenTofu module for formatting, structure, validation, security checks, and remote state best practices.

Frequently Asked Questions about lang-tf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize Terraform and OpenTofu module structure and formatting?

To standardize Terraform and OpenTofu code, enforce HashiCorp style compliance by running terraform or tofu fmt, separating concerns into individual files, and designing reusable modules with variable validation.

What is the best way to run security scans on OpenTofu infrastructure code?

The best way to run security scans on OpenTofu infrastructure code is to integrate tfsec or Checkov into your workflow. These tools detect vulnerabilities and enforce best practices for your IaC repositories.

How do I validate Terraform providers and syntax before merging modules?

Validate Terraform providers and syntax before merging modules by pinning provider versions and running TFLint. This ensures your infrastructure code meets organizational standards and catches syntax errors early.

Does this approach support remote state locking for OpenTofu workflows?

Yes, this approach supports remote state locking for OpenTofu workflows. It enforces the use of locked remote backends to prevent concurrent state corruption and maintain safe infrastructure-as-code operations.

Why should I use TFLint and tfsec together for infrastructure as code?

Use TFLint and tfsec together for infrastructure as code because TFLint handles syntax and provider validation while tfsec performs security scanning. Combined, they ensure comprehensive formatting and safety compliance.