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.
npx agentmods add instructions/benedatllc/k8stools/claude-mdgit clone --depth 1 https://github.com/BenedatLLC/k8stoolsWrote 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.
[](https://agentmods.dev/instructions/benedatllc/k8stools/claude-md)<a href="https://agentmods.dev/instructions/benedatllc/k8stools/claude-md"><img src="https://agentmods.dev/badge/instructions/benedatllc/k8stools/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01305 | $0.01305 |
| Opus 5 | $0.00652 | $0.00652 |
| Sonnet 5 | $0.00261 | $0.00261 |
| Haiku 4.5 | $0.00130 | $0.00130 |
Grade A, and why
k8stools CLAUDE.md 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.
How it starts
The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.
k8stools
Kubernetes monitoring tools for AI agents, exposed as direct Python functions or via an MCP server.
Project layout
src/k8stools/
k8s_tools.py - Core tools: Kubernetes API wrappers with Pydantic return types
mock_tools.py - Static mock versions of all tools (captured from real Minikube + OTel Demo)
redaction.py - Secret-redaction pass applied at the MCP server output boundary
mcp_server.py - MCP server (stdio or streamable-http transport)
mcp_client.py - MCP client used for manual testing
tests/
test_k8s_tools.py - Unit tests for the original tools (mocked K8s API)
test_new_tools.py - Unit tests for the 1.1.0 tools (ConfigMaps, CronJobs/Jobs, PVCs, StatefulSets, events, log enhancements)
test_redaction.py - Unit tests for the secret-redaction pass
test_k8s_tools_realk8s.py - Integration tests (real cluster, auto-skipped if unreachable)
test_mock_tools.py - Tests for mock_tools module (incl. parity with k8s_tools.TOOLS)
test_mcp_client.py - MCP client tests
test_version.py - Asserts pyproject and package __version__ agree
Environment setup
cp envrc.template .envrc
# Set KUBECONFIG in .envrc to point to your kubeconfig file
direnv allow # or source .envrc manually
uv sync
The .envrc sets KUBECONFIG and adds .venv/bin to PATH. The MCP server's mcp.json config also reads from .envrc via envFile.
Running tests
# Unit tests only (no cluster needed)
uv run pytest tests/test_k8s_tools.py tests/test_mock_tools.py -v
# Integration tests against a real cluster (skipped automatically if unreachable)
KUBECONFIG=~/.kube/your-config.yaml uv run pytest tests/test_k8s_tools_realk8s.py -v
# All tests
uv run pytest -v
Tool design patterns
Tools in k8s_tools.py follow three patterns:
- kubectl-like — Pydantic models mimicking
kubectloutput (e.g.get_pod_summaries≈kubectl get pods -o wide) - API-typed — Pydantic models that match K8s client types with lesser-used fields omitted (e.g.
get_pod_container_statuses) - Raw dict —
to_dict()on the K8s client object; return type isdict[str, Any]with fields documented in the docstring (e.g.get_pod_spec)
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.
- 5d ago First seen · 134 lines · 1,305 tokens per session scan A 58904f58cb11
k8stools CLAUDE.md is an instructions file published in the GitHub repository BenedatLLC/k8stools (3 stars, last pushed 5d ago), licensed Apache-2.0. It adds 1,305 tokens to every session, about $0.0065 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-31.
Other instructions, from other repositories
timoni AGENTS.md
AGENTS.md instructions for stefanprodan/timoni, covering agents.md, what timoni is, common commands, architecture and cmd/timoni/ — cli (cobra).
selfhost-ai CLAUDE.md
Claude Code instructions for kossakovsky/selfhost-ai, covering claude.md, project overview, core architecture, key files and installation flow.
aks-mcp copilot-instructions.md
Copilot instructions for Azure/aks-mcp, covering copilot instructions, project overview, architecture, high-level structure and key components.
gpt-rag-mcp deployment.instructions.md
Instructions for Azure/gpt-rag-mcp, a project described as: gpt-rag-mcp.
serverless-litellm CLAUDE.md
Instructions for cncoder/serverless-litellm, covering claude.md — litellm on eks 项目指南, 项目概述, 快速部署(一键), 前置条件 and 部署流程.
openclaw-kubernetes AGENTS.md
Instructions for feiskyer/openclaw-kubernetes, covering agents.md, links, development commands, lint the chart against all values files and render templates to verify correctness (output discarded).