From aws-skills-for-claude-code
Analyzes AWS costs, billing, and pricing using boto3 and AWS CLI. Provides queries for cost explorer, service breakdowns, forecasts, pricing lookups, anomalies, and free tier usage.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aws-skills-for-claude-code:aws-costThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- "이번 달 비용 보여줘" / "Show this month's costs"
aws ce get-cost-and-usage \
--time-period Start=$(date -d "$(date +%Y-%m-01)" +%Y-%m-%d),End=$(date +%Y-%m-%d) \
--granularity MONTHLY \
--metrics "BlendedCost" "UnblendedCost"
import boto3
from datetime import date
ce = boto3.client('ce')
today = date.today()
first_day = today.replace(day=1).isoformat()
ce.get_cost_and_usage(
TimePeriod={'Start': first_day, 'End': today.isoformat()},
Granularity='MONTHLY',
Metrics=['BlendedCost', 'UnblendedCost']
)
ce.get_cost_and_usage(
TimePeriod={'Start': '2026-03-01', 'End': '2026-03-08'},
Granularity='DAILY',
Metrics=['BlendedCost'],
GroupBy=[{'Type': 'DIMENSION', 'Key': 'SERVICE'}]
)
ce.get_cost_forecast(
TimePeriod={'Start': today.isoformat(), 'End': today.replace(month=today.month+1, day=1).isoformat()},
Metric='BLENDED_COST',
Granularity='MONTHLY'
)
ce.get_cost_and_usage(
TimePeriod={'Start': first_day, 'End': today.isoformat()},
Granularity='MONTHLY',
Metrics=['BlendedCost'],
GroupBy=[{'Type': 'TAG', 'Key': 'Environment'}]
)
pricing = boto3.client('pricing', region_name='us-east-1')
# List services / 서비스 목록
pricing.describe_services(MaxResults=10)
# EC2 pricing example / EC2 가격 예시
pricing.get_products(
ServiceCode='AmazonEC2',
Filters=[
{'Type': 'TERM_MATCH', 'Field': 'instanceType', 'Value': 't3.medium'},
{'Type': 'TERM_MATCH', 'Field': 'location', 'Value': 'Asia Pacific (Seoul)'},
{'Type': 'TERM_MATCH', 'Field': 'operatingSystem', 'Value': 'Linux'},
],
MaxResults=5
)
billing = boto3.client('billingconductor')
billing.list_billing_groups()
billing.list_account_associations()
ce.get_anomalies(
DateInterval={'StartDate': '2026-03-01', 'EndDate': '2026-03-08'},
MaxResults=10
)
ft = boto3.client('freetier')
ft.get_free_tier_usage()
| Task / 작업 | CLI Command / CLI 명령 |
|---|---|
| Monthly cost / 월간 비용 | aws ce get-cost-and-usage --time-period Start=2026-03-01,End=2026-03-31 --granularity MONTHLY --metrics BlendedCost |
| Daily breakdown / 일별 분석 | Add --granularity DAILY |
| By service / 서비스별 | Add --group-by Type=DIMENSION,Key=SERVICE |
| By region / 리전별 | Add --group-by Type=DIMENSION,Key=REGION |
| By account / 계정별 | Add --group-by Type=DIMENSION,Key=LINKED_ACCOUNT |
npx claudepluginhub whchoi98/aws-skills-for-claude-code --plugin aws-skills-for-claude-codeAnalyzes AWS costs, identifies savings, manages budgets, evaluates Savings Plans/Reserved Instances, right-sizes EC2/Lambda/RDS/EBS via Compute Optimizer, queries CUR with Athena, detects anomalies, scopes to billing views, monitors Free Tier.
Analyzes AWS spending, detects idle resources, and provides cost optimization recommendations using AWS CLI and Cost Explorer.
Provides structured AWS cost optimization via five pillars (right-sizing, elasticity, pricing, storage, monitoring) and 12 best practices with AWS CLI examples. For reviewing spending, unused resources, FinOps.