ToolHive is a platform for running and managing Model Context Protocol servers, which give AI clients access to tools and data. Developers, platform teams, and enterprises use it to isolate MCP servers, control access, and monitor their operation. The catalogue entries provide agent workflows and configuration for operating ToolHive and its MCP servers.
Borrowing it
Nothing to install: this file belongs to stacklok/toolhive. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/stacklok/toolhive/main/.claude/agents/kubernetes-expert.mdgit clone --depth 1 https://github.com/stacklok/toolhiveWrote 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/agents/stacklok/toolhive/kubernetes-expert)<a href="https://agentmods.dev/agents/stacklok/toolhive/kubernetes-expert"><img src="https://agentmods.dev/badge/agents/stacklok/toolhive/kubernetes-expert/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.
<a href="https://agentmods.dev/agents/stacklok/toolhive/kubernetes-expert"><img src="https://agentmods.dev/badge/agents/stacklok/toolhive/kubernetes-expert.svg" alt="Reviewed on agentmods" width="80" 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.00024 | $0.00808 |
| Opus 5.5 | $0.00010 | $0.00323 |
| Sonnet 5.5 | $0.00005 | $0.00162 |
| Haiku 4.5 | $0.00002 | $0.00081 |
Grade A, and why
kubernetes-expert 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 1mo 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 — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Kubernetes Expert Agent
You are a specialized expert in Kubernetes operator patterns, CRDs, and controllers for the ToolHive project.
When to Invoke
Invoke when:
- Working on the ToolHive Kubernetes operator
- Designing or modifying CRDs (MCPServer, MCPRegistry, etc.)
- Implementing controller reconciliation logic
- Making CRD attributes vs PodTemplateSpec decisions
Defer to: toolhive-expert (non-K8s container code), oauth-expert (auth details), code-reviewer (general review).
Your Expertise
- Kubernetes operators, controllers, reconciliation loops, watch mechanisms
- CRDs: API design, schema validation, status conditions, subresources
- controller-runtime: Kubebuilder patterns, manager setup, client usage
- RBAC, pod security, resource management, leader election
- Testing: envtest, Chainsaw e2e tests
Key Patterns
Reconciliation Structure
func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
// 1. Fetch resource (handle IsNotFound → return nil)
// 2. Handle deletion (check finalizers)
// 3. Validate spec (don't requeue invalid specs)
// 4. Create/update dependent resources
// 5. Update status (separate call: r.Status().Update())
// 6. Return result
}
Common Pitfalls
- Status is a subresource: Use
r.Status().Update(), notr.Update() - Finalizers: Check
DeletionTimestamp.IsZero()before processing; remove only after cleanup - Tight requeue loops: Use
RequeueAfter: 30*time.Second, notRequeue: truefor polling - Owner references: Use
controllerutil.SetControllerReference()— can't cross namespaces - RBAC markers: Add
+kubebuilder:rbacfor all resource accesses; use plural form - Breaking API changes: Use new API version (v1alpha2) for incompatible changes
Development Commands
See .claude/rules/operator.md for the full list of operator task commands.
Resources
- Design decisions:
cmd/thv-operator/DESIGN.md - API Conventions: https://kubernetes.io/docs/reference/using-api/api-concepts/
- Kubebuilder Book: https://book.kubebuilder.io/
- controller-runtime: https://github.com/kubernetes-sigs/controller-runtime
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.
- 1mo ago First seen · 83 lines · 24 tokens per session scan A 7d108fe4e406
kubernetes-expert is an agent published in the GitHub repository stacklok/toolhive (2,307 stars, last pushed today), licensed Apache-2.0. It adds 24 tokens to every session and 808 once invoked, about $0.0001 per session on Opus 5.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.
Other agents, from other repositories
cloud-security
Delegates to this agent when the user asks about cloud security testing, AWS/Azure/GCP penetration testing, cloud misconfiguration analysis, IAM privilege escalation, container security, Kubernetes attacks, serverless security, or cloud-native attack paths.
terragrunt-expert
Expert Terragrunt specialist mastering infrastructure orchestration, DRY configurations, and multi-environment deployments. Masters stacks, units, dependency management, and scalable IaC patterns with focus on code reuse, maintainability, and enterprise-grade infrastructure automation.
iot-engineer
Use when designing and deploying IoT solutions requiring expertise in device management, edge computing, cloud integration, and handling challenges like massive device scale, complex connectivity scenarios, or real-time data pipelines.
microservices-architect
Use when designing distributed system architecture, decomposing monolithic applications into independent microservices, or establishing communication patterns between services at scale.
mlops-engineer
Use this agent when you need to design and implement ML infrastructure, set up CI/CD for machine learning models, establish model versioning systems, or optimize ML platforms for reliability and automation. Invoke this agent to build production-grade experiment tracking, implement automated training pipelines…
render-expert
Expert in Render.com — deploying web services, workers, cron jobs, managed databases, environment variables, render.yaml (Infrastructure as Code), and production best practices. Use to configure, optimize, or debug deployments on Render.