k8s-autoscaling

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

A guide for diagnosing three Kubernetes scaling systems: HPA changes the number of application copies, VPA recommends or changes their resource sizes, and Karpenter adds or removes the machines that run them.

In plain words
What is it for?
Investigating stuck replicas, slow scale-up, failed scale-down, out-of-memory events, pending pods, node provisioning problems, and spot-instance interruptions.
Why use it?
It helps explain why an application did or did not scale, and separates problems with workload copies, resource requests, and available machines.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Investigating stuck replicas, slow scale-up, failed scale-down, out-of-memory events, pending pods, node provisioning problems, and spot-instance interruptions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yindia/rootcause/k8s-autoscaling
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 yindia/rootcause --skill k8s-autoscaling
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-autoscaling

README.md
[![agentmods](https://agentmods.dev/badge/skills/yindia/rootcause/k8s-autoscaling/github.svg)](https://agentmods.dev/skills/yindia/rootcause/k8s-autoscaling)
Your own site
<a href="https://agentmods.dev/skills/yindia/rootcause/k8s-autoscaling"><img src="https://agentmods.dev/badge/skills/yindia/rootcause/k8s-autoscaling/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-autoscaling

Your own site · 80×15
<a href="https://agentmods.dev/skills/yindia/rootcause/k8s-autoscaling"><img src="https://agentmods.dev/badge/skills/yindia/rootcause/k8s-autoscaling.svg" alt="Reviewed on agentmods" width="80" 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,244 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 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.1 $0.00000 $0.02244
Opus 5 $0.00000 $0.01122
Sonnet 5 $0.00000 $0.00449
Haiku 4.5 $0.00000 $0.00224

Measured 9d ago against content hash d3f1b59eead5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

k8s-autoscaling 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 9d 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-autoscaling/SKILL.md · 369 lines

How it starts

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

Skill: k8s-autoscaling

Deep autoscaling diagnostics and tuning for three scaling paths:

  1. Horizontal Pod Autoscaler (HPA),
  2. Vertical Pod Autoscaler (VPA),
  3. Karpenter node provisioning.

Use this skill to explain why scaling did or did not happen, then provide a cost-aware remediation path.

Trigger Phrases

Use this skill when the user mentions:

  • hpa not scaling
  • replicas stuck
  • scale up too slow
  • scale down never happens
  • vpa recommendation needed
  • oomkilled and right sizing
  • pods pending no nodes
  • karpenter not provisioning
  • nodepool constraints
  • nodeclass misconfiguration
  • spot interruptions
  • autoscaling cost too high

RootCause Tools Allowed

Only use these tool names in this skill:

  • k8s.hpa_debug
  • k8s.vpa_debug
  • k8s.resource_usage
  • k8s.scale (requires confirm=true)
  • k8s.describe
  • k8s.list
  • karpenter.status
  • karpenter.node_provisioning_debug
  • karpenter.nodepool_debug
  • karpenter.nodeclass_debug
  • karpenter.interruption_debug

Autoscaling Model

Think in layers:

  • Pod replica scaling is controlled by HPA.
  • Pod request sizing is controlled by VPA.
  • Node supply scaling is controlled by Karpenter.

A healthy system aligns all three layers.

Decision Tree

Primary Symptom Start Here Next Branch
CPU high, replicas unchanged k8s.hpa_debug validate metrics and maxReplicas
Recurrent OOMKilled k8s.vpa_debug compare requests vs recommendations
Pods pending with scheduling errors karpenter.node_provisioning_debug inspect NodePool/NodeClass
Node count spikes and costs jump k8s.resource_usage check over-requesting and HPA sensitivity
Frequent node terminations karpenter.interruption_debug check spot/interruption behavior

Workflow A: HPA Diagnostics (CPU/Memory/Custom Metrics)

Step A1: Enumerate HPAs and targets

Use k8s.list:

namespace: checkout
resources:
  - kind: HorizontalPodAutoscaler
  - kind: Deployment

Confirm target references are valid.

Read the full file on GitHub · 369 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. 9d ago First seen · 369 lines · 0 tokens per session scan A d3f1b59eead5

Subscribe to this mod's changes

k8s-autoscaling 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,244 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.

Related

Other skills, from other repositories

bazel-k8s-expert

Expert knowledge for deploying Quarkus/Java applications to Kubernetes using Bazel. Covers rulesk8s, Helm, Kustomize, ConfigMaps, Secrets, and health probes.

kinhluan/rules-quarkus-skills · 45 tokens

kubernetes-review

Kubernetes & Cloud-Native Review: Reviews Kubernetes manifests, Helm charts, and cloud-native configurations for security, reliability, resource management, and best practices. Covers pods, deployments, services, ingress, RBAC, network policies, HPA, PDB, security contexts, and GitOps patterns. Use when the user…

camilooscargbaptista/cto-toolkit · 104 tokens

kubernetes-operator

Deploy and manage applications on Kubernetes. Covers deployments, services, ingress, HPA, secrets, and production-grade cluster configuration.

AtulPurohit/Antigravity-Awesome-Skills · 30 tokens

securing-helm-chart-deployments

Secure Helm chart deployments by validating chart integrity, scanning templates for misconfigurations, and enforcing security contexts in Kubernetes releases.

xalgorix/xalgorix · 34 tokens

k8s-network-policy

Review Kubernetes NetworkPolicies — what is actually permitted to reach a workload, and whether the answer can be trusted. Use when asked what can talk to a pod, whether a namespace is restricted, why traffic is being blocked, or for any security review of cluster network segmentation.

automateyournetwork/netclaw · 60 tokens

k8s-service-path

Trace the Kubernetes service path — Service to selector to pods to EndpointSlices to readiness, plus Ingress routing. Use when a service is getting no traffic, an ingress is not routing, or someone asks why a workload is unreachable inside a cluster.

automateyournetwork/netclaw · 55 tokens