hpa-debug

hpa-debug is a skill for Claude Code, Codex from scitix/siclaw. It costs 42 tokens per session (1,399 once invoked), scanned A, original, Apache-2.0.

A Kubernetes troubleshooter for a HorizontalPodAutoscaler, which automatically changes an application's number of running copies based on workload measurements. It checks HPA status, the metrics server, and scaling events.

In plain words
What is it for?
Use it when Kubernetes autoscaling is stuck at its limits, has unknown metrics, or does not respond to load.
Why use it?
It helps explain why an application is not adding or removing copies, or why its measurements show as unavailable. It only diagnoses the issue and does not change scaling settings.

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/scitix/siclaw/hpa-debug
Any agent
npx skills add scitix/siclaw --skill hpa-debug
Clone the repo
git clone --depth 1 https://github.com/scitix/siclaw

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 hpa-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/scitix/siclaw/hpa-debug.svg)](https://agentmods.dev/skills/scitix/siclaw/hpa-debug)
Your own site
<a href="https://agentmods.dev/skills/scitix/siclaw/hpa-debug"><img src="https://agentmods.dev/badge/skills/scitix/siclaw/hpa-debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,399 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.00042 $0.01399
Opus 5 $0.00021 $0.00700
Sonnet 5 $0.00008 $0.00280
Haiku 4.5 $0.00004 $0.00140

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

Security

Grade A, and why

hpa-debug 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/core/hpa-debug/SKILL.md · 160 lines

How it starts

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

HPA Autoscaling Failure Diagnosis

When a HorizontalPodAutoscaler is not scaling as expected — stuck at min/max replicas, showing <unknown> metrics, or not responding to load — follow this flow to identify the root cause.

Scope: This skill is for diagnosis only. Once you identify the root cause, report it to the user and stop. Do NOT attempt to modify HPA settings, resource requests, or metrics configuration — that should be left to the user.

Diagnostic Flow

1. Check HPA status

kubectl get hpa <hpa-name> -n <ns>

Note:

  • TARGETS — current value vs target (e.g., 80%/50%). If showing <unknown>/50%, metrics are unavailable.
  • MINPODS / MAXPODS — scaling bounds
  • REPLICAS — current replica count

2. Describe the HPA

kubectl describe hpa <hpa-name> -n <ns>

Focus on:

  • Conditions — look for AbleToScale, ScalingActive, and ScalingLimited with their status and reason
  • Events — scaling decisions, metric fetch errors, or rate-limiting messages
  • Metrics — each metric's current value, target, and type (resource, custom, external)

3. Check metrics-server health

kubectl get pods -n kube-system -l k8s-app=metrics-server -o wide

If no pods are found, try:

kubectl get deployment -n kube-system metrics-server

Verify metrics-server is serving data:

kubectl top pods -n <ns>

If kubectl top returns error: Metrics API not available, metrics-server is not working.

4. Check target resource requests

HPA with CPU/memory percentage targets requires resources.requests to be set on the target containers.

kubectl get deployment <target-name> -n <ns> -o jsonpath='{range .spec.template.spec.containers[*]}{.name}: cpu={.resources.requests.cpu} memory={.resources.requests.memory}{"\n"}{end}'

If requests are not set, the HPA cannot calculate utilization percentages.

5. Match patterns and conclude


<unknown> metrics — Metrics not available

Read the full file on GitHub · 160 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 · 160 lines · 42 tokens per session scan A 581c54f80308

Subscribe to this mod's changes

hpa-debug is a skill published in the GitHub repository scitix/siclaw (230 stars, last pushed 5d ago), licensed Apache-2.0. It adds 42 tokens to every session and 1,399 once invoked, about $0.0002 per session on Opus 5. 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.