k8s-diagnostics

k8s-diagnostics is a skill for Claude Code, Codex from yindia/rootcause. It costs 0 tokens per session (2,518 once invoked), scanned A, original, MIT.

A read-first playbook for checking Kubernetes cluster and workload health using usage data, events, scaling information, and resource relationships.

In plain words
What is it for?
Running health checks, finding resource hotspots, investigating unexpected scaling, reviewing namespace warnings, planning capacity, and verifying incidents after they happen.
Why use it?
It turns scattered warnings and measurements into an evidence-based view of what is unhealthy, under pressure, or likely to need attention.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/yindia/rootcause/k8s-diagnostics
Any agent
npx skills add yindia/rootcause --skill k8s-diagnostics
Clone the repo
git clone --depth 1 https://github.com/yindia/rootcause

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-diagnostics

README.md
[![agentmods](https://agentmods.dev/badge/skills/yindia/rootcause/k8s-diagnostics.svg)](https://agentmods.dev/skills/yindia/rootcause/k8s-diagnostics)
Your own site
<a href="https://agentmods.dev/skills/yindia/rootcause/k8s-diagnostics"><img src="https://agentmods.dev/badge/skills/yindia/rootcause/k8s-diagnostics.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,518 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00000 $0.02518
Opus 5 $0.00000 $0.01259
Sonnet 5 $0.00000 $0.00504
Haiku 4.5 $0.00000 $0.00252

Measured 4d ago against content hash f3ab272a3ecb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

k8s-diagnostics 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 4d ago.

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.

skills/claude/k8s-diagnostics/SKILL.md · 492 lines

How it starts

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

Skill: k8s-diagnostics

Cluster and workload diagnostics playbook using RootCause MCP tool names.

Focus areas:

  • cluster health assessment
  • resource usage and pressure
  • event chronology
  • HPA and VPA behavior
  • best-practice interpretation
  • capacity planning

Objective

Produce evidence-backed health posture and action priorities.

This skill is mostly read-first. If remediation requires mutation, hand off to k8s-operations.

Primary Tool Set

  • k8s.context
  • k8s.ping
  • k8s.overview
  • k8s.resource_usage
  • k8s.events
  • k8s.events_timeline
  • k8s.hpa_debug
  • k8s.vpa_debug
  • k8s.best_practice
  • k8s.list
  • k8s.describe
  • k8s.graph

Trigger Conditions

Activate for requests like:

  • cluster health check
  • resource hotspots
  • scaling seems wrong
  • noisy warnings across namespace
  • capacity planning ahead of release
  • post-incident verification

Baseline Diagnostic Sequence

  1. verify active context with k8s.context
  2. verify control plane with k8s.ping
  3. collect baseline with k8s.overview
  4. detect pressure with k8s.resource_usage
  5. correlate warnings with k8s.events_timeline
  6. inspect autoscaling using k8s.hpa_debug and k8s.vpa_debug
  7. score workload configuration with k8s.best_practice
  8. produce prioritized recommendations

Parameter Examples

k8s.context current:

{
  "action": "current"
}

k8s.context list:

{
  "action": "list"
}

k8s.ping:

{}

k8s.overview namespace:

{
  "namespace": "payments"
}

k8s.resource_usage cpu hotspot view:

{
  "namespace": "payments",
  "includePods": true,
  "includeNodes": true,
  "sortBy": "cpu",
  "limit": 40
}

k8s.resource_usage memory hotspot view:

{
  "namespace": "payments",
  "includePods": true,
  "includeNodes": true,
  "sortBy": "memory",
  "limit": 40
}

k8s.events namespace warnings and normals:

{
  "namespace": "payments"
}

k8s.events_timeline warning-only:

{
  "namespace": "payments",
  "includeNormal": false,
  "limit": 150
}

Read the full file on GitHub · 492 lines

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. 4d ago First seen · 492 lines · 0 tokens per session scan A f3ab272a3ecb

Subscribe to this mod's changes

k8s-diagnostics is a skill published in the GitHub repository yindia/rootcause (42 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,518 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.