Token导航 LogoToken导航TokenDH.com
运维和基础设施需要联网github未标认证来源可访问clear审计未展示

aws-cost-expertAWS cost expert 部署

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

582

周安装

25

GitHub Stars

127

下载量

204
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:aws-cost-expert(AWS cost expert 部署)
来源仓库:https://github.com/anton-abyzov/specweave
仓库路径:skills/aws-cost-expert
安装命令:
npx skills add https://github.com/anton-abyzov/specweave --skill aws-cost-expert
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/anton-abyzov/specweave --skill aws-cost-expert

简介

提供针对 AWS 特定服务的精细化成本分析与优化策略建议。

  • 支持按服务、实例类型或时间维度拆解费用,识别异常消费趋势与高成本区域。
  • 推荐 Savings Plans、Reserved Instances 或 Spot Instance 等采购模型以降低长期支出。
  • 需配合 Cost Explorer API 获取原始账单数据,并结合业务负载特征提出调整方案。
  • 优化决策应权衡性能、可用性与成本三者关系,避免过度压缩导致稳定性风险。

SKILL.md

AWS Cost Optimization Expert

Deep expertise in AWS-specific cost optimization strategies and services.

AWS Cost Management Services

1. Cost Explorer

# Get monthly costs by service
aws ce get-cost-and-usage \
  --time-period Start=2025-01-01,End=2025-02-01 \
  --granularity MONTHLY \
  --metrics BlendedCost \
  --group-by Type=SERVICE

# Get EC2 costs by instance type
aws ce get-cost-and-usage \
  --time-period Start=2025-01-01,End=2025-02-01 \
  --granularity DAILY \
  --metrics UnblendedCost \
  --filter file://ec2-filter.json \
  --group-by Type=INSTANCE_TYPE

2. AWS Budgets

Budget Configuration:
  - Monthly budget: $30,000
  - Alert at 80% ($24,000)
  - Alert at 90% ($27,000)
  - Alert at 100% ($30,000)
  - Alert at 110% ($33,000) - critical

Actions:
  - Stop non-production instances
  - Deny new resource creation
  - Email C-level executives

3. Compute Optimizer

# Get EC2 right-sizing recommendations
aws compute-optimizer get-ec2-instance-recommendations \
  --max-results 100

# Get Lambda function recommendations
aws compute-optimizer get-lambda-function-recommendations

4. Trusted Advisor

# Get cost optimization checks
aws support describe-trusted-advisor-checks \
  --language en \
  --query 'checks[?category==`cost_optimizing`]'

# Check results
aws support describe-trusted-advisor-check-result \
  --check-id <check-id>

EC2 Cost Optimization

Savings Plans vs Reserved Instances

interface Comparison {
  option: string;
  flexibility: string;
  discount: string;
  commitment: string;
  bestFor: string;
}

const options: Comparison[] = [
  {
    option: 'On-Demand',
    flexibility: 'Maximum',
    discount: '0%',
    commitment: 'None',
    bestFor: 'Unpredictable workloads',
  },
  {
    option: 'Spot Instances',
    flexibility: 'Medium',
    discount: '50-90%',
    commitment: 'None',
    bestFor: 'Fault-tolerant batch workloads',
  },
  {
    option: 'Compute Savings Plans',
    flexibility: 'High (any instance, any region)',
    discount: '30-70%',
    commitment: '1 or 3 years',
    bestFor: 'Flexible compute usage',
  },
  {
    option: 'EC2 Instance Savings Plans',
    flexibility: 'Medium (same instance family, same region)',
    discount: '35-72%',
    commitment: '1 or 3 years',
    bestFor: 'Consistent instance family usage',
  },
  {
    option: 'Reserved Instances',
    flexibility: 'Low (specific instance type)',
    discount: '40-75%',
    commitment: '1 or 3 years',
    bestFor: 'Predictable, steady-state workloads',
  },
];

Graviton Instances (ARM)

Benefits:
  - 20% better price/performance vs x86
  - 40% better price/performance for many workloads
  - Lower power consumption

Migration:
  - t4g (general purpose, burstable)
  - m6g (balanced)
  - c6g (compute optimized)
  - r6g (memory optimized)

Compatibility:
  - Most Linux distributions
  - Container workloads (Docker, ECS, EKS)
  - Not for: Windows, x86-only software

Lambda Cost Optimization

Power Tuning

// Use AWS Lambda Power Tuning tool
// https://github.com/alexcasalboni/aws-lambda-power-tuning

interface PowerTuningResult {
  optimalMemory: number;
  currentCost: number;
  optimalCost: number;
  savings: number;
}

// Example: Image processing function
const result: PowerTuningResult = {
  optimalMemory: 2048, // MB
  currentCost: 0.0000133, // per invocation at 1024MB
  optimalCost: 0.0000119, // per invocation at 2048MB
  savings: 10.5, // % (faster execution despite higher memory cost)
};

Lambda Cost Optimization Checklist

Memory Optimization:
  - ✅ Run power tuning for all production functions
  - ✅ Monitor cold start vs warm execution cost
  - ✅ Consider provisioned concurrency for latency-sensitive APIs

Architecture:
  - ✅ Avoid VPC Lambda unless necessary (saves NAT costs)
  - ✅ Use Lambda Layers for shared dependencies
  - ✅ Enable Lambda SnapStart for Java functions (faster cold starts)

Invocation:
  - ✅ Batch process vs streaming (fewer invocations)
  - ✅ Async invocation where possible
  - ✅ Use Step Functions for orchestration (not nested Lambdas)

S3 Cost Optimization

Intelligent-Tiering

Automatic Cost Optimization:
  - Frequent Access tier (default)
  - Infrequent Access tier (30 days no access)
  - Archive Instant Access (90 days)
  - Archive Access (90-730 days, optional)
  - Deep Archive Access (180-730 days, optional)

Monitoring fee: $0.0025 per 1000 objects
Cost: Worth it for > 128KB objects with unpredictable access

Best for:
  - Unknown access patterns
  - Data lakes
  - Long-term storage with occasional access

Lifecycle Policy Example

{
  "Rules": [
    {
      "Id": "Optimize application logs",
      "Status": "Enabled",
      "Filter": { "Prefix": "logs/app/" },
      "Transitions": [
        { "Days": 30, "StorageClass": "STANDARD_IA" },
        { "Days": 90, "StorageClass": "GLACIER_IR" },
        { "Days": 365, "StorageClass": "DEEP_ARCHIVE" }
      ],
      "Expiration": { "Days": 2555 }
    },
    {
      "Id": "Delete incomplete multipart uploads",
      "Status": "Enabled",
      "AbortIncompleteMultipartUpload": {
        "DaysAfterInitiation": 7
      }
    }
  ]
}

RDS Cost Optimization

Reserved Instance vs Aurora Serverless

interface DBCostComparison {
  option: string;
  monthlyCost: number;
  usagePattern: string;
  pros: string[];
  cons: string[];
}

const comparison: DBCostComparison[] = [
  {
    option: 'On-Demand (db.t3.medium)',
    monthlyCost: 50,
    usagePattern: 'Variable, testing',
    pros: ['No commitment', 'Easy to change'],
    cons: ['Highest cost'],
  },
  {
    option: 'Reserved Instance 1yr (db.t3.medium)',
    monthlyCost: 32,
    usagePattern: 'Steady-state, 24/7',
    pros: ['36% savings', 'Predictable cost'],
    cons: ['1-year commitment', 'Capacity reserved'],
  },
  {
    option: 'Aurora Serverless v2',
    monthlyCost: 15,
    usagePattern: 'Intermittent, dev/test',
    pros: ['Auto-scaling', 'Pay per ACU-second', '70% savings for low usage'],
    cons: ['Cold start latency', 'Not for steady 24/7'],
  },
];

RDS Storage Optimization

Storage Types:
  gp2 (General Purpose SSD):
    - $0.115/GB/month
    - 3 IOPS per GB (min 100, max 16,000)
    - Burstable to 3,000 IOPS

  gp3 (Newer General Purpose SSD):
    - $0.08/GB/month (30% cheaper!)
    - 3,000 IOPS baseline (free)
    - 125 MB/s throughput (free)
    - Additional IOPS: $0.005 per IOPS/month
    - Additional throughput: $0.04 per MB/s/month

  io1/io2 (Provisioned IOPS):
    - $0.125/GB + $0.065 per IOPS
    - For high-performance databases

Migration: gp2 → gp3 saves 30% with no performance impact

DynamoDB Cost Optimization

On-Demand vs Provisioned

// Decision matrix
function chooseBillingMode(usage: UsagePattern): string {
  const { requestsPerDay, peakTPS, averageTPS, predictability } = usage;

  // On-demand if:
  // - Unpredictable traffic
  // - Spiky workloads
  // - New applications
  // - < 20% peak utilization

  if (predictability < 0.5 || (peakTPS / averageTPS) > 2) {
    return 'On-Demand';
  }

  // Provisioned if:
  // - Predictable traffic
  // - Steady-state workloads
  // - High utilization (> 20%)

  if (predictability > 0.7 && (peakTPS / averageTPS) < 2) {
    return 'Provisioned (with auto-scaling)';
  }

  return 'On-Demand (then migrate to Provisioned after 3 months)';
}

Reserved Capacity

Savings: 53-76% discount
Commitment: 1 year
Minimum: 100 WCU or RCU

Cost Comparison (100 WCU):
  - On-Demand: $1.25 per 1M writes = $3,600/month (100 writes/sec)
  - Provisioned: 100 WCU * $0.00065/hour * 730 = $47.45/month
  - Reserved: $47.45 * 0.47 = $22.30/month

Best for: Predictable write-heavy workloads

Cost Anomaly Detection

Setup

# Create anomaly monitor
aws ce create-anomaly-monitor \
  --anomaly-monitor Name=ProductionMonitor,MonitorType=DIMENSIONAL,MonitorDimension=SERVICE

# Create anomaly subscription
aws ce create-anomaly-subscription \
  --anomaly-subscription Name=ProductionAlerts,MonitorArnList=arn:aws:ce::123456789012:anomalymonitor/abc123,Subscribers=[{Address=team@example.com,Type=EMAIL}],Threshold=100

Anomaly Patterns

Common Anomalies:
  - Unexpected EC2 instance launches (compromised credentials)
  - Data transfer spikes (DDoS, misconfigured app)
  - Lambda invocation explosion (infinite loops)
  - S3 GET request flood (hotlinked content)
  - RDS storage growth (missing retention policies)

Alert Thresholds:
  - Service cost: > 50% increase from baseline
  - Daily spend: > 20% above 7-day average
  - Total cost: > 10% above monthly forecast

Tagging Strategy for Cost Allocation

Tag Policy

Required Tags (enforced via AWS Config):
  Environment: [prod, staging, dev, test]
  Team: [platform, api, frontend, data]
  Project: [alpha, beta, gamma]
  CostCenter: [engineering, product, sales]
  Owner: [email@example.com]

Auto-Tagging:
  - Use AWS Organizations tag policies
  - Terraform: default_tags in provider
  - CloudFormation: Tags parameter
  - Lambda: Environment variables → tags

Cost Allocation Tags

# Activate cost allocation tags
aws ce update-cost-allocation-tags-status \
  --cost-allocation-tags-status TagKey=Environment,Status=Active TagKey=Team,Status=Active

# View costs by tag
aws ce get-cost-and-usage \
  --time-period Start=2025-01-01,End=2025-02-01 \
  --granularity MONTHLY \
  --metrics BlendedCost \
  --group-by Type=TAG,Key=Environment

AWS-Specific Best Practices

Multi-Account Strategy

Organization Structure:
  - Management account (billing only)
  - Production account (prod workloads)
  - Staging account (pre-prod)
  - Development account (dev/test)
  - Shared Services account (logging, monitoring)

Benefits:
  - Consolidated billing (volume discounts)
  - Reserved Instance sharing across accounts
  - Savings Plans apply organization-wide
  - Isolated blast radius
  - Clear cost attribution

AWS Free Tier Monitoring

# Set up budget for free tier limits
aws budgets create-budget \
  --account-id 123456789012 \
  --budget file://free-tier-budget.json \
  --notifications-with-subscribers file://free-tier-alerts.json

Optimize AWS costs like a cloud financial engineer!

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.1%
按下载量换算59

Gemini CLI

22.32%
按下载量换算46

Antigravity

18.91%
按下载量换算39

Codex

11.6%
按下载量换算24

Cursor

7.85%
按下载量换算16

OpenCode

3.6%
按下载量换算7

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills