review-tf

Reviews Terraform code changes in pull requests using gh pr diff.

17|1|Updated Dec 29, 2019
One-click install
npx skills add https://github.com/LumaKernel/dotfiles --skill review-tf-lumakernel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: review-tf
Source: https://github.com/LumaKernel/dotfiles/tree/main/common/claude/skills/review-tf
Command: npx skills add https://github.com/LumaKernel/dotfiles --skill review-tf-lumakernel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewing Terraform changes in pull requests requires checking subtle dependency and configuration issues that are easy to miss manually, such as hidden implicit dependencies and hardcoded values that should be data sources. ## Core Features & Use Cases - Dependency Directness Analysis: Detects places where local or var indirection is used even though a resource or data source could be referenced directly. - Missing Dependency Detection: Identifies implicit dependencies that should be declared explicitly with depends_on. - Data Source Recommendations: Flags hardcoded values and external references that should be replaced with Terraform data resources. - Use Case: When a teammate opens a PR modifying Terraform modules, run this Skill to post inline review comments on the relevant diff lines, each with cited evidence, official documentation links, and concrete fix suggestions. ## Quick Start Review the Terraform changes in the current pull request and post comments on each finding.

Frequently Asked Questions about review-tf

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

FAQPage Schema
How do I review Terraform changes in a GitHub pull request?▼

Use gh pr diff to fetch the pull request changes, then inspect the Terraform code for dependency issues, missing depends_on declarations, and hardcoded values. Post findings as inline review comments on the corresponding diff lines.

What should I check when reviewing Terraform code?▼

Check three main aspects: whether locals or variables unnecessarily indirect references that could point directly at resources, whether implicit dependencies need explicit depends_on blocks, and whether hardcoded values should become data resources.

When should I use depends_on in Terraform?▼

Use depends_on when a resource has an implicit dependency that Terraform cannot infer from attribute references alone. Explicit declaration ensures correct creation and destruction ordering for these hidden relationships.

When should hardcoded values become Terraform data sources?▼

Replace hardcoded values with data resources when the value references existing external infrastructure, such as AMI IDs, VPC IDs, or account details. Data sources keep configuration synchronized with the actual environment state.

Does this review approach work for non-Terraform infrastructure code?▼

No, the review criteria are specific to Terraform constructs like locals, variables, depends_on, and data resources. Other IaC tools such as CloudFormation or Pulumi would require different review perspectives.