k8s-rightsize

k8s-rightsize is a skill for Claude Code from smk-labs/claude-plugins. It costs 119 tokens per session (2,138 once invoked), scanned A, original, MIT.

A Kubernetes sizing assistant that uses seven days of Prometheus monitoring data to set CPU and memory requests for running workloads. Kubernetes is software that schedules containers, while Prometheus records system measurements.

In plain words
What is it for?
Use it to size pods from observed CPU and memory usage, estimate node requirements, and tune KEDA autoscaling for queue workers and web or API services.
Why use it?
It helps identify workloads given too many or too few resources and estimates how many cluster machines are needed.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the portal-skills plugin — 4 skills shipped together

Good fit Use it to size pods from observed CPU and memory usage, estimate node requirements, and tune KEDA autoscaling for queue workers and web or API services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/smk-labs/claude-plugins/k8s-rightsize
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 smk-labs/claude-plugins --skill k8s-rightsize
Clone the repo
git clone --depth 1 https://github.com/smk-labs/claude-plugins

Made for: Claude Code.

Or install portal-skills, the plugin that ships this one along with the rest of its 4 skills.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/smk-labs/claude-plugins/k8s-rightsize"><img src="https://agentmods.dev/badge/skills/smk-labs/claude-plugins/k8s-rightsize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,138 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00119 $0.02138
Opus 5 $0.00060 $0.01069
Sonnet 5 $0.00024 $0.00428
Haiku 4.5 $0.00012 $0.00214

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

Security

Grade A, and why

k8s-rightsize scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

(ask the user to start it; test with `curl -s localhost:9090/api/v1/query?query=up`).
portal-skills/skills/k8s-rightsize/SKILL.md · 72 lines

How it starts

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

k8s-rightsize: data-driven pod request sizing from Prometheus

Right-size CPU/memory requests for workloads in a namespace using real 7-day usage from Prometheus, then compute how many nodes the cluster needs. Built for queue-worker fleets (Celery and similar) plus web/API pods, but works for any namespace.

Best-practice model (researched: Datadog, Kubernetes docs)

  • Requests drive scheduling (bin-packing); limits enforce a runtime ceiling. (K8s docs)
  • CPU is compressible. A CPU limit throttles via CFS even when the node has spare CPU, spiking p95/p99 latency. For async/background workers (Celery and similar), do NOT set CPU limits: let them burst. Set the CPU request to observed steady-state (median to p95).
  • Memory is incompressible. It can only be OOM-killed, not throttled. Set memory request to p95-p98. Optionally add a memory limit of about p98 x 1.25 to stop a leak from taking down a node. (Some teams deliberately run fully burstable with no memory limits; respect the owner's choice, but name the trade-off.)
  • Spread replicas across nodes (topologySpreadConstraints, maxSkew: 1, topologyKey: kubernetes.io/hostname, whenUnsatisfiable: ScheduleAnyway) so bursts scatter instead of stacking. This is what makes "no CPU limit" safe.
  • Celery: use --max-tasks-per-child to bound memory-leak creep.

Percentile guidance (no CPU limit case)

The request only controls packing density, not the ceiling. Higher percentile = looser packing = more on-node burst headroom = less throttling, but more idle reservation.

  • CPU = p95 is the sweet spot for steady workers. Use p98 only with a real latency SLO; the p95-to-p98 premium is tiny for steadily-loaded workers and pure waste for bursty ones.
  • Beware bursty workers (low p95, huge max, e.g. idle at 173m but spiking to 3292m). p85 vs p95 barely moves them; the spike is 10-20x either number. Don't size them at burst (waste); rely on topology-spread + no-limit bursting. But do NOT size steadily-heavy workers (running near p85 continuously) at p85: that under-reserves and packs them too tight.

Read the full file on GitHub · 72 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. 10d ago First seen · 72 lines · 119 tokens per session scan A 1365471d44e8

Subscribe to this mod's changes

k8s-rightsize is a skill published in the GitHub repository smk-labs/claude-plugins (11 stars, last pushed 5d ago), licensed MIT. It adds 119 tokens to every session and 2,138 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

ci-cd-pipeline

Use near the end of a project to generate CI and make the app deploy-ready. Produces a polyglot GitHub Actions workflow (lint, typecheck, test, build) and multi-stage Dockerfiles. The finish line is CI-green and container-ready, not an actual deploy.

martian56/claude-engineer · 64 tokens

docker-dev-environment

Use when setting up local development services or running the project locally. Establishes the "stateful services in Docker, app runs native" pattern with Postgres, Redis, MinIO, and Mailpit.

martian56/claude-engineer · 46 tokens

helm

Helm chart authoring, templating, and release management for Kubernetes: charts, values, templating functions, repositories, dependencies, and lifecycle operations.

lukaskellerstein/claude-my-marketplace · 0 tokens

dummy-dataset

Generate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Use when creating test data, building mock datasets, or generating sample data for development and demos.

phuryn/pm-skills · 48 tokens

outcome-roadmap

Transform an output-focused roadmap into an outcome-focused one that communicates strategic intent. Rewrites initiatives as outcome statements reflecting user and business impacts. Use when shifting to outcome roadmaps, making a roadmap more strategic, or rewriting feature lists as outcomes.

phuryn/pm-skills · 53 tokens

pre-mortem

Run a pre-mortem risk analysis on a PRD or launch plan. Categorizes risks as Tigers (real problems), Paper Tigers (overblown concerns), and Elephants (unspoken worries), then classifies as launch-blocking, fast-follow, or track. Use when preparing for launch, stress-testing a product plan, or identifying what could go…

phuryn/pm-skills · 79 tokens