Agent skill

Cloud Cost Optimization

by wshobson in wshobson/agents

Cuts cloud spend across AWS, Azure, GCP and OCI with cost tagging, rightsizing, commitment and spot pricing models, and architecture changes.

MITAuto-check passedDevOps & Cloud

Install Cloud Cost Optimization

skills CLI
$ npx skills add wshobson/agents --skill cost-optimization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wshobson/agents cost-optimization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/cloud-infrastructure/skills/cost-optimization .claude/skills/cost-optimization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cost-optimization
GitHub stars
40k
Used in
13 other repos
Token cost
~1.7k tokens
SKILL.md length
452 words
Files
2 (incl. references)
Skills in repo
142
Repo updated
First seen
Licence
MIT

At a glance

Cuts cloud spend across AWS, Azure, GCP and OCI with cost tagging, rightsizing, commitment and spot pricing models, and architecture changes.

  • Works in 4 steps: Visibility → Right-Sizing → Pricing Models → …
  • Reducing the monthly bill for AWS, Azure, GCP or OCI workloads
  • SKILL.md covers Purpose, When to Use, Cost Optimization Framework and AWS Cost Optimization, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The skill organizes cost work into four areas: visibility through allocation tags, budget alerts and dashboards; right-sizing based on utilization, with auto-scaling and idle-resource cleanup; pricing models such as reserved capacity, spot or preemptible instances, savings plans and committed use discounts; and architecture changes like managed services, caching, data transfer tuning and lifecycle policies.

Provider sections cover AWS reserved instances, savings plans, spot instances and S3 lifecycle rules, Azure reserved VMs, Hybrid Benefit and Advisor recommendations, GCP committed and sustained use discounts and preemptible VMs, and OCI flexible shapes. A reference file sets out tagging standards. The excerpt is cut off in the OCI section.

When your agent uses it

  • Reducing the monthly bill for AWS, Azure, GCP or OCI workloads
  • Right-sizing over-provisioned or idle cloud resources
  • Choosing between reserved capacity, savings plans and spot instances
  • Defining cost allocation tags and budget alerts

Example prompts

  • “Review our AWS setup and list the quickest cost savings from rightsizing and idle resources.”
  • “Compare reserved instances and savings plans for our steady EC2 workloads.”
  • “Draft a tagging standard for cost allocation across our Azure subscriptions.”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Visibility
  2. Right-Sizing
  3. Pricing Models
  4. Architecture Optimization

What it can do on your machine

Read from SKILL.md and the folder at commit 46891e7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are hcl).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cloud Cost Optimization loads about 1.7k tokens when it runs, and up to ~1.9k if it reads all its reference files. Until then it costs about 68 tokens; SKILL.md has 452 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from wshobson/agents at commit 46891e7, republished under its MIT licence (© wshobson). 452 words, ~1,711 tokens.

Download SKILL.mdSave it as .claude/skills/cost-optimization/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
cost-optimization
description
Optimize cloud costs across AWS, Azure, GCP, and OCI through resource rightsizing, tagging strategies, reserved instances, and spending analysis. Use when reducing cloud expenses, analyzing infrastructure costs, or implementing cost governance policies.

Cloud Cost Optimization

Strategies and patterns for optimizing cloud costs across AWS, Azure, GCP, and OCI.

Purpose

Implement systematic cost optimization strategies to reduce cloud spending while maintaining performance and reliability.

When to Use

  • Reduce cloud spending
  • Right-size resources
  • Implement cost governance
  • Optimize multi-cloud costs
  • Meet budget constraints

Cost Optimization Framework

1. Visibility
  • Implement cost allocation tags
  • Use cloud cost management tools
  • Set up budget alerts
  • Create cost dashboards
2. Right-Sizing
  • Analyze resource utilization
  • Downsize over-provisioned resources
  • Use auto-scaling
  • Remove idle resources
3. Pricing Models
  • Use reserved capacity
  • Leverage spot/preemptible instances
  • Implement savings plans
  • Use committed use discounts
4. Architecture Optimization
  • Use managed services
  • Implement caching
  • Optimize data transfer
  • Use lifecycle policies

AWS Cost Optimization

Reserved Instances
Savings: 30-72% vs On-Demand
Term: 1 or 3 years
Payment: All/Partial/No upfront
Flexibility: Standard or Convertible
Savings Plans
Compute Savings Plans: 66% savings
EC2 Instance Savings Plans: 72% savings
Applies to: EC2, Fargate, Lambda
Flexible across: Instance families, regions, OS
Spot Instances
Savings: Up to 90% vs On-Demand
Best for: Batch jobs, CI/CD, stateless workloads
Risk: 2-minute interruption notice
Strategy: Mix with On-Demand for resilience
S3 Cost Optimization
hcl
resource "aws_s3_bucket_lifecycle_configuration" "example" {
  bucket = aws_s3_bucket.example.id

  rule {
    id     = "transition-to-ia"
    status = "Enabled"

    transition {
      days          = 30
      storage_class = "STANDARD_IA"
    }

    transition {
      days          = 90
      storage_class = "GLACIER"
    }

    expiration {
      days = 365
    }
  }
}

Azure Cost Optimization

Reserved VM Instances
  • 1 or 3 year terms
  • Up to 72% savings
  • Flexible sizing
  • Exchangeable
Azure Hybrid Benefit
  • Use existing Windows Server licenses
  • Up to 80% savings with RI
  • Available for Windows and SQL Server
Azure Advisor Recommendations
  • Right-size VMs
  • Delete unused resources
  • Use reserved capacity
  • Optimize storage

GCP Cost Optimization

Committed Use Discounts
  • 1 or 3 year commitment
  • Up to 57% savings
  • Applies to vCPUs and memory
  • Resource-based or spend-based
Sustained Use Discounts
  • Automatic discounts
  • Up to 30% for running instances
  • No commitment required
  • Applies to Compute Engine, GKE
Preemptible VMs
  • Up to 80% savings
  • 24-hour maximum runtime
  • Best for batch workloads

OCI Cost Optimization

Flexible Shapes
  • Scale OCPUs and memory independently
  • Match instance sizing to workload demand
  • Reduce wasted capacity from fixed VM shapes
Commitments and Budgets
  • Use annual commitments for predictable spend
  • Set compartment-level budgets with alerts
  • Track monthly forecasts with OCI Cost Analysis
Show full SKILL.md (178 more words)Show less
Preemptible Capacity
  • Use preemptible instances for batch and ephemeral workloads
  • Keep interruption-tolerant autoscaling groups
  • Mix with standard capacity for critical services

Tagging Strategy

AWS Tagging
hcl
locals {
  common_tags = {
    Environment = "production"
    Project     = "my-project"
    CostCenter  = "engineering"
    Owner       = "team@example.com"
    ManagedBy   = "terraform"
  }
}

resource "aws_instance" "example" {
  ami           = "ami-12345678"
  instance_type = "t3.medium"

  tags = merge(
    local.common_tags,
    {
      Name = "web-server"
    }
  )
}

Reference: See references/tagging-standards.md

Cost Monitoring

Budget Alerts
hcl
# AWS Budget
resource "aws_budgets_budget" "monthly" {
  name              = "monthly-budget"
  budget_type       = "COST"
  limit_amount      = "1000"
  limit_unit        = "USD"
  time_period_start = "2024-01-01_00:00"
  time_unit         = "MONTHLY"

  notification {
    comparison_operator        = "GREATER_THAN"
    threshold                  = 80
    threshold_type            = "PERCENTAGE"
    notification_type         = "ACTUAL"
    subscriber_email_addresses = ["team@example.com"]
  }
}
Cost Anomaly Detection
  • AWS Cost Anomaly Detection
  • Azure Cost Management alerts
  • GCP Budget alerts
  • OCI Budgets and Cost Analysis

Architecture Patterns

Pattern 1: Serverless First
  • Use Lambda/Functions for event-driven
  • Pay only for execution time
  • Auto-scaling included
  • No idle costs
Pattern 2: Right-Sized Databases
Development: t3.small RDS
Staging: t3.large RDS
Production: r6g.2xlarge RDS with read replicas
Pattern 3: Multi-Tier Storage
Hot data: S3 Standard
Warm data: S3 Standard-IA (30 days)
Cold data: S3 Glacier (90 days)
Archive: S3 Deep Archive (365 days)
Pattern 4: Auto-Scaling
hcl
resource "aws_autoscaling_policy" "scale_up" {
  name                   = "scale-up"
  scaling_adjustment     = 2
  adjustment_type        = "ChangeInCapacity"
  cooldown              = 300
  autoscaling_group_name = aws_autoscaling_group.main.name
}

resource "aws_cloudwatch_metric_alarm" "cpu_high" {
  alarm_name          = "cpu-high"
  comparison_operator = "GreaterThanThreshold"
  evaluation_periods  = "2"
  metric_name         = "CPUUtilization"
  namespace           = "AWS/EC2"
  period              = "60"
  statistic           = "Average"
  threshold           = "80"
  alarm_actions       = [aws_autoscaling_policy.scale_up.arn]
}

Cost Optimization Checklist

  • Implement cost allocation tags
  • Delete unused resources (EBS, EIPs, snapshots)
  • Right-size instances based on utilization
  • Use reserved capacity for steady workloads
  • Implement auto-scaling
  • Optimize storage classes
  • Use lifecycle policies
  • Enable cost anomaly detection
  • Set budget alerts
  • Review costs weekly
  • Use spot/preemptible instances
  • Optimize data transfer costs
  • Implement caching layers
  • Use managed services
  • Monitor and optimize continuously

Tools

  • AWS: Cost Explorer, Cost Anomaly Detection, Compute Optimizer
  • Azure: Cost Management, Advisor
  • GCP: Cost Management, Recommender
  • OCI: Cost Analysis, Budgets, Cloud Advisor
  • Multi-cloud: CloudHealth, Cloudability, Kubecost
  • terraform-module-library - For resource provisioning
  • multi-cloud-architecture - For cloud selection

© wshobson, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in plugins/cloud-infrastructure/skills/cost-optimization of wshobson/agents.

  • SKILL.md
  • references/tagging-standards.md

Open the folder on GitHubat commit 46891e7

Used in 13 other repositories

We found 34 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 13 other GitHub owners. This page covers the copy in wshobson/agents, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Cloud Cost Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cloud Cost Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cloud Cost Optimization this skillwshobson/agents40k13 repos~1.7kAutomated safety check: PassMIT
Cloud Architectdavila7/claude-code-templates32k7 repos~1.9kAutomated safety check: PassMIT
Cloud ArchitectJeffallan/claude-skills12k—~1.9kAutomated safety check: PassMIT
Senior Cloud Architectborghei/Claude-Skills874—~1.4kAutomated safety check: PassMIT
Infrastructure Devops Cloud Architectchendongqi/OPB-Skills125—~1.1kAutomated safety check: PassNone
Spotinfoalexei-led/spotinfo164—~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • Cloud Architect

    davila7/claude-code-templates

    Expert cloud architect specializing in AWS/Azure/GCP multi-cloud infrastructure design, advanced IaC (Terraform/OpenTofu/CDK), FinOps cost optimization, and modern architectural patterns.

    32k GitHub starsUsed in 7 repos~1.9k tokens
    DevOps & CloudAuto-check passed
  • Cloud Architect

    Jeffallan/claude-skills

    Designs cloud architectures, migration plans, cost optimization recommendations and disaster recovery strategies across AWS, Azure and GCP.

    12k GitHub stars~1.9k tokensUpdated 4 days ago
    DevOps & CloudAuto-check passed
  • Senior Cloud Architect

    borghei/Claude-Skills

    A skill your agent uses when the user asks to "design cloud architecture", "set up Terraform infrastructure", "optimize cloud costs", "plan disaster recovery", "configure multi-region failover"…

    874 GitHub stars~1.4k tokensUpdated today
    DevOps & CloudAuto-check passed
  • 云架构助手 - 专业的云计算架构设计与优化专家。适用场景: (1) 云架构设计与方案规划 (2) 云资源选型与容量规划 (3) 云成本优化与FinOps实践 (4) 多云/混合云策略设计 (5) 云迁移方案与实施 (6) 云安全架构设计 (7) 云原生架构转型 触发关键词:云架构、AWS、阿里云、Azure、GCP、云迁移、云成本、多云、混合云、云安全、云原生、Kubernetes、容器

    125 GitHub stars~1.1k tokensUpdated 7 mo ago
    DevOps & CloudAuto-check passed
  • Spotinfo

    alexei-led/spotinfo

    Query Spot/preemptible VM prices, savings and interruption risk across AWS, GCP and Azure with the spotinfo CLI.

    164 GitHub stars~1.8k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Dangling DNS Finder

    anirudhbiyani/findmytakeover

    Detect dangling DNS records and subdomain-takeover risks across a multi-cloud environment by running the bundled findmytakeover tool.

    180 GitHub stars~1.8k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed

More from wshobson/agents

All 142 skills in this repo
  • Billing Automation

    wshobson/agents

    Covers building subscription billing: billing cycles, subscription states, invoice generation, proration, tax handling and dunning for failed payments.

    40k GitHub starsUsed in 12 repos~473 tokens
    Auto-check passed
  • Profiles slow Python code with cProfile and memory profilers, then applies targeted fixes for CPU, memory, I/O and query bottlenecks.

    40k GitHub starsUsed in 12 repos~814 tokens
    Auto-check passed
  • Portfolio Risk Metrics

    wshobson/agents

    Covers portfolio risk measurement with VaR, CVaR, Sharpe, Sortino and drawdown, plus guidance on limits, stress tests and tail risk.

    40k GitHub starsUsed in 12 repos~502 tokens
    Auto-check passed
  • Plans memory headroom, works through out-of-memory failures and watches temperature and power during long ML training jobs on NVIDIA DGX Spark.

    40k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Writes unit tests for shell scripts with Bats: error-condition tests, fixtures and mocks, cross-shell checks, parallel runs, helper files and CI integration.

    40k GitHub starsUsed in 11 repos~1.3k tokens
    Auto-check passed
  • Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.

    40k GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Cloud Cost Optimization

What does Cloud Cost Optimization do?

Cuts cloud spend across AWS, Azure, GCP and OCI with cost tagging, rightsizing, commitment and spot pricing models, and architecture changes. The skill organizes cost work into four areas: visibility through allocation tags, budget alerts and dashboards; right-sizing based on utilization, with auto-scaling and idle-resource cleanup; pricing models such as reserved capacity, spot or preemptible instances, savings plans and committed use discounts; and architecture changes like managed services, caching, data transfer tuning and lifecycle policies.

When should I use Cloud Cost Optimization?

Cloud Cost Optimization fits situations like: reducing the monthly bill for AWS, Azure, GCP or OCI workloads; right-sizing over-provisioned or idle cloud resources; choosing between reserved capacity, savings plans and spot instances; defining cost allocation tags and budget alerts.

How do I install Cloud Cost Optimization in Claude Code?

Run `npx skills add wshobson/agents --skill cost-optimization -a claude-code`. Or copy the skill folder (plugins/cloud-infrastructure/skills/cost-optimization in wshobson/agents) into .claude/skills/cost-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Cloud Cost Optimization in Codex?

Run `npx skills add wshobson/agents --skill cost-optimization -a codex`. Or copy the skill folder (plugins/cloud-infrastructure/skills/cost-optimization in wshobson/agents) into .agents/skills/cost-optimization in your project. Codex loads it when a task matches its description.

Can I use Cloud Cost Optimization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wshobson/agents --skill cost-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cost-optimization, .gemini/skills/cost-optimization, .github/skills/cost-optimization and .opencode/skills/cost-optimization in your project.

What does Cloud Cost Optimization need to run?

SKILL.md names no scripts, command-line tools or credentials: Cloud Cost Optimization is instructions for the agent only.

Does Cloud Cost Optimization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cloud Cost Optimization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cloud Cost Optimization use?

Cloud Cost Optimization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cloud Cost Optimization use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 208 tokens, read only when the agent opens those files.

What are the alternatives to Cloud Cost Optimization?

Skills that share tags, products or a category with Cloud Cost Optimization: Cloud Architect (davila7/claude-code-templates, 32k stars), Cloud Architect (Jeffallan/claude-skills, 12k stars), Senior Cloud Architect (borghei/Claude-Skills, 874 stars) and Infrastructure Devops Cloud Architect (chendongqi/OPB-Skills, 125 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cloud Cost Optimization?

wshobson (a GitHub user) maintains it in wshobson/agents, which has 40,254 GitHub stars. The repository holds 142 skills in this directory. The repository was last updated on October 5, 2026.

Source: wshobson/agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.