Cost Optimization
Seth HobsonCommunityCreated by Seth Hobson
- Skill
- Guidelines
- Cloud and DevOps
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to cloud cost optimization, focusing on visibility, resource rightsizing, pricing models, and architectural patterns. It covers specific strategies for major cloud providers, including reserved instances, savings plans, and spot instances, while emphasizing the importance of tagging strategies and automated monitoring to maintain budget control.
What it does
- Provides strategies for rightsizing resources to eliminate waste.
- Outlines pricing models like reserved instances and spot capacity.
- Defines tagging standards for improved cost allocation and visibility.
- Offers architectural patterns for serverless and multi-tier storage.
- Includes a checklist for continuous cost monitoring and governance.
- Details provider-specific tools for anomaly detection and budgeting.
When to use it
- When you need to reduce monthly cloud expenditures.
- When implementing cost governance policies across an organization.
- When analyzing infrastructure utilization to identify over-provisioning.
- When planning a multi-cloud strategy with budget constraints.
- When setting up automated alerts for cost anomalies.
Advantages
- Provides a unified approach across multiple cloud providers.
- Includes actionable architectural patterns for immediate implementation.
- Promotes a culture of continuous cost awareness.
- Offers clear guidance on leveraging discount programs like savings plans.
Usage examples
- “How can I reduce my AWS EC2 costs for batch processing jobs?”
- The agent will recommend using Spot Instances for up to 90% savings, noting the risk of interruption and suggesting a mix with On-Demand instances for resilience.
- “What is the best way to organize my cloud resources for better cost tracking?”
- The agent will provide a tagging strategy using keys like Environment, Owner, and CostCenter, and explain how to enforce these tags for better billing attribution.
- “How do I optimize storage costs for data that is rarely accessed?”
- The agent will suggest implementing lifecycle policies to transition data from standard storage to colder tiers like S3 Glacier or equivalent.
- “What are the main ways to save on GCP compute costs?”
- The agent will explain Committed Use Discounts, Sustained Use Discounts, and the use of Preemptible VMs for batch workloads.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/wshobson/cost-optimization/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip cost-optimization.zip -d .agents/skills
Documentation by Seth Hobson
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 ConvertibleSavings Plans
Compute Savings Plans: 66% savings
EC2 Instance Savings Plans: 72% savings
Applies to: EC2, Fargate, Lambda
Flexible across: Instance families, regions, OSSpot 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 resilienceS3 Cost Optimization
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
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
locals {
common_tags = {
Environment = "production"
Project = "my-project"
CostCenter = "engineering"
Owner = "[email protected]"
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
# 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 = ["[email protected]"]
}
}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 replicasPattern 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
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
Related Skills
terraform-module-library- For resource provisioningmulti-cloud-architecture- For cloud selection
Files
- ATTRIBUTION.mdAdded by AutoGineer991 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md6.7 KiB
- references/tagging-standards.md832 B
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Seth Hobson
- Publisher
- Seth Hobson (Community)
- Source
- wshobson/agents · plugins/cloud-infrastructure/skills/cost-optimization · commit 4bde316
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Seth Hobson.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download cost-optimization.zip