
Cost Optimization
Cut AWS, Azure, GCP, and OCI bills with rightsizing, reserved capacity, tagging, and enforced cost governance.
Install
npx skills add https://github.com/wshobson/agents --skill cost-optimizationWhat is this skill?
- Required tag dictionary: Environment, Owner, CostCenter, Project, ManagedBy
- Provider notes for AWS Cost Explorer, Azure Policy, GCP labels, and OCI defined tags
- Four best practices: dictionary, policy enforcement, module inheritance, weekly audits
- Rightsizing, reserved instances, and multi-cloud spending analysis patterns
- Systematic cost governance without sacrificing reliability called out in purpose
Adoption & trust: 7.5k installs on skills.sh; 36.5k GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Azure Deploymicrosoft/azure-skills
Azure Preparemicrosoft/azure-skills
Azure Storagemicrosoft/azure-skills
Azure Validatemicrosoft/azure-skills
Appinsights Instrumentationmicrosoft/azure-skills
Azure Resource Lookupmicrosoft/azure-skills
Journey fit
Primary fit
Spend control is a production discipline once workloads run continuously, even though tagging should start earlier. Cloud infra and billing attribution are operated through tags, policies, and resource sizing—not landing-page work.
Common Questions / FAQ
Is Cost Optimization safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Cost Optimization
# Cloud Tagging Standards ## Required Tags - `Environment`: dev, staging, production - `Owner`: team or individual responsible for the workload - `CostCenter`: finance or reporting identifier - `Project`: product or initiative name - `ManagedBy`: terraform, opentofu, pulumi, or manual ## Provider Notes - AWS: standardize tags for Cost Explorer, CUR, and automation policies - Azure: align tags with management groups, subscriptions, and Azure Policy - GCP: combine labels and resource hierarchy for billing attribution - OCI: apply defined tags at the compartment and resource level for chargeback ## Best Practices 1. Publish an approved tag dictionary and naming rules. 2. Enforce tags with policy and CI validation. 3. Inherit tags from shared modules whenever possible. 4. Audit for missing or inconsistent tags weekly. --- 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