ywc-infra-optimize

Right-size Terraform infrastructure costs and detect drift through a tiered change loop.

8|1|Updated May 13, 2026
One-click install
npx skills add https://github.com/yongwoon/ywc-agent-toolkit --skill ywc-infra-optimize
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ywc-infra-optimize
Source: https://github.com/yongwoon/ywc-agent-toolkit/tree/main/claude-code/skills/ywc-infra-optimize
Command: npx skills add https://github.com/yongwoon/ywc-agent-toolkit --skill ywc-infra-optimize

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires terraform, gh, python3, and includes references (resource) components.

What problem does it solve?

This skill addresses the risks of manual infrastructure maintenance by providing a safe, repeatable change loop for cost right-sizing, drift remediation, and reliability hardening.

Core Features & Use Cases

  • Safe Change Loop: Implements the Iron Law of three witnesses (cost data, blast-radius confirmation, and reversibility) to ensure changes are safe.
  • Tiered Remediation: Automatically executes SAFE items while escalating CAUTION and DANGER items to prevent accidental outages.
  • Use Case: Use this skill to automatically right-size over-provisioned compute instances or remove orphaned resources identified by cost analysis, while ensuring no stateful resources are destroyed without human oversight.

Quick Start

Run the ywc-infra-optimize skill with the scope set to your compute module to identify and remediate infrastructure inefficiencies.

Frequently Asked Questions about ywc-infra-optimize

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

FAQPage Schema
How do I automate Terraform drift detection and cost right-sizing safely?

Automate Terraform drift detection and cost right-sizing by using a tiered change-loop mechanism that cross-references cost data, blast-radius confirmation, and reversibility. It automatically remediates safe items while escalating high-risk stateful resource changes for human oversight.

What is infrastructure reliability hardening and when do I need it for Terraform environments?

Infrastructure reliability hardening is the process of tuning performance and removing orphaned resources in Terraform-managed environments. You need it when manual maintenance risks introduce drift, unused resources accumulate, or compute instances become over-provisioned.

How does tiered remediation prevent accidental infrastructure outages during cost optimization?

Tiered remediation prevents outages by categorizing infrastructure changes into SAFE, CAUTION, and DANGER levels. It automatically executes safe items while escalating caution and danger items, ensuring no stateful resources are destroyed without human oversight.

Do I need Terraform and performance monitoring signals to automate infrastructure cleanup?

Yes, you need Terraform to manage the environment and performance monitoring signals to validate changes. The process requires per-item Terraform plan verification and monitoring integration to ensure blast-radius safety during automated cleanup of unused resources.

What's the best way to remove orphaned Terraform resources without destroying stateful data?

Use an automated optimization loop that applies the Iron Law of three witnesses: cost data analysis, blast-radius confirmation, and reversibility. This ensures stateful resources are escalated for human approval rather than automatically destroyed during cleanup.

Why does my infrastructure optimization loop require per-item Terraform plan verification?

Per-item Terraform plan verification is required to ensure blast-radius safety by confirming the exact impact of each change before execution. It prevents accidental outages by validating that automated right-sizing and drift remediation actions stay within safe boundaries.