Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)41k · #6657

cost-optimization

Skill này làm gì

Công cụ này giúp giảm chi phí cho các dịch vụ cloud (như AWS, Azure, GCP). Nó gợi ý cách sử dụng tài nguyên hiệu quả hơn, xác định các mục không dùng đến và áp dụng các chiến lược tiết kiệm.

Khi nào nên dùng

  • ✓Khi chi tiêu cloud quá cao.
  • ✓Để tìm và loại bỏ các tài nguyên không dùng.
  • ✓Để lên kế hoạch cho chi phí cloud trong tương lai.

Liên kết skill

https://github.com/wshobson/agents/blob/main/plugins/cloud-infrastructure/skills/cost-optimization/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/wshobson/agents/blob/main/plugins/cloud-infrastructure/skills/cost-optimization/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm thế nào để giảm chi phí AWS của tôi?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ phân tích việc sử dụng tài nguyên cloud của bạn, như máy ảo và lưu trữ. Nó gợi ý điều chỉnh, như thu nhỏ tài nguyên quá lớn hoặc dùng các lựa chọn rẻ hơn cho những khối lượng công việc cụ thể.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

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       = "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

# 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

…

Câu hỏi thường gặp

“Right-sizing” nghĩa là gì?

“Right-sizing” nghĩa là điều chỉnh kích thước tài nguyên (như máy ảo) để chúng chỉ dùng đúng những gì thực sự cần, tránh lãng phí.

“Reserved instances” hoặc “savings plans” là gì?

Đây là các cam kết dài hạn (1 hoặc 3 năm) với nhà cung cấp cloud, cho mức giảm giá đáng kể so với trả tiền theo từng lúc sử dụng.

Công cụ giúp gì với tài nguyên không dùng?

Nó xác định và gợi ý xóa các tài nguyên đang được gắn nhưng không được sử dụng, như ổ đĩa ảo hoặc địa chỉ IP chưa được phân bổ.

Chi tiết

Mô tả gốc của tác giả

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.

repo: wshobson/agents

Độ phổ biến

Sao GitHub
41k
Vị trí xếp hạng
#6657
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự