用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/firstbatchxyz/kai --skill aws-cost-optimizer命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Inspect and analyze codebases using pygount for LOC counting, language breakdown, and code-vs-comment ratios. Use when asked to check lines of code, repo size, language composition, or codebase stats.
Set up GitHub authentication for the agent using git (universally available) or the gh CLI. Covers HTTPS tokens, SSH keys, credential helpers, and gh auth — with a detection flow to pick the right method automatically.
Production-grade PR review with execution-verified suggestions. Reads repository conventions, history, and security surfaces before reviewing. For every suggested fix, attempts to compile and test it in the sandbox — the comment includes proof. Modelled on GitHub Copilot's agentic architecture with one critical advantage: the sandbox is already running.
基于 SOC 职业分类
正在显示 SKILL.md
| name | aws-cost-optimizer |
| description | Analyze AWS costs, find waste, and recommend optimizations using read-only MCP tools |
| version | 1.0.0 |
| author | kai-agent |
| metadata | {"kai":{"tags":["kai","aws","cost","optimization","finops"],"related_skills":["aws-performance"]}} |
Analyze AWS spending, identify waste, and recommend cost optimizations. All operations are read-only — no changes are made to infrastructure.
mcp__kai__aws_*Get a snapshot of current spending and trend.
Get last 30 days of costs:
aws_cost_summary(workspaceId, startDate="YYYY-MM-DD", endDate="YYYY-MM-DD")
Forecast next 30 days:
aws_cost_forecast(workspaceId, startDate="today", endDate="+30d", granularity="MONTHLY")
Present findings as a table:
| Service | Last 30d | Forecast | Trend |
|---|
Systematically identify unused/idle resources.
Unused EBS volumes (easy win):
aws_ec2_unused_volumes(workspaceId)
Each unattached volume costs money. Calculate: size_gb * $0.10/month
Unattached Elastic IPs:
aws_ec2_unattached_eips(workspaceId)
Each costs ~$3.65/month
Idle EC2 instances (biggest savings potential):
aws_ec2_list_instances(workspaceId, state="running")
Then for each instance, check CPU over 7 days:
aws_cloudwatch_get_metrics(
workspaceId, namespace="AWS/EC2", metricName="CPUUtilization",
dimensions=[{"name":"InstanceId","value":"i-xxx"}],
startTime="-7d", endTime="now", period=3600, statistics=["Average"]
)
Oversized Lambda functions:
aws_lambda_list_functions(workspaceId)
Then check actual duration vs configured memory:
aws_cloudwatch_get_metrics(
workspaceId, namespace="AWS/Lambda", metricName="Duration",
dimensions=[{"name":"FunctionName","value":"xxx"}],
startTime="-7d", endTime="now", period=86400, statistics=["Average","Maximum"]
)
Find gaps in Reserved Instances / Savings Plans.
RI coverage:
aws_reservation_coverage(workspaceId, startDate="-30d", endDate="today")
Savings Plans coverage:
aws_savings_plans_coverage(workspaceId, startDate="-30d", endDate="today")
List all buckets:
aws_s3_list_buckets(workspaceId)
Analyze each significant bucket:
aws_s3_bucket_analysis(workspaceId, bucketName="xxx")
Present findings as:
Current monthly spend: $X,XXX Estimated monthly savings: $XXX (X%)
| Finding | Service | Monthly Cost | Savings | Severity |
|---|---|---|---|---|
| 5 unused EBS volumes | EC2 | $50 | $50 | Low |
| 3 idle instances (CPU <5%) | EC2 | $450 | $300 | High |
| No lifecycle rules on logs bucket | S3 | $200 | $150 | Medium |
Recommendations (by impact):