cost-optimization

Analyze cloud and AI consumption costs across Terraform, AWS, and Claude Code usage.

6|1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/kmshihab7878/claude-code-setup --skill cost-optimization-kmshihab7878
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cost-optimization
Source: https://github.com/kmshihab7878/claude-code-setup/tree/main/skills/cost-optimization
Command: npx skills add https://github.com/kmshihab7878/claude-code-setup --skill cost-optimization-kmshihab7878

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Track and reduce unnecessary spending across cloud infrastructure and AI model usage by providing actionable estimates, usage reports, and budget controls.

Core Features & Use Cases

  • Terraform cost estimation: Use Infracost patterns to show per-change cost breakdowns and generate baselines for CI comparisons.
  • AI token usage monitoring: Parse Claude Code logs with ccusage to produce daily, monthly, and live token spending reports.
  • AWS cost controls & patterns: Right-sizing checklists, budget resource examples, and integration with AWS Budgets/Cost Explorer for alerts and governance.

Quick Start

Use the cost-optimization skill to produce an Infracost diff for your Terraform directory and a daily ccusage summary for Claude Code token usage.

Frequently Asked Questions about cost-optimization

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

FAQPage Schema
How do I estimate Terraform infrastructure costs before deployment?

To estimate Terraform infrastructure costs before deployment, you can use Infracost patterns to generate per-change cost breakdowns. This provides baseline cost estimates for your CI pipelines to compare against future infrastructure modifications.

Can I monitor Claude Code token usage and spending reports?

Yes, you can monitor Claude Code token usage by parsing logs with ccusage. This process generates daily, monthly, and live token spending reports to help you track and analyze AI consumption costs.

What is the best way to set up AWS Budgets alerts for cloud cost governance?

The best way to set up AWS cost governance is by integrating AWS Budgets and Cost Explorer. You can apply right-sizing checklists and budget resource examples to establish alerts and monitor account-level metrics.

Do I need Infracost to analyze cloud costs in my Terraform directories?

Yes, Infracost is required for Terraform estimations. The skill relies on Infracost to evaluate your Terraform-managed infrastructure and provide actionable cost estimates for your cloud resources.

How does CI cost checking work for infrastructure changes?

CI cost checking works by generating an Infracost diff for your Terraform directory. This diff evaluates the financial impact of infrastructure changes before they are merged, preventing unexpected cloud spending.