agentleFS
paulanunes85paulanunes85/three-horizons-accelerator/.github/skills/terraform-cli/SKILL.md

terraform-cli

Skill2 starsChanged 10 months agoMITView on GitHub

Terraform CLI operations for Azure infrastructure management

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    ALWAYS run terraform fmt before committing

    line 67
  2. Very specific:

    ALWAYS run terraform validate before planning

    line 68
  3. Distinctive:

    NEVER commit .tfstate files

    line 69
  4. Distinctive:

    ALWAYS use -out flag for plans to review

    line 70
  5. Distinctive:

    Use workspaces for environment separation

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

When to Use

  • Validating Terraform configurations
  • Planning infrastructure changes
  • Applying infrastructure changes (with approval)
  • Security scanning IaC

Prerequisites

  • Terraform >= 1.5.0 installed
  • Azure CLI authenticated
  • Backend storage account accessible
  • Environment variables: ARM_SUBSCRIPTION_ID, ARM_TENANT_ID

Commands

Format & Validate

# Check formatting
terraform fmt -check -recursive -diff

# Apply formatting
terraform fmt -recursive

# Validate configuration
terraform init -backend=false
terraform validate

Planning

# Initialize with backend
terraform init -reconfigure

# Create plan
terraform plan \
  -var-file=environments/${ENVIRONMENT}.tfvars \
  -out=tfplan \
  -detailed-exitcode

# Show plan in JSON
terraform show -json tfplan | jq '.resource_changes'

Security Scanning

# TFSec scan
tfsec . --format=json --out=tfsec-results.json

# Checkov scan
checkov -d . --output-file=checkov-results.json --output=json

State Operations (Read-Only)

# List resources
terraform state list

# Show resource details
terraform state show 'azurerm_kubernetes_cluster.main'

Best Practices

  1. ALWAYS run terraform fmt before committing
  2. ALWAYS run terraform validate before planning
  3. NEVER commit .tfstate files
  4. ALWAYS use -out flag for plans to review
  5. Use workspaces for environment separation
  6. Enable state locking with Azure blob lease

Output Format

Provide structured output:

  1. Command executed with full parameters
  2. Exit code (0=success, 1=error, 2=changes pending)
  3. Summary: resources to add/change/destroy
  4. Warnings or errors with line references
  5. Recommendations for next steps

Integration with Agents

Used by: @terraform, @security, @test

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.