k8s-operations

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

A set of procedures for making changes to Kubernetes resources, such as applying, creating, editing, deleting, scaling, or restarting them.

In plain words
What is it for?
It is for safely changing workloads and cluster nodes, restarting applications, cleaning up pods, and checking events and resource state.
Why use it?
It reduces the risk of unsafe changes by requiring a pre-change safety check, confirmation, and verification afterward.

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/yindia/rootcause/k8s-operations
Any agent
npx skills add yindia/rootcause --skill k8s-operations
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-operations

README.md
[![agentmods](https://agentmods.dev/badge/skills/yindia/rootcause/k8s-operations.svg)](https://agentmods.dev/skills/yindia/rootcause/k8s-operations)
Your own site
<a href="https://agentmods.dev/skills/yindia/rootcause/k8s-operations"><img src="https://agentmods.dev/badge/skills/yindia/rootcause/k8s-operations.svg" alt="Measured on agentmods" 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,719 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.00000 $0.02719
Opus 5 $0.00000 $0.01359
Sonnet 5 $0.00000 $0.00544
Haiku 4.5 $0.00000 $0.00272

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

Security

Grade A, and why

k8s-operations 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 5d 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-operations/SKILL.md · 481 lines

How it starts

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

Skill: k8s-operations

Safety-first mutation guide for Kubernetes operations with RootCause MCP tool names.

Mission

Execute mutations deliberately with evidence and guardrails.

Golden rule: no write operation without preflight.

Mutation Coverage

This skill handles:

  • k8s.apply
  • k8s.create
  • k8s.patch
  • k8s.delete
  • k8s.scale
  • k8s.rollout
  • k8s.node_management
  • k8s.cleanup_pods

Safety and verification companions:

  • k8s.safe_mutation_preflight
  • k8s.restart_safety_check
  • k8s.best_practice
  • k8s.get
  • k8s.describe
  • k8s.events_timeline

Universal Mutation Pattern

For every write operation:

  1. classify operation type
  2. run k8s.safe_mutation_preflight
  3. if restart path, run k8s.restart_safety_check
  4. execute mutation with confirm: true
  5. verify object and event state

If preflight reports blockers:

  • stop mutation
  • report blocker details
  • recommend safe alternatives

Required Confirm Rule

All write calls in this skill require confirm: true.

Never run:

  • k8s.apply without confirm
  • k8s.create without confirm
  • k8s.patch without confirm
  • k8s.delete without confirm
  • k8s.scale without confirm
  • k8s.rollout without confirm
  • k8s.node_management without confirm
  • k8s.cleanup_pods without confirm

Preflight Examples for Every Write Operation

Preflight for apply:

{
  "operation": "apply",
  "kind": "Deployment",
  "name": "api",
  "namespace": "payments",
  "manifest": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: api\n..."
}

Preflight for create:

{
  "operation": "create",
  "kind": "ConfigMap",
  "name": "api-config-v2",
  "namespace": "payments",
  "manifest": "apiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: api-config-v2\n..."
}

Preflight for patch:

{
  "operation": "patch",
  "kind": "Deployment",
  "name": "api",
  "namespace": "payments",
  "patch": "{\"spec\":{\"replicas\":6}}"
}

Preflight for delete:

{
  "operation": "delete",
  "kind": "Pod",
  "name": "api-6fd5d4f7fb-9w2rc",
  "namespace": "payments"
}

Read the full file on GitHub · 481 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. 5d ago First seen · 481 lines · 0 tokens per session scan A 4e2a02102dbb

Subscribe to this mod's changes

k8s-operations 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,719 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

upgrade-cluster

Use when upgrading or hardening an existing kube-hetzner cluster, including module version bumps, provider lockfile refreshes, k3s/RKE2 channel/version upgrades, immutable node replacement, system-upgrade-controller changes, or live cluster rollout validation.

mysticaltech/terraform-hcloud-kube-hetzner · 55 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

dependabot-batch

Use when reviewing Radar's weekly Dependabot PRs and replacing the safe, 72-hour-soaked updates with one changelog-vetted, tested PR.

skyhook-io/radar · 36 tokens