borghei/kubernetes-operator
> Design, build, and operate Kubernetes operators. Use when extending Kubernetes with a custom controller, choosing a framework, designing CRDs, implementing reconciliation loops, or auditing an operator for anti-patterns.
npx skills add https://github.com/borghei/Claude-Skills --skill kubernetes-operator
End-to-end Kubernetes operator design and construction. Covers the operator pattern (control loops for stateful workloads), CRD design (schema, validation, conversion, status), the reconciliation loop (idempotency, convergence, level- vs edge-triggered), framework selection (controller-runtime / Kubebuilder / operator-SDK / metacontroller), and operational concerns (finalizers, leader election, RBAC scoping, status subresource, observability). Targets Go-based operators (the dominant ecosystem) with notes on alternatives (KOPF, JOSDK, kube-rs).
| Situation | Skill applies |
|-----------|---------------|
| Building a new operator for an internal platform primitive | Yes — start with the operator pattern decision |
| Auditing an existing operator for production-readiness | Yes — use anti-patterns + scripts/reconciliation_audit.py |
| Designing CRDs for a custom resource | Yes — use CRD design + scripts/crd_validator.py |
| Deciding "operator vs Helm chart vs plain manifests" | Yes — use the decision matrix |
| Scaffolding a new operator project | Yes — scripts/operator_scaffold.py |
| Debugging a controller that "isn't reconciling" | Yes — use reconciliation troubleshooting |
| Just running someone else's operator (Postgres, Kafka, etc.) | Partially — useful for understanding what it does and how to monitor it |
Before scaffolding or auditing, confirm these inputs. If any is unknown or vague, ASK — do not assume:
operator_scaffold.py vs crd_validator.py vs reconciliation_audit.py)--name/--group/--kind); for validation/audit: the CRD YAML or controller path (the input the scripts read)Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.
| Tool | Purpose | Command |
|------|---------|---------|
| crd_validator.py | Validate CRD YAML against design best practices (preserve-unknown, missing descriptions/enums/printer-columns, status subresource, cluster-scope) | python3 scripts/crd_validator.py --schema my-crd.yaml --format markdown |
| operator_scaffold.py | Generate a production-ready operator project skeleton with stricter RBAC, observability, and finalizer scaffolding | python3 scripts/operator_scaffold.py --name db-operator --group example.com --kind Database |
| reconciliation_audit.py | Audit Go controller source + CRDs for static-detectable anti-patterns (missing finalizers, no leader election, tight loops, no ownerRef, wide RBAC) | python3 scripts/reconciliation_audit.py --controller-path ./internal/controllers --crd ./config/crd/bases/*.yaml |
All scripts: stdlib only, argparse CLI, JSON or markdown output.
Load the reference that matches the task — keep this file lean and pull detail on demand:
Covers: operator pattern decisions; CRD design (schema/validation/versioning/conversion/subresources); idempotent reconciliation loops; Go controller-runtime / Kubebuilder / operator-SDK patterns; finalizers, leader election, RBAC scoping, observability; anti-pattern auditing. Primary target is Go operators, with notes on KOPF (Python), JOSDK (Java), kube-rs (Rust).
Does NOT cover: operating third-party community operators beyond understanding/monitoring them; cloud-provider-specific resource provisioning (see Crossplane); general Kubernetes cluster administration.
| Skill | Integration |
|-------|------------|
| engineering/chaos-engineering | Chaos-test operators (kill the controller, partition from API server) |
| engineering/observability-designer | Wire metrics + logging for operators |
| engineering/incident-commander | Operators amplify blast radius; incident response matters more |
| engineering/feature-flags-architect | Operators with spec.feature.<x>.enabled fields effectively become flag systems; consider the trade-off |
Take borghei/kubernetes-operator from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.