---
name: "infracost-cloud-cost-estimates"
description: "Estimate cloud cost impact of Terraform pull requests directly in GitHub/GitLab comments."
metadata:
  author: "Infracost"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "estimate terraform cost infracost"
  - "infracost pull request comment"
  - "finops cloud budget"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Infracost Cloud Cost Estimates in Pull Requests

Implements Infracost: parsing Terraform plan JSON, calculating monthly delta cost changes across cloud resources (AWS, GCP, Azure), setting budget guardrails, and commenting breakdowns on PRs.

## When to Invoke
Invoke this skill whenever you need to:
- estimate terraform cost infracost
- infracost pull request comment
- finops cloud budget

## Execution SOP & Rules
1. Generate plan JSON: terraform plan -out=tfplan.binary && terraform show -json tfplan.binary > plan.json.
2. Run cost breakdown: infracost breakdown --path plan.json.
3. Generate differential diff: infracost diff --path plan.json --compare-to baseline.json.
4. Integrate GitHub Action infracost/actions/comment to publish sticky PR comments.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
