一键导入
use-eks-via-call-kubectl
Use when any task involves inspecting EKS pod status, pod events,
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when any task involves inspecting EKS pod status, pod events,
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
End-to-end deployment knowledge for wiring AWS DevOps Agent to a self-hosted MCP Server bridge into AWS China region accounts. Use this skill whenever the user wants to "部署", "deploy", "配置", "set up", "接入", "onboard", "加账号", "add account", "rotate cert", "轮换证书", or troubleshoot the MCP bridge (ECS Fargate + internal ALB + VPC Lattice Private Connection + IAM Roles Anywhere). It covers the full lifecycle: network, certificates, Hub/Spoke Roles Anywhere, ECS deploy, Agent Space registration, and day-2 ops. The skill encodes the exact commands, decision points, and known pitfalls (RequestExpired credential refresh, Private-Connection-blocks-SG-delete, ECR token expiry, DNS resolution = Public). It does NOT itself run commands — it is the knowledge the deploy agent follows.
Proactive prevention and pre-alarm health checks across the two China region accounts (aws-cn and aws-cn-2). Use this skill when the user asks about prevention, 防护, 预防, proactive, 体检, health check, risk assessment, 潜在风险, 隐患, or "what might break soon", and when the Evaluation agent runs scheduled recommendation workflows. Looks for conditions that predict future incidents — single points of failure, service quotas nearing limits, stale AMIs, aging credentials, certificates expiring within 30 days, deprecated Lambda runtimes. This skill is distinct from cross-account-security-posture-check, which reports current-state security risk. Prevention predicts future failure; security posture describes current exposure.
First-response triage for an incoming alarm, ticket, or failure report originating from either China account (aws-cn or aws-cn-2). Use this skill when the trigger is an alarm name, CloudWatch alarm payload, SIM ticket body, error log snippet, or a user phrase such as 告警, 出事了, 服务挂了, incident, triage, 分类, 初步判断, 看一下这个告警, what happened. Determines which of the two accounts is affected, classifies the incident into one of six classes (compute / network / identity-credentials / data / cost / unknown), estimates severity from the signal, and checks whether a similar incident fired recently so duplicates are marked. Output is a short triage card that hands off to RCA or mitigation depending on severity. This skill is the entry point of the incident response pipeline.
Routing and disambiguation guidance for the two AWS China region MCP servers exposed by this Agent Space. Use this skill whenever the user's request mentions "中国区", "China", "cn-north-1", "cn-northwest-1", "Beijing", "Ningxia", or any AWS resource that must resolve to a specific China partition account. The skill explains which MCP endpoint maps to which account, how to pick when the user does not specify, and how to label cross-account results so the user can tell them apart.
Draft step-by-step mitigation CLI commands for a root-caused incident in either China account (aws-cn or aws-cn-2). Use this skill after RCA has identified the root cause, when the user asks for mitigation, remediation, 缓解, 修复, 回滚, rollback, restore service, 怎么修, fix it, 怎么办. Covers common mitigation patterns such as credential rotation, Kubernetes pod rollout-restart, ALB target group reattach, security group rule revoke, IAM policy rollback, and safe CloudFormation stack rollback. Output always includes the exact CLI command, a one-line explanation of what it changes, a rollback/undo command, and an explicit human approval prompt. CRITICAL — this skill NEVER executes commands autonomously; every mitigation step requires explicit user approval before running.
Root cause analysis for a triaged incident in either China account (aws-cn or aws-cn-2). Use this skill after triage has produced a Triage Card, or when the user directly asks RCA, 根本原因, 根因, 为什么挂, why did X fail, deep dive, deep investigation, 深入分析, dig into, 调查. Correlates the CloudTrail API log window around the incident, recent deploy events (CloudFormation stack events, CodeDeploy, ECR pushes, Lambda updates), metric anomalies against prior-week baseline, and cross-account blast radius — specifically, whether the same failure pattern also hit the other China account around the same time, which would suggest a shared upstream cause (IAM partition-wide, AWS region event, or common dependency). Produces a single root-cause hypothesis plus the evidence chain. Does NOT execute remediation.
| name | use-eks-via-call-kubectl |
| description | Use when any task involves inspecting EKS pod status, pod events, |
use_kubectl fails hereuse_kubectl is a platform-level tool with a hardcoded account allowlist
limited to the global (aws) partition. The cluster bjs-web lives in
account <CN_N_ACCOUNT_ID>, cn-north-1 (aws-cn partition). Token-based EKS
authentication cannot cross partition boundaries.
Do not retry use_kubectl with any account ID. It will never work.
call_kubectlThe aws-cn-2 MCP server exposes a call_kubectl tool alongside call_aws.
Same connection, same endpoint — no additional MCP server needed.
Allowed verbs: get, describe, logs, top, explain,
version, cluster-info, api-resources, api-versions
Write verbs (apply, delete, patch, exec, etc.) are blocked by the
tool itself — output them as a draft command for human approval instead.
| Original intent | Use this instead |
|---|---|
kubectl get pods -n bjs-web -o wide | call_kubectl("kubectl get pods -n bjs-web -o wide") |
kubectl describe pod <pod> -n bjs-web | call_kubectl("kubectl describe pod <pod> -n bjs-web") |
kubectl logs <pod> -n bjs-web --since=1h | call_kubectl("kubectl logs <pod> -n bjs-web --since=1h") |
kubectl get events -n bjs-web --sort-by=.lastTimestamp | call_kubectl("kubectl get events -n bjs-web --sort-by=.lastTimestamp") |
kubectl get deployments -n bjs-web | call_kubectl("kubectl get deployments -n bjs-web") |
For a pod-not-ready alarm on bjs-web:
# 1. Pod overview
call_kubectl("kubectl get pods -n bjs-web -o wide")
# 2. For any non-Running pod, describe it
call_kubectl("kubectl describe pod <pod-name> -n bjs-web")
# 3. Events (sorted by time)
call_kubectl("kubectl get events -n bjs-web --sort-by=.lastTimestamp")
# 4. Deployment status
call_kubectl("kubectl get deployments -n bjs-web")
# 5. Logs if pod is running or was recently running
call_kubectl("kubectl logs <pod-name> -n bjs-web --since=30m")
| What you see in describe/events | Root cause |
|---|---|
ImagePullBackOff / ErrImagePull | Image tag does not exist in ECR — fault L6 |
OOMKilled | Memory limit hit — fault L9 neighbourhood |
CrashLoopBackOff | Container exits — check logs next |
Insufficient cpu / Insufficient memory | Node resource exhausted |
FailedScheduling | No schedulable node |
use_kubectl for China-region EKS. Ever.call_kubectl already
lives inside the existing aws-cn-2 connection.call_aws + CloudWatch as a kubectl substitute — call_kubectl
gives direct Kubernetes API access and is more accurate.call_kubectl — they are blocked. Draft
the remediation command and request human approval via the mitigation skill.