k8s-performance

k8s-performance is a skill for Claude Code, Codex from kudig-io/kudig-database. It costs 23 tokens per session (4,642 once invoked), scanned A, a copy of k8s-dns-failure, Apache-2.0.

A Kubernetes diagnostic and repair method for services using too much CPU, memory, or disk input/output, or responding slowly. Kubernetes is software for running and managing containers.

In plain words
What is it for?
It helps diagnose and verify Kubernetes performance problems involving resource use or slow application responses.
Why use it?
It structures the process of finding the cause, fixing it, and checking that the fix worked.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit It helps diagnose and verify Kubernetes performance problems involving resource use or slow application responses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kudig-io/kudig-database/k8s-performance
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kudig-io/kudig-database --skill k8s-performance
Clone the repo
git clone --depth 1 https://github.com/kudig-io/kudig-database

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for k8s-performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/kudig-io/kudig-database/k8s-performance/github.svg)](https://agentmods.dev/skills/kudig-io/kudig-database/k8s-performance)
Your own site
<a href="https://agentmods.dev/skills/kudig-io/kudig-database/k8s-performance"><img src="https://agentmods.dev/badge/skills/kudig-io/kudig-database/k8s-performance/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for k8s-performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/kudig-io/kudig-database/k8s-performance"><img src="https://agentmods.dev/badge/skills/kudig-io/kudig-database/k8s-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,642 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 86% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.04642
Opus 5.5 $0.00009 $0.01857
Sonnet 5.5 $0.00005 $0.00928
Haiku 4.5 $0.00002 $0.00464

Measured 1mo ago against content hash 2a15bc84ac3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

k8s-performance scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/diagnose-quick.sh, scripts/verify-performance.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

86% identical to k8s-dns-failure — 308 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

19-故障诊断/08-技能体系/skill-set/k8s-performance/SKILL.md · 371 lines

How it starts

The opening of the file, as written. The whole thing — 371 lines — stays where its author put it; the contents beside it link to each section on GitHub.

生产环境安全提示

本文档包含可直接执行的运维命令。执行前请确认:当前目标集群与 Namespace 是否正确;是否具备足够的 RBAC 权限;是否已在非生产环境验证。命令风险等级标注:🔴 高风险(可能造成数据丢失或服务中断)、🟡 中风险(会修改集群状态,但通常可回滚)、🟢 低风险/只读(信息收集,无副作用)。

K8s Performance Bottleneck 诊断与修复

性能问题是 [[kubernetes|Kubernetes]] 生产环境中最具挑战性的问题类型之一。CPU 节流、内存 OOM、磁盘 IO 饱和、网络延迟都可能导致应用响应变慢甚至不可用。

本 [[SKILL|Skill]] 覆盖 Pod/节点/集群级别的性能瓶颈诊断和修复,包括资源优化、调度调整、应用级优化等。

何时使用此 Skill

症状 检测方法 置信度
Pod CPU 使用率接近 limit kubectl top pod 0.95
Pod 被 OOMKilled kubectl get pod + Events 0.95
节点负载高 kubectl top node 0.90
应用 P99 延迟突增 [[prometheus|Prometheus]]/Grafana 0.90
磁盘 IO 等待高 node_exporter iowait 0.85
CPU Throttling container_cpu_cfs_throttled_seconds_total 0.95

排除条件: 节点 NotReady → SKILL-NODE-001; HPA 不工作 → SKILL-AUTO-001

快速分级(2 分钟内完成)

影响范围
├── 核心服务 P99 > SLA ──────────→ P0(15min 内修复)
├── 生产环境延迟异常 ────────────→ P1(30min 内修复)
├── 成本优化(资源浪费) ────────→ P2(2h 内处理)
└── 单 Pod 性能问题 ─────────────→ P2(2h 内处理)

立即升级条件:

  • 核心服务延迟超过 SLA 且持续恶化
  • 多个节点同时高负载
  • 集群级别资源耗尽

执行流程

# 🟢 低风险:只读/信息收集,通常无副作用
工单/告警触发
    │
    ▼
┌──────────────┐    脚本: scripts/diagnose-quick.sh
│ Phase 1      │    内容: kubectl top + metrics 快速检查(只读)
│ 快速检查      │    Step: D1.1-D1.6
└──────┬───────┘
       │ 无法确认根因
       ▼
┌──────────────┐    内容: 应用 profiling / 节点分析
│ Phase 2      │
│ 深度分析      │
└──────┬───────┘
       │ 确认根因
       ▼
┌──────────────┐    参考: reference/remediation-playbook.md
│ 修复操作      │    风险: LOW → MEDIUM → HIGH
│ REM-001~006  │
└──────┬───────┘
       │
       ▼
┌──────────────┐    脚本: scripts/verify-performance.sh
│ 验证确认      │    检查: 资源使用率/延迟
└──────────────┘

可用脚本

脚本 用途 参数 风险
scripts/diagnose-quick.sh 性能瓶颈快速诊断 NAMESPACE POD_NAME (optional) 只读
scripts/verify-performance.sh 修复后验证 NAMESPACE POD_NAME (optional) 只读

根因概览 (6 种)

RC ID 根因 概率 首选修复 风险
RC-001 CPU limit 过低导致节流 高 REM-001 调整 limit LOW
RC-002 内存 limit 过低导致 OOM 高 REM-002 调整 limit LOW
RC-003 节点资源饱和 中 REM-003 扩容/调度 MEDIUM
RC-004 应用级性能问题 中 REM-004 应用优化 MEDIUM
RC-005 磁盘 IO 饱和 中 REM-005 IO 优化 MEDIUM
RC-006 网络延迟/带宽不足 低 REM-006 网络优化 MEDIUM

Read the full file on GitHub · 371 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +19 lines 2a15bc84ac3d
  2. 1mo ago First seen · 352 lines · 23 tokens per session scan A b6474c02f357

Subscribe to this mod's changes

k8s-performance is a skill published in the GitHub repository kudig-io/kudig-database (6 stars, last pushed today), licensed Apache-2.0. It adds 23 tokens to every session and 4,642 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 86% identical to k8s-dns-failure, differing in 308 lines, and is treated as a copy.