Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ascend-k8s-check-fix
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Shell scripts
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/k8s-check-fix
What's inside
- Skill name
k8s-check-fix- Description
- Kubernetes 集群健康检查与安全修复 — 诊断问题,用户确认后执行修复
- License
- MulanPSL-2.0
- Instructions
- 195 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (36)
- CHANGELOG.md
- SECURITY.md
- SKILL.md
- config.json
- examples.md
- gotchas.md
- README.md · references/
- deployment_checks.md · references/
- apiserver_cert_expired.md · references/faults/
- cni_failure.md · references/faults/
- etcd_cluster_failure.md · references/faults/
- kubelet_cert_expired.md · references/faults/
- scheduler_failure.md · references/faults/
- worker_node_down.md · references/faults/
- network_checks.md · references/
- node_checks.md · references/
- pod_checks.md · references/
- security_notes.md · references/
- k8s-check-fix.sh · scripts/
- preflight.sh · scripts/lib/
- ask_user.sh · scripts/lib/
- common.sh · scripts/lib/
- config_loader.sh · scripts/lib/
- k8s_utils.sh · scripts/lib/
- remote.sh · scripts/lib/
- deploy.sh · scripts/subcommands/
- events.sh · scripts/subcommands/
- fix.sh · scripts/subcommands/
- pod.sh · scripts/subcommands/
- resources.sh · scripts/subcommands/
- sweep.sh · scripts/subcommands/
- deployment_report_template.md · templates/
- fix_plan_template.md · templates/
- pod_autopsy_template.md · templates/
- report_templates.md · templates/
- style_guide.md · templates/
SKILL.md (first lines)
# k8s-check-fix — Kubernetes 集群诊断与安全修复 该工具可以执行 Kubernetes 集群诊断(全面健康检查、Pod 深入排查、Deployment 分析、资源压力检测、事件监控),并且在**用户明确批准后**执行安全修复操作。 ## 执行原则 > 1. **每个 kubectl 命令调用必须设置超时(例如 30 秒)**。如果命令在超时内未返回,立即向用户报告“命令执行超时,可能是 API Server 无响应”,并**停止当前技能**。 > 2. **任何子命令失败(返回非零退出码或 JSON 错误字段)**,立即报告错误详情,**不要自动重试**,并询问用户是否继续。 > 3. **如果用户没有明确要求继续,默认停止技能**,避免陷入无意义的重试循环。 > 4. **禁止连续调用超过 3 个子命令而不给用户反馈**。每执行一个命令,必须将结果(哪怕是中间结果)以 Markdown 形式展示给用户。 > 5. **如果某个子命令预计耗时超过 10 秒**(例如 `sweep` 在大集群中),必须先向用户发送“正在执行,请稍候...”消息,再调用命令。 ## 触发条件 在以下情况下使用此技能: - 用户要求**检查、诊断或修复** Kubernetes 集群、节点、Pod 或 Deployment。 - 用户报告的症状包括:Pod 频繁重启、节点状态 `NotReady`、`kubectl` 命令执行失败、滚动更新卡住、网络问题等。 - 用户提供了 kubectl 错误信息,或提到某个资源处于不健康状态。 - 用户描述模糊,如“我的集群出问题了”或“帮我调试 Kubernetes”。 **不要**在以下情况使用此技能: - 用户询问的是非 Kubernetes 基础设施(例如 Docker Compose、不包含 K8s 的云虚拟机)。 - 用户只想查看运行中容器的日志,无需诊断(应使用通用日志技能)。 - 用户只是想激活该技能而不是使用该技能 ## 配置与首次运行设置 在开始诊断前,检查技能目录下是否存在 `config.json`。如果文件不存在或缺少必要字段,使用 `AskUserQuestion` 收集以下信息: - **默认 Kubernetes 上下文** – 从可用上下文中提供多选列表(通过 `kubectl config get-contexts -o name` 获取)。 - **默认命名空间** – 可选,用于限定操作范围。 - **自动确认修复** – 默认 `false`。警告用户开启自动确认非常危险。 - **只读模式** – 默认 `false`。如果设置为 `true`,将阻止 `fix` 子命令执行。 将答案写入 `config.json`。后续调用将读取这些值作为默认值,除非用户通过标志参数覆盖。 如果 `config.json` 存在但解析失败(JSON 格式错误),报告具体错误并停止技能,不要尝试默认值。 ## 核心原则 1. **默认只读** – 所有诊断命令(`sweep`, `pod`, `deploy`, `resources`, `events`)均为安全只读操作。 2. **写操作需显式批准** – 仅当用户明确说“是”后,才能使用 `fix` 子命令加 `--confirm` 标志执行。 3. **严格写操作白名单** – 仅允许 `rollout undo`、`rollout restart`、`scale`、`delete pod`、`cordon`、`uncordon`。 4. **绝不执行 `kubectl exec`**。 5. **尊重用户上下文** – 使用 `--context` 和 `--namespace` 标志限制操作范围。 6. **所有输出为 JSON** – 解析后以整洁的 Markdown 呈现。 ## 故障专项指南 此技能包含常见控制平面和节点故障的详细恢复指南。**不要一次性读取所有指南**,请遵循以下工作流: 1. **先执行 `sweep`** 获取整体情况。 2. **确定主要问题**(例如 etcd 集群故障、scheduler 未运行、节点 `NotReady`、CNI 问题等)。 3. **仅读取相关故障指南**(位于 `guides/faults/` 目录)以了解诊断步骤和修复选项。(如果所需的指南文件不存在,报告“缺少故障指南文件:xxx.md,无法提供详细修复步骤”,并仅基于通用知识给出建议,不要反复尝试读取。) - etcd 多数节点故障 → `etcd_cluster_failure.md` - API Server 证书过期 → `apiserver_cert_expired.md` - Scheduler 工作异常 → `scheduler_failure.md` - Worker 节点宕机 → `worker_node_down.md` - Kubelet 证书过期 → `kubelet_cert_expired.md` - CNI 插件故障 → `cni_failure.md` 4. **按照指南中的诊断步骤**收集更多数据(例如使用 `pod`、`deploy`、`resources` 子命令)。 5. **提出修复方案**,引用指南中的建议,展示具体命令和风险。 6. **等待用户确认**后方可执行任何写操作。 7. **执行修复**:通过 `fix` 子命令(如果允许)或指导用户手动执行命令。 8. **验证**集群恢复正常。 ## 工具使用方法 `k8s_check_fix` 可作为类似 Python 的函数调用。示例: ``` # 全集群健康检查 k8s_check_fix(subcommand="sweep", context="prod") # 深入排查问题 Pod k8s_check_fix(subcommand="pod", target="api-7f8d4-x2k9p", namespace="prod", tail=500) # Deployment 状态 k8s_check_fix(subcommand="deploy", target="my-app", namespace="default") # 资源压力分析 k8s_check_fix(subcommand="resources") # 近期事件(最近一小时) k8s_check_fix(subcommand="events", since="1h") # 安全修复(用户批准后) k8s_check_fix(subcommand="fix", target="kubectl rollout undo deployment/my-app -n prod", confirm=True) ``` 所有子命令返回 JSON 格式数据。解析后使用表格、列表、代码块等 Markdown 格式呈现给用户。 ## 常见场景处理 ### “我的集群出问题了” 1. 执行 `sweep`。 2. 如果存在问题 Pod,对最严重的 Pod 执行 `pod` 深入排查。 3. 如果节点状态为 `NotReady`,读取 `worker_node_down.md` 和 `kubelet_cert_expired.md`。 4. 如果没有 Pod 被调度,检查 scheduler 状态(读取 `scheduler_failure.md`)。 5. 给出包含根本原因和修复建议的清晰诊断。 ### “Pod 在崩溃 / 频繁重启” 1. 执行 `sweep` 定位问题 Pod。 2. 对崩溃的 Pod 执行 `pod` 子命令,获取日志和事件。 3. 确定退出原因:OOMKilled → 建议增加内存限制;CrashLoopBackOff 且配置错误 → 建议回滚或更新配置。 4. 如果问题与已知故障模式匹配(例如 CNI 导致的网络沙箱错误),使用对应的故障指南。 ### “kubectl 命令失败” 1. 尝试 `kubectl get nodes`。如果返回证书错误,读取 `apiserver_cert_expired.md`。 2. 如果 `kubectl` 超时,可能是 etcd 故障 → 读取 `etcd_cluster_failure.md`。 3. 如果只有部分命令失败(例如 `kubectl logs` 可用但 `kubectl get pods` 失败),检查 RBAC 权限。 ### “Deployment 卡住 / 无法滚动更新” 1. 对 Deployment 执行 `deploy` 子命令。 2. 检查 `unavailableReplicas` 和滚动更新状态。 3. 查看事件和 ReplicaSet 版本。 4. 如果因镜像错误导致滚动卡住,建议回滚(`fix` 执行 `rollout undo`)。 5. 如果 Pod 处于 Pending 状态,读取 `scheduler_failure.md` 或 `pending_no_resources.md`。
From Ascend/agent-skills, MulanPSL-2.0.
More from Ascend/agent-skills
- 0.573score
ascendc-operator-performance-optim
Ascend
排查并优化 Ascend C 算子性能。当用户开发、审查或优化 Ascend C kernel 算子时使用,或当用户提及 Ascend C 性能优化、算子优化、tiling、流水、搬运、 内存优化、NPU/昇腾等关键词时触发。
SkillCFreshness: C★ 52Claude Code +9 - 0.573score
ascendc-operator-design
Ascend
完成AscendC算子设计 - 帮助用户完成算子的架构设计、接口定义和性能规划。当用户提到算子设计、算子开发、tiling策略、内存规划、AscendC kernel设计、两级tiling、核间切分、核内切分时,使用此skill。
SkillCFreshness: C★ 52Claude Code +9 - 0.571score
ascend-transformer-boost
ascend-transformer-boost-team + Claude + Claude Code + deepseek-v4-pro
昇腾 Transformer 加速库(ATB)核心技能集索引(Index Skill)。 整合 8 大核心技能:CANN 安装部署、ATB 测试框架编译、 ATB→ACLNN 算子替换设计文档生成、ATB→ACLNN 算子迁移,覆盖昇腾 NPU 开发全链路。
SkillCFreshness: C★ 52Claude Code +9 - 0.567score
cann-nnal-installer
Ascend
昇腾NPU CANN Toolkit+Kernels+NNAL安装部署技能。支持从官网下载run包安装和从Docker镜像提取两种方式,覆盖驱动检查、包下载、安装、环境变量配置与验证全流程。当用户需要安装CANN全套组件或指定版本CANN到自定义路径时调用。
SkillCFreshness: C★ 52Claude Code +9 - 0.522score
ascendc-operator-code-gen
Ascend
No description from the publisher yet.
SkillCFreshness: C★ 52Claude Code +9 - 0.514score
ascendc-operator-code-review
Ascend
Ascend C 代码检视技能。基于假设检验方法论对代码进行安全规范检视。调用时必须明确提供:代码片段和检视规则描述。TRIGGER when: 用户要求代码检视、代码review、询问代码安全问题、检查编码规范、或需要检查特定代码问题(如内存泄漏、整数溢出、空指针等)。关键词:Ascend…
SkillDFreshness: D★ 52Claude Code +9 - 0.514score
hccl-test
Ascend
HCCL (Huawei Collective Communication Library) performance testing for Ascend NPU clusters.
SkillDFreshness: D★ 52Claude Code +9 - 0.514score
ascendc-operator-performance-eval
Ascend
在 ascend-kernel 的 csrc/ops/<op>/test 下维护仅含 JSONL 的 profiler 性能用例,使用 torch_npu.profiler(固定 warmup=5、active=5)采集,汇总 ASCEND_PROFILER_OUTPUT/op_statistic.csv 的…
SkillDFreshness: D★ 52Claude Code +9 - 0.514score
ascend-profiling-anomaly
Ascend
Analyze Huawei Ascend NPU profiling data to discover hidden performance anomalies and produce a detailed model architecture report reverse-engineered from…
SkillDFreshness: D★ 52Claude Code +9 - 0.514score
megatron-migration-generator
Ascend
Generate migration deliverables for bringing relevant Megatron changes into MindSpeed after branch alignment and impact mapping are complete.
SkillDFreshness: D★ 52Claude Code +9 - 0.514score
ascend-docker
Ascend
Create Docker containers for Huawei Ascend NPU development with proper device mappings and volume mounts.
SkillDFreshness: D★ 52Claude Code +9 - 0.511score
ascendc-operator-precision-debug
Ascend
AscendC 算子精度问题调试与根因定位。当算子精度测试失败(allclose 不通过、结果偏差、输出全零/NaN 等)时使用。流程:误差分布分析 → 代码易错点审查 → 实验隔离 → printf/DumpTensor 插桩 → 修复验证。关键词:精度调试、精度问题、结果不一致、误差定位、allclose…
SkillDFreshness: D★ 52Claude Code +9
Signals
- Stars
- 52
- Forks
- 3
- Open issues
- 2
- Last commit (this folder)
- May 7, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MulanPSL-2.0
- Repository
- github.com/Ascend/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Ascend
- 0.573score
ascendc-operator-design
Ascend
完成AscendC算子设计 - 帮助用户完成算子的架构设计、接口定义和性能规划。当用户提到算子设计、算子开发、tiling策略、内存规划、AscendC kernel设计、两级tiling、核间切分、核内切分时,使用此skill。
SkillCFreshness: C★ 52Claude Code +9 - 0.573score
ascendc-operator-performance-optim
Ascend
排查并优化 Ascend C 算子性能。当用户开发、审查或优化 Ascend C kernel 算子时使用,或当用户提及 Ascend C 性能优化、算子优化、tiling、流水、搬运、 内存优化、NPU/昇腾等关键词时触发。
SkillCFreshness: C★ 52Claude Code +9 - 0.567score
cann-nnal-installer
Ascend
昇腾NPU CANN Toolkit+Kernels+NNAL安装部署技能。支持从官网下载run包安装和从Docker镜像提取两种方式,覆盖驱动检查、包下载、安装、环境变量配置与验证全流程。当用户需要安装CANN全套组件或指定版本CANN到自定义路径时调用。
SkillCFreshness: C★ 52Claude Code +9 - 0.522score
ascendc-operator-code-gen
Ascend
No description from the publisher yet.
SkillCFreshness: C★ 52Claude Code +9 - 0.514score
ascend-profiling-anomaly
Ascend
Analyze Huawei Ascend NPU profiling data to discover hidden performance anomalies and produce a detailed model architecture report reverse-engineered from…
SkillDFreshness: D★ 52Claude Code +9 - 0.514score
ascend-docker
Ascend
Create Docker containers for Huawei Ascend NPU development with proper device mappings and volume mounts.
SkillDFreshness: D★ 52Claude Code +9
Cite this page
k8s-check-fix skill. Agent Mart. https://agentmart.dev/skills/ascend-k8s-check-fix (last updated 2026-10-24)