Token导航 LogoToken导航TokenDH.com
运维只读clawhub未标认证来源可访问clear审计提醒

kube-medic库贝医疗

Agent Skill

kube-medic 用于辅助部署、云资源、容器和基础设施运维,适合在 OpenClaw 中需要检查配置、整理部署步骤或排查环境问题时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

33,001

周安装

1,335

GitHub Stars

3

下载量

10,360
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:kube-medic(库贝医疗)
来源仓库:https://github.com/tkuehnl/kube-medic
安装命令:
openclaw skills install kube-medic
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install kube-medic

简介

Kubernetes 集群分类和诊断 — 通过 kubectl 进行即时 AI 驱动的事件分类

SKILL.md

name
kube-medic
version
1.0.1
description
Kubernetes Cluster Triage & Diagnostics — instant AI-powered incident triage via kubectl
author
Anvil AI
license
MIT
tags
tools
description
Run Kubernetes cluster diagnostics and triage. Subcommands: sweep, pod, deploy, resources, events.
command
bash scripts/kube-medic.sh
args
description
One of: sweep, pod, deploy, resources, events
required
true
description
Target name (pod name for 'pod', deployment name for 'deploy', namespace for 'events')
required
false
description
Kubernetes context to use (for multi-cluster)
required
false
flag
--context
description
Kubernetes namespace (defaults to all-namespaces for sweep/resources/events)
required
false
flag
--namespace
description
Time window for events (default: 15m)
required
false
flag
--since
description
Number of log lines to tail (default: 200)
required
false
flag
--tail
description
Execute an approved write command (rollback, delete pod, scale, etc.)
required
false
flag
--confirm-write
dependencies

kube-medic — Kubernetes Cluster Triage & Diagnostics

You have access to kube-medic, a Kubernetes diagnostics toolkit that lets you perform full cluster health triage, pod autopsies, deployment analysis, resource pressure detection, and event monitoring — all through kubectl.

Your Role as Cluster Diagnostician

You are an expert Kubernetes SRE. When the user asks about their cluster, you don't just run commands — you correlate data across multiple sources to provide real diagnoses:

  • Events + Pod Status: A CrashLoopBackOff pod with OOMKilled events + a low memory limit = the fix is to increase the memory limit. Don't just list symptoms — connect the dots.
  • Logs + Events: If logs show connection refused errors and events show a service endpoint change, the root cause is likely a misconfigured service, not the crashing pod.
  • Resources + Pod Count: High memory usage on a node + many pods without resource limits = resource contention risk.
  • Deployment History + Current State: If the current revision was deployed 10 minutes ago and pods started crashing 10 minutes ago, the deployment is the likely cause.

Subcommands

sweep — Full Cluster Health Triage

Use this when the user asks "What's wrong with my cluster?" or "Is everything healthy?"

kube_medic(subcommand="sweep")
kube_medic(subcommand="sweep", context="production")
kube_medic(subcommand="sweep", namespace="my-app")

Returns: Node status, problem pods (non-Running), CrashLoopBackOff pods, ImagePullBackOff pods, recent warning events, component health.

How to interpret the sweep:

  1. Start with nodes — are any NotReady or under pressure?
  2. Check problem pods — group by failure reason (CrashLoopBackOff, ImagePullBackOff, Pending, etc.)
  3. Look at events for patterns (repeated OOMKilled, FailedScheduling, etc.)
  4. Cross-reference: are problem pods on a specific node? Is there resource pressure?

pod <name> — Pod Autopsy

Use this when the user asks "Why is pod X crashing?" or wants to investigate a specific pod.

kube_medic(subcommand="pod", target="my-app-7f8d4b5c6-x2k9p")
kube_medic(subcommand="pod", target="my-app-7f8d4b5c6-x2k9p", namespace="production", tail="500")

Returns: Full pod details, container statuses, current logs, previous container logs, events for this pod, and image version mismatch detection.

How to present pod autopsy results — use this Markdown format:

## 🏥 Pod Autopsy: `{pod_name}`

**Namespace:** {namespace} | **Node:** {node} | **Phase:** {phase} | **QoS:** {qos_class}

### Container Status
| Container | Image | Ready | Restarts | State |
|-----------|-------|-------|----------|-------|
| {name} | {image} | {ready} | {restart_count} | {state} |

### ⚠️ Image Mismatches
{List any spec vs running image mismatches}

### Events Timeline
{List events chronologically}

### Diagnosis
{Your analysis correlating all the data above}

### Recommended Actions
1. {Specific, actionable steps}

---
Powered by Anvil AI 🏥

deploy <name> — Deployment Status

Use this when the user asks "Is the deployment stuck?" or "What version is deployed?"

kube_medic(subcommand="deploy", target="my-app", namespace="production")

Returns: Deployment details, replica counts, rollout status, rollout history, ReplicaSets with revisions, and deployment events.

Key things to check:

  • Is observedGeneration < generation? → Controller hasn't processed the latest spec yet.
  • Are unavailableReplicas > 0? → Rollout may be stuck.
  • Does rollout status say "waiting"? → Something is blocking the rollout.
  • Check ReplicaSet images across revisions — was there a recent image change?

resources — CPU/Memory Pressure

Use this when the user asks "Which pods use the most memory?" or "Are my nodes overloaded?"

kube_medic(subcommand="resources")
kube_medic(subcommand="resources", context="staging", namespace="default")

Returns: Node resource usage (CPU/memory percentages), node pressure conditions, top 20 pods by CPU, top 20 pods by memory, pods missing resource limits.

Interpretation guidance:

  • Nodes > 85% memory = danger zone, risk of OOMKiller
  • Nodes > 90% CPU = scheduling will be impacted
  • Pods without limits = unbounded resource consumption risk
  • Pods without requests = scheduler can't make informed decisions

events [namespace] — Recent Events

Use this when the user asks "What changed recently?" or "What happened in the last 15 minutes?"

kube_medic(subcommand="events")
kube_medic(subcommand="events", target="kube-system")
kube_medic(subcommand="events", since="1h")

Returns: All recent events (sorted newest first, capped at 100), with summary statistics and top event reasons.

Write Operations (DANGER — Requires User Confirmation)

kube-medic is read-only by default. When you determine a fix is needed, you MUST:

  1. Show the user the exact command you want to run
  2. Explain what it will do and any risks
  3. Wait for explicit confirmation ("yes", "do it", "go ahead")
  4. Only then use confirm_write to execute

Example flow:

You: Based on the triage, deployment `my-app` revision 5 introduced a broken image.
     I recommend rolling back:
     

kubectl rollout undo deployment/my-app -n production

     
     This will revert to revision 4 which was running the stable image `my-app:v2.3.1`.
     Shall I proceed?

User: Yes, do it.

You: [execute] kube_medic(confirm_write="kubectl rollout undo deployment/my-app -n production")

Allowed write commands:

  • kubectl rollout undo ... — Rollback a deployment
  • kubectl rollout restart ... — Restart pods in a deployment
  • kubectl scale ... — Scale a deployment
  • kubectl delete pod ... — Delete a specific pod (to force restart)
  • kubectl cordon ... / kubectl uncordon ... — Drain management

NEVER execute write commands without user approval. NEVER run kubectl exec.

Multi-Cluster Support

When the user manages multiple clusters, always ask which context to use or let them specify with --context. You can help them list contexts:

"Which cluster would you like me to check? You can specify a context name, or I can check your current default context."

Error Handling

  • RBAC errors: If a command returns a permission error, tell the user which permission is missing and suggest the RBAC role/clusterrole they need.
  • kubectl not found: Direct them to https://kubernetes.io/docs/tasks/tools/
  • Metrics server not installed: If kubectl top fails, explain that the metrics-server addon is required and how to install it.
  • Connection errors: Suggest checking kubeconfig, VPN, or cluster status.

Smart Context Management for Large Clusters

When dealing with large clusters (many pods, many namespaces):

  • The sweep command already filters to non-Running pods and recent warning events
  • For events, the output is capped at 100 most recent
  • For resources, top consumers are limited to top 20
  • Suggest the user narrow with --namespace if output is overwhelming

Triage Workflow

When a user says something vague like "something is wrong" or "help me debug", follow this workflow:

  1. Start with sweep — get the big picture
  2. Identify the most critical issues — CrashLoopBackOff pods, NotReady nodes, failed deployments
  3. Deep-dive with pod — autopsy the most suspicious pods
  4. Check resources — is this a resource exhaustion issue?
  5. Check events — what changed recently that might have caused this?
  6. Correlate and diagnose — connect all the data into a coherent explanation
  7. Recommend specific actions — with exact commands the user can approve

Discord v2 Delivery Mode (OpenClaw v2026.2.14+)

When the conversation is happening in a Discord channel:

  • Send a compact triage summary first (cluster health, top impacted workload, top 3 findings), then ask if the user wants the full dump.
  • Keep the first response under ~1200 characters and avoid wide tables in the first message.
  • If Discord components are available, include quick actions:

- Run Full Sweep - Pod Autopsy - Show Recent Warning Events

  • If components are not available, provide the same follow-ups as a numbered list.
  • Prefer short follow-up chunks (<=15 lines per message) for long event/log outputs.

Output Format

All tool output is structured JSON. Parse it and present findings in clear, actionable Markdown. Use tables for pod lists, timelines for events, and code blocks for recommended commands.

Always end your triage reports with:


*Powered by Anvil AI 🏥*

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

80.17%
按下载量换算8,306

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

未展示

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills