用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/firstbatchxyz/kai --skill aws-performance命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 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-performance |
| description | Monitor and analyze AWS infrastructure performance using read-only MCP tools |
| version | 1.0.0 |
| author | kai-agent |
| metadata | {"kai":{"tags":["kai","aws","performance","monitoring","cloudwatch"],"related_skills":["aws-cost-optimizer"]}} |
Monitor health and performance of AWS infrastructure. All operations are read-only — no changes are made.
mcp__kai__aws_*Get a complete picture of what's running.
aws_ec2_list_instances(workspaceId, state="running") # Compute
aws_ecs_list_services(workspaceId) # Containers
aws_lambda_list_functions(workspaceId) # Serverless
aws_rds_list_instances(workspaceId) # Databases
aws_elb_list(workspaceId) # Load balancers
aws_cloudformation_list_stacks(workspaceId) # IaC stacks
Present as a summary table:
| Service | Count | Key Details |
|---|
Service status:
aws_ecs_list_services(workspaceId)
runningCount < desiredCountpendingCount > 0 for extended timeRecently crashed tasks:
aws_ecs_list_tasks(workspaceId, desiredStatus="STOPPED")
stoppedReason for OOM kills or task failuresResource utilization (CPU + Memory):
aws_cloudwatch_get_metrics(
workspaceId, namespace="AWS/ECS", metricName="CPUUtilization",
dimensions=[{"name":"ClusterName","value":"xxx"},{"name":"ServiceName","value":"yyy"}],
startTime="-24h", endTime="now", period=300
)
Repeat for MemoryUtilization.
For each running instance:
aws_cloudwatch_get_metrics(workspaceId, namespace="AWS/EC2", metricName="CPUUtilization",
dimensions=[{"name":"InstanceId","value":"i-xxx"}],
startTime="-7d", endTime="now", period=3600, statistics=["Average","Maximum"])
Also check:
NetworkIn / NetworkOut — network bottlenecksEBSReadOps / EBSWriteOps — disk I/O pressureDecision matrix:
| Avg CPU | Max CPU | Recommendation |
|---|---|---|
| <10% | <30% | Downsize or stop |
| 10-60% | <80% | Right-sized |
| >60% | >80% | Consider upgrading |
| >80% | >95% | Upgrade urgently |
List functions:
aws_lambda_list_functions(workspaceId)
For each function, check metrics:
aws_cloudwatch_get_metrics(workspaceId, namespace="AWS/Lambda",
metricName="Duration", # also: Errors, Throttles, ConcurrentExecutions
dimensions=[{"name":"FunctionName","value":"xxx"}],
startTime="-7d", endTime="now", period=86400, statistics=["Average","Maximum","Sum"])
Flags:
List databases:
aws_rds_list_instances(workspaceId)
For each DB, check CloudWatch:
CPUUtilization — sustained >80% is a problemDatabaseConnections — compare to max_connections settingFreeableMemory — low = swap riskReadIOPS / WriteIOPS — I/O bottlenecksaws_cloudwatch_get_metrics(workspaceId, namespace="AWS/RDS",
metricName="CPUUtilization",
dimensions=[{"name":"DBInstanceIdentifier","value":"xxx"}],
startTime="-24h", endTime="now", period=300)
List LBs:
aws_elb_list(workspaceId)
Check target health:
aws_elb_target_health(workspaceId, targetGroupArn="arn:xxx")
Check latency (CloudWatch):
aws_cloudwatch_get_metrics(workspaceId, namespace="AWS/ApplicationELB",
metricName="TargetResponseTime",
dimensions=[{"name":"LoadBalancer","value":"app/xxx/yyy"}],
startTime="-24h", endTime="now", period=300, statistics=["Average","Maximum"])
HTTPCode_Target_5XX_Count for error spikesSecurity groups:
aws_ec2_security_groups(workspaceId)
0.0.0.0/0 on ports other than 80, 4430.0.0.0/0 on SSH (22) or RDP (3389)IAM users:
aws_iam_list_users(workspaceId)
passwordLastUsed: "never" — unused accountsIAM roles overview:
aws_iam_list_roles(workspaceId)
| Service | Namespace | Common Metrics | Dimension |
|---|---|---|---|
| EC2 | AWS/EC2 | CPUUtilization, NetworkIn, NetworkOut, DiskReadOps | InstanceId |
| ECS | AWS/ECS | CPUUtilization, MemoryUtilization | ClusterName, ServiceName |
| Lambda | AWS/Lambda | Duration, Errors, Throttles, Invocations, ConcurrentExecutions | FunctionName |
| RDS | AWS/RDS | CPUUtilization, DatabaseConnections, FreeableMemory, ReadIOPS, WriteIOPS | DBInstanceIdentifier |
| ALB | AWS/ApplicationELB | TargetResponseTime, HTTPCode_Target_5XX_Count, RequestCount | LoadBalancer |
| NLB | AWS/NetworkELB | ActiveFlowCount, ProcessedBytes | LoadBalancer |
| S3 | AWS/S3 | BucketSizeBytes, NumberOfObjects | BucketName, StorageType |
Overall status: Healthy / Warning / Critical
| Resource | Service | Status | Issue | Severity |
|---|---|---|---|---|
| i-abc123 | EC2 | Warning | CPU avg 85% over 7d | High |
| my-service | ECS | Critical | 2/4 tasks running | Critical |
| auth-fn | Lambda | Warning | Error rate 8% | High |
Immediate actions needed:
Monitoring recommendations: