K8

k8s-diagnostics

Analyzes cluster health, compares resource usage across environments, and gathers diagnostic metrics.

Install

mkdir -p .claude/skills/k8s-diagnostics && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5973" && unzip -o skill.zip -d .claude/skills/k8s-diagnostics && rm skill.zip

Installs to .claude/skills/k8s-diagnostics

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Kubernetes diagnostics for metrics, health checks, resource comparisons, and cluster analysis. Use when analyzing cluster health, comparing environments, or gathering diagnostic data.
183 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • →Assess cluster health using health checks
  • →Compare resource usage between namespaces
  • →Analyze pod CPU and memory metrics
  • →List and verify Custom Resource Definitions
  • →Gather node summaries and cluster information

How it works

It executes diagnostic tools to query cluster metrics, events, and resource configurations for analysis.

Inputs & outputs

You give it
Cluster context or namespace
You get back
Diagnostic metrics and health reports

When to use k8s-diagnostics

  • →Assessing overall cluster health
  • →Comparing staging vs production resource usage
  • →Analyzing pod CPU and memory metrics
  • →Planning node capacity

About this skill

Kubernetes Diagnostics

Analyze cluster health and compare resources using kubectl-mcp-server's diagnostic tools.

Requires the diagnostics, multicluster toolsets: start kubectl-mcp-server with --toolsets default,diagnostics,multicluster (or MCP_TOOLSETS=default,diagnostics,multicluster).

When to Apply

Use this skill when:

  • User mentions: "metrics", "health check", "compare", "analysis", "capacity"
  • Operations: cluster health assessment, environment comparison, resource analysis
  • Keywords: "how much", "usage", "difference between", "capacity planning"

Priority Rules

PriorityRuleImpactTools
1Check metrics-server before using metricsCRITICALkubectl_top
2Run health check before deploymentsHIGHhealth_check
3Compare staging vs prod before releaseMEDIUMcompare_namespaces
4Document baseline metricsLOWget_nodes_summary

Quick Reference

TaskToolExample
Cluster healthhealth_checkhealth_check()
Pod metricskubectl_topkubectl_top(namespace)
Node summaryget_nodes_summaryget_nodes_summary()
Compare envscompare_namespacescompare_namespaces(ns1, ns2, type)
List CRDskubectl_getkubectl_get(resource_type="crds")

Resource Metrics

kubectl_top(namespace="default")

kubectl_top(resource="nodes")

kubectl_top(resource="pods", namespace="default", sort_by="cpu")

kubectl_top(resource="pods", namespace="default", sort_by="memory")

Cluster Health Check

health_check()

health_check()

Compare Environments

compare_namespaces(
    namespace1="staging",
    namespace2="production",
    resource_type="deployment"
)

kubectl_get(resource_type="deployments", namespace="default", context="staging-cluster")
kubectl_get(resource_type="deployments", namespace="default", context="prod-cluster")

API Discovery

get_api_resources()

kubectl_get(resource_type="crds", name="certificates.cert-manager.io")

kubectl_get(resource_type="crds")

Resource Analysis

get_nodes_summary()

kubeconfig_view()

list_contexts()

Diagnostic Workflows

Cluster Overview

health_check()
get_nodes_summary()
kubectl_get(resource_type="events", namespace="")
kubectl_get(resource_type="crds")

Pre-deployment Check

kubectl_top(namespace="production")
get_nodes_summary()
compare_namespaces(namespace1="staging", namespace2="prod", resource_type="deployment")

Post-incident Analysis

kubectl_get(resource_type="events", namespace)
kubectl_logs(name, namespace, previous=True)
kubectl_top(namespace)
kubectl_describe(name)

Related Skills

When not to use it

  • →When metrics-server is not available in the cluster

Prerequisites

kubectl-mcp-server

Limitations

  • →Requires metrics-server for resource metrics
  • →Limited to tools provided by kubectl-mcp-server

How it compares

It provides automated diagnostic workflows for cluster health and environment comparison rather than manual kubectl commands.

Compared to similar skills

k8s-diagnostics side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
k8s-diagnostics (this skill)19moNo flagsIntermediate
debug-cluster21yReviewIntermediate
k8s-debug09moReviewIntermediate
health-checks39moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by rohitg00

View all by rohitg00 →

Search skills

Search the agent skills registry