k8s-policy

k8s-policy is a skill for Claude Code, Codex from rohitg00/kubectl-mcp-server. It costs 30 tokens per session (1,231 once invoked), scanned A, original, MIT.

Instructions for managing Kubernetes policies with Kyverno and Gatekeeper, tools that check whether cluster resources follow defined rules.

In plain words
What is it for?
Detecting policy engines, listing and inspecting policies or constraints, auditing violations, and validating resources.
Why use it?
They help identify the policy system in use, review violations, and check policies before enforcing them.

Skill for Claude CodeCodex

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

Good fit Detecting policy engines, listing and inspecting policies or constraints, auditing violations, and validating resources.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rohitg00/kubectl-mcp-server/k8s-policy
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 rohitg00/kubectl-mcp-server --skill k8s-policy
Clone the repo
git clone --depth 1 https://github.com/rohitg00/kubectl-mcp-server

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/rohitg00/kubectl-mcp-server/k8s-policy"><img src="https://agentmods.dev/badge/skills/rohitg00/kubectl-mcp-server/k8s-policy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,231 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. 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.00030 $0.01231
Opus 5 $0.00015 $0.00616
Sonnet 5 $0.00006 $0.00246
Haiku 4.5 $0.00003 $0.00123

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

Security

Grade A, and why

k8s-policy 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 11d 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.

kubernetes-skills/claude/k8s-policy/SKILL.md · 220 lines

How it starts

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

Kubernetes Policy Management

Manage policies using kubectl-mcp-server's Kyverno and Gatekeeper tools.

When to Apply

Use this skill when:

  • User mentions: "Kyverno", "Gatekeeper", "OPA", "policy", "compliance"
  • Operations: enforcing policies, checking violations, policy audit
  • Keywords: "require labels", "block privileged", "validate", "enforce"

Priority Rules

Priority Rule Impact Tools
1 Detect policy engine first CRITICAL kyverno_detect_tool, gatekeeper_detect_tool
2 Use Audit mode before Enforce HIGH validationFailureAction
3 Check policy reports for violations HIGH kyverno_clusterpolicyreports_list_tool
4 Review constraint templates MEDIUM gatekeeper_constrainttemplates_list_tool

Quick Reference

Task Tool Example
List Kyverno cluster policies kyverno_clusterpolicies_list_tool kyverno_clusterpolicies_list_tool()
Get Kyverno policy kyverno_clusterpolicy_get_tool kyverno_clusterpolicy_get_tool(name)
List Gatekeeper constraints gatekeeper_constraints_list_tool gatekeeper_constraints_list_tool()
Get constraint gatekeeper_constraint_get_tool gatekeeper_constraint_get_tool(kind, name)

Kyverno

Detect Installation

kyverno_detect_tool()

List Policies

kyverno_clusterpolicies_list_tool()

kyverno_policies_list_tool(namespace="default")

Get Policy Details

kyverno_clusterpolicy_get_tool(name="require-labels")
kyverno_policy_get_tool(name="require-resources", namespace="default")

Policy Reports

kyverno_clusterpolicyreports_list_tool()

kyverno_policyreports_list_tool(namespace="default")

Common Kyverno Policies

kubectl_apply(manifest="""
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: require-labels
spec:
  validationFailureAction: Enforce
  rules:
  - name: require-app-label
    match:
      resources:
        kinds:
        - Pod
    validate:
      message: "Label 'app' is required"
      pattern:
        metadata:
          labels:
            app: "?*"
""")

kubectl_apply(manifest="""
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: require-limits
spec:
  validationFailureAction: Enforce
  rules:
  - name: require-cpu-memory
    match:
      resources:
        kinds:
        - Pod
    validate:
      message: "CPU and memory limits required"
      pattern:
        spec:
          containers:
          - resources:
              limits:
                cpu: "?*"
                memory: "?*"
""")

Read the full file on GitHub · 220 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. 11d ago First seen · 220 lines · 30 tokens per session scan A 6101a7d0a244

Subscribe to this mod's changes

k8s-policy is a skill published in the GitHub repository rohitg00/kubectl-mcp-server (956 stars, last pushed 5mo ago), licensed MIT. It adds 30 tokens to every session and 1,231 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.