kubernetes-optimizer
/kubernetes-optimizer
Audit and optimize Kubernetes manifests and workloads (Kubernetes 1.37 current, 1.36/1.35 supported, 1.34 EOL) for requests/limits and scheduling, probes and lifecycle, securityContext/Pod Security/RBAC, Services/Ingress/NetworkPolicy, HPA/PDB/autoscaling and cost, observability, deprecated APIs and safe upgrades, with real before/after measurement. Always produces a written findings report and a fix plan for approval before touching code. Use this whenever the user mentions Kubernetes manifests, Helm/Kustomize, resource requests/limits, OOMKilled/CrashLoopBackOff, readiness/liveness probes, H
- Author
- RuneStone-Tech ↗
- Repository
- optimize-anything ↗
- Licence
- MIT
- Last repository change
- 04.11.2026
Assessment and security
- Files in this package
- 11
- Scripts
- 1
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 04.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 1 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/audit.py
What it does and when to use it
Audit and optimize Kubernetes manifests and workloads (Kubernetes 1.37 current, 1.36/1.35 supported, 1.34 EOL) for requests/limits and scheduling, probes and lifecycle, securityContext/Pod Security/RBAC, Services/Ingress/NetworkPolicy, HPA/PDB/autoscaling and cost, observability, deprecated APIs and safe upgrades, with real before/after measurement. Always produces a written findings report and a fix plan for approval before touching code. Use this whenever the user mentions Kubernetes manifests, Helm/Kustomize, resource requests/limits, OOMKilled/CrashLoopBackOff, readiness/liveness probes, H
Original author description
Audit and optimize Kubernetes manifests and workloads (Kubernetes 1.37 current, 1.36/1.35 supported, 1.34 EOL) for requests/limits and scheduling, probes and lifecycle, securityContext/Pod Security/RBAC, Services/Ingress/NetworkPolicy, HPA/PDB/autoscaling and cost, observability, deprecated APIs and safe upgrades, with real before/after measurement. Always produces a written findings report and a fix plan for approval before touching code. Use this whenever the user mentions Kubernetes manifests, Helm/Kustomize, resource requests/limits, OOMKilled/CrashLoopBackOff, readiness/liveness probes, H
How it works
- Workflow
- Principles
SKILL.md preview
--- name: kubernetes-optimizer description: Audit and optimize Kubernetes manifests and workloads (Kubernetes 1.37 current, 1.36/1.35 supported, 1.34 EOL) for requests/limits and scheduling, probes and lifecycle, securityContext/Pod Security/RBAC, Services/Ingress/NetworkPolicy, HPA/PDB/autoscaling and cost, observability, deprecated APIs and safe upgrades, with real before/after measurement. Always produces a written findings report and a fix plan for approval before touching code. Use this whenever the user mentions Kubernetes manifests, Helm/Kustomize, resource requests/limits, OOMKilled/CrashLoopBackOff, readiness/liveness probes, HPA/PDB, NetworkPolicy, RBAC, Pod Security, cluster upgrades, K8s cost, or "optimize my Kubernetes setup" -- even if they never say audit or optimize. --- # Kubernetes Optimizer Audit a Kubernetes workload/config, report what is unsafe, unreliable or expensive and why, agree a plan, then change it. Order: evidence, approval, edits. Cluster changes can cause outages; nothing is applied before approval. ## Workflow ### 1. Scope (quick) - Find the manifests/Helm/Kustomize and record: cluster version (1.37 current; 1.36/1.35 supported; 1.34 EOL), distribution, ingress/CNI/CSI, autoscaler, workload types, namespaces and environment. - Run `python <skill-dir>/scripts/audit.py <repo-root>` -- static scan for floating images, missing probes/resources/securityContext, privileged/host access, deprecated APIs, missing PDB/NetworkPolicy/HPA, secrets in env and risky Services/Ingress, with file:line evidence. Use `--json` to post-process. - Classify the pain: reliability (OOM/crash/restarts), latency/throughput, scheduling/capacity, security/compliance, cost, or upgrade risk. Ask which hurts if unclear. - Read `references/upgrades-tooling.md` once: what can be measured here (`kubectl`, metrics-server, kube-state-metrics, scans, cost tools). ### 2. Audit The script finds cheap leads; you find the rest by reading the manifests and the live cluster. Load only what applies: | Area | Reference | |------|-----------| | Deployments/StatefulSets, probes, requests/limits, lifecycle, PDB, topology | `references/workloads.md` | | Services, Ingress, NetworkPolicy, DNS, mTLS | `references/networking.md` | | securityContext, Pod Security, RBAC, secrets, admission | `references/security.md` | | HPA/VPA/autoscaling, scheduling, capacity and cost | `references/scaling-cost.md` | | Metrics, logs, traces, events, SLOs and alerts | `references/observability.md` | | API deprecations, cluster upgrades, validation/scanning tools | `references/upgrades-tooling.md` | **Measure, never guess.** Read the live objects (`kubectl get/describe`), metrics (CPU/memory throttling, OOMKills, restarts, pending pods), events and traces. A YAML review without cluster evidence is a hypothesis; a healthy pod at low load is not capacity proof. Mark each finding **Confirmed** (kubectl/metrics/event/code evidence) or **Suspected** (needs measuring). ### 3. Report Fill `assets/report-template.md`, save it as `KUBERNETES_OPTIMIZATION_REPORT.md` in the repo root, and show the user. Five-line summary, findings table by impact/effort/risk, then per-finding detail (evidence, why it hurts, fix, risk, rollout/rollback). Group near-duplicates. ### 4. Plan -- then stop for approval Use plan mode: `EnterPlanMode` (load with ToolSearch if deferred), write the plan, present with `ExitPlanMode`; if unavailable show it in chat and wait for an explicit "go". Structure: 1. **Quick wins** -- pin images, set requests/limits, add readiness/startup probes, securityContext, PDB, NetworkPolicy, HPA, fix deprecated APIs. Low risk, manifest-only. 2. **Structural** -- right-size requests from metrics, split workloads, topology spread/anti-affinity, HPA/VPA strategy, ingress/TLS, RBAC least privilege, resource quotas, cost labels. Name each behavior change. 3. **Heavy** -- cluster upgrade, CNI/CSI/ingress replacement, autoscaler migration, multi-cluster/multi-tenant architecture. Separately approved with a staged rollout. Each step: files/cluster objects touched, expected effect, how to verify, how to roll back. ### 5. Fix Only approved items, in small groups. After each: `kubectl diff`/server-side dry-run, policy/scan checks, rollout status, and the relevant metrics. A break must trace to one change. Do not mix a cluster upgrade with workload optimization. If a change alters availability (PDB/replicas), security posture, or network reachability, stop and ask. ### 6. Verify and wrap up Re-check the same objects/metrics: restarts/OOMKills, pending pods, CPU throttling, p95/p99 latency, availability during rollout, HPA behavior, cost. State plainly what could not be measured. End with deferred items and one suggested next step. ## Principles - **Requests are scheduling; limits are enforcement.** Set requests from measured usage, not guesses. - **Probes must reflect readiness, not liveness theater.** Startup protects slow boots; readiness removes traffic; liveness restarts only true hangs. - **Least privilege by default.** Non-root, no privilege escalation, read-only rootfs, dropped capabilities, scoped RBAC. - **Availability is a budget.** PDB, replicas, topology spread and graceful termination are part of correctness. - **Network is deny-by-default where possible.** NetworkPolicy + explicit ingress/egress. - **Autoscaling needs signals.** HPA on meaningful metrics, requests set, and a node autoscaler that can react. - **Upgrade one minor at a time.** Check deprecated APIs and add-on compatibility before the control plane moves. - **Cost is a workload property.** Requests, replicas, storage class and idle capacity have owners.
Files in this package (11)
- LICENSE 1 KB
- README.md 1 KB
- SKILL.md 6 KB
- assets/report-template.md 1 KB
- references/networking.md 2 KB
- references/observability.md 2 KB
- references/scaling-cost.md 2 KB
- references/security.md 2 KB
- references/upgrades-tooling.md 2 KB
- references/workloads.md 2 KB
- scripts/audit.py 10 KB
Versions
The database has no other skills named kubernetes-optimizer.
Database snapshot: 13.11.2026 · package version ca2437693bd6 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100k8s-manifest-preapply-review
Reviews Kubernetes manifests (Deployments, StatefulSets, Services, Ingress, RBAC, NetworkPolicy, Helm-rendered YAML) before kubectl apply and reports findings by severity with YAML fixes. Use when asked to review, audit or harden k8s YAML, check securityContext, probes, resource… - 100kubernetes-expert
Expert Kubernetes: workloads, services, config, probes, resources, and troubleshooting. Trigger keywords: Kubernetes, k8s, Deployment, StatefulSet, Service, Pod, ConfigMap, Secret, Ingress, liveness, readiness, probe, requests, limits, HPA, kubectl, Helm, CrashLoopBackOff,… - 90docker-kubernetes
Docker and Kubernetes production patterns: multi-stage Dockerfile, distroless images, Kubernetes Deployment with resource limits, HPA, liveness/readiness/startup probes, ConfigMaps and Secrets, PodDisruptionBudget, NetworkPolicy, RBAC. Production checklist. Use when… - 90Kubernetes
Debugs Kubernetes workloads and reviews manifests: pods, probes, resources, rollouts, Services, storage, RBAC. Use when a pod is Pending, CrashLoopBackOff, ImagePullBackOff, OOMKilled or stuck Terminating, when a Service or Ingress serves nothing or returns 502/503/504, when… - 100kubernetes
Use when working with Kubernetes or Helm — authoring, reviewing, hardening, or debugging manifests, Deployments, Services, Ingress, RBAC, NetworkPolicy, or cluster operations - 100kubernetes-deployments
Writes production-ready Kubernetes workloads and debugs them - resource requests and limits, liveness/readiness/startup probes, rolling updates, PodDisruptionBudgets, autoscaling, security context, config and secrets, graceful shutdown, Helm or Kustomize, and kubectl…