/cub-scout:observe-krofrom cub-scout
Observes KRO-managed Kubernetes resources using cub-scout. Traces resources back to kro instances, identifies ResourceGraphDefinitions, and explains kro applyset writes.
Ships in cub-scout. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The controller-specific observer skill for kro (Kubernetes Resource Orchestrator) — the project at kro-run/kro. cub-scout classifies kro-managed resources via labels, annotations, and owner-reference chains, and recognizes three distinct kro writer identities in metadata.managedFields.
Verified against pkg/agent/ownership.go detectKroOwnership and pkg/agent/manager_strings.go kro constants.
kro.run/applyset manager string mean?"scout-observeobserve-crossplanedetectKroOwnership)cub-scout walks three signal sources in order; the first hit wins:
| Pass | Signal | SubType | Confidence | Notes |
|---|---|---|---|---|
| 1 | Any label key starting with kro.run/ with a non-empty value | instance | high | Most common path — kro writes its instance identity into labels. The first matching label's value populates Name. |
| 2 | Any annotation key starting with kro.run/ with a non-empty value | instance | high | Fallback for resources where the identity is in annotations rather than labels. |
| 3 | ownerReferences[].apiVersion matches a kro API group | instance or definition | high | The owner-reference fallback for kro-generated children. definition when the owner kind is ResourceGraphDefinition. |
| 4 | Resource's own apiVersion matches a kro API group | instance or definition | high | Catches the ResourceGraphDefinition / Instance CRDs themselves when they have no labels or owner-refs to walk. |
The kro API group recognition is in isKroAPIVersion (in ownership.go) — recognizes the kro.run group family.
metadata.managedFields)Three distinct writers, all qualified with kro.run/:
| Manager | Source | Reconciles |
|---|---|---|
kro.run/applyset | kro-run/kro applyset.FieldManager | Applyset-managed child resources — the bulk of kro writes |
kro.run/applyset-parent | kro-run/kro applyset.FieldManager + "-parent" | Applyset metadata on the parent Instance |
kro.run/labeller | kro-run/kro FieldManagerForLabeler | Finalizer/label SSA writes on Instances |
controllerManagersForOwner(OwnerKro, ...) returns all three matchers as exact strings.
kro uses Kubernetes' applyset feature to track which resources belong to a logical group. The kro.run/applyset manager identifies writes to the managed children of an applyset; kro.run/applyset-parent identifies writes to the applyset parent metadata on the Instance.
Operationally:
ResourceGraphDefinition (the recipe — kinds, dependencies, transforms)Instance (or a CRD it generates from the RGD)kro.run/applyset to their managedFieldskro.run/labeller$ kubectl get deploy api -n prod -o yaml | yq '.metadata.labels, .metadata.ownerReferences, .metadata.managedFields[].manager'
labels:
kro.run/instance: payments-platform
kro.run/applyset-id: applyset-7m4k9
ownerReferences:
- apiVersion: kro.run/v1alpha1
kind: PaymentsPlatform # generated by an RGD
name: payments-platform
managers:
- kro.run/applyset
cub-scout reads this as:
$ cub-scout explain deploy/api -n prod
Resource: Deployment/api in prod
Owner: kro instance "payments-platform" (label:kro.run/instance)
Drift: None detected
Mutation cause: controller-drift (manager: kro.run/applyset)
If the labels were stripped (older kro, custom admission webhook, etc.), cub-scout falls back to ownerReferences:
$ kubectl get deploy api -n prod -o yaml | yq '.metadata.ownerReferences, .metadata.managedFields[].manager'
ownerReferences:
- apiVersion: kro.run/v1alpha1
kind: PaymentsPlatform
name: payments-platform
managers:
- kro.run/applyset
Same classification: OwnerKro instance=payments-platform. Pass 3 (ownerReferences) catches it.
ResourceGraphDefinition itself: When the RGD is the resource being observed (not an instance), Pass 4 catches it via apiVersion matching the kro group, with SubType=definition. The RGD is OwnerKro even though it has no kro labels of its own.kro.run/* labels (instance ID, applyset ID, etc.). Pass 1 picks the FIRST matching label by Go map iteration order, which is non-deterministic. The Name populated may differ across cluster reads, but the Type=kro classification is stable. This is a known limitation; see #427-adjacent discussion.kro.run/foo: "" label is skipped (Pass 1 explicitly requires value != ""); the next signal source is tried. Prevents cub-scout from labelling resources with stray empty kro annotations.OwnerFlux and kro is invisible to the ownership detector.PaymentsPlatform kind in the example). Resources of those generated kinds are still classifiable — the generated owner-reference apiVersion matches the kro group.pkg/agent/ownership.go detectKroOwnership + isKroAPIVersion, pkg/agent/manager_strings.go ManagerKroApplyset / ManagerKroApplysetParent / ManagerKroLabellerkro-run/kro applyset.FieldManagerkro-run/kro FieldManagerForLabelerscout-observe, scout-attribute, observe-crossplane (similar composition pattern, different writers)examples/kro-composition/Type classification is stable; the Name field may vary.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (confighub/cub-scout) — no native marketplace selected
npx claudepluginhub p/confighub-cub-scout35 skills in this plugin
/ai-agent-readonly-contextUse when the user is WIRING CUB-SCOUT INTO AN AI AGENT (Claude / Codex / a custom LLM workflow) and needs the patterns for read-only context, MCP gateway tools, deterministic context snapshots, and the prompt-shape that makes cub-scout's output reliable for LLMs. Natural phrasing: "set up cub-scout as a Claude tool", "expose cub-scout to my agent over MCP", "give the LLM a deterministic snapshot of this cluster", "what cub-scout patterns work well for AI agents?", "MCP config for cub-scout in Claude Code", "best practices for wiring cub-scout into Codex / Cursor / Continue", "AI-ready cluster context", "prompt template for cub-scout output". Composes `mcp serve` + `context-pack` + `--presentation ai` + the structured JSON contracts. Do NOT load for: a specific verb invocation (load the corresponding scout-* skill), authoring an MCP server in general (this is about wiring CUB-SCOUT specifically), or any mutating workflow (cub-scout never mutates; the read-only triad is the whole point of this skill)./audit-fleet-conformanceUse when the user wants to verify CONFORMANCE ACROSS A FLEET — multiple namespaces, multiple clusters, or a defined View scope. Natural phrasing: "which clusters are conformant?", "audit fleet conformance against this View", "show me all outliers in prod fleet", "compare every service against its source-truth strategy", "scope-wide three-way check for drift", "fleet-level compliance audit", "which deployments drift across the cluster?". Composes `compare three-way --view` + `compare source-truth` + `fleet outliers` for multi-resource / multi-cluster checks. Requires connected mode for the View + ConfigHub surfaces. Do NOT load for: a single resource (use investigate-drift), a triage (use triage-unhealthy-workload), incident evidence for one event (use operator-incident-evidence), or anything mutating./confighub-source-truthUse when the user wants a STRATEGY-TYPED, PILOT-ACCEPTANCE-SHAPED VERDICT about whether ConfigHub / controller / runtime agree under a declared delivery strategy — the `compare source-truth` workflow with the explicit `--strategy <name>` requirement. Natural phrasing: "give me a source-truth verdict for deploy/api", "verify under git-argo strategy that ConfigHub matches the cluster", "run the source-truth contract for upstream Pilot acceptance", "compare source-truth confighub-oci-flux strategy across the namespace", "produce strategy-relative correctness evidence", "show me where the strategy declaration is being violated". Composes `compare source-truth --strategy <s>` + the source-truth evidence contract + (optionally) `receipt verify --strategy <s>` for a fingerprinted version. Requires CONNECTED MODE. Do NOT load for: a single-resource live drift question without a declared strategy (use investigate-drift), a triage (use triage-unhealthy-workload), or a fleet-wide audit that doesn't need strategy framing (use audit-fleet-conformance). cub-scout NEVER infers a strategy — this skill enforces that boundary./cub-scoutUse when working in the cub-scout repo or when answering capability-assistant questions ("can cub-scout do X?", "should I use cub-scout or kubectl here?", "how does cub-scout differ from cub?"). This is the umbrella router — it points you at the verb-grouped scenario skills under `skills/scout-*/` and the workflow / observer / reference skills planned for batches 2–5. For a specific verb-group task (observe / diagnose / compare / attribute / adopt existing config / govern / integrate / verify) load the corresponding `scout-*` skill directly./investigate-driftUse when the user wants to compare live and desired state and inspect available manager and source evidence. Natural phrasing: "why is this Deployment different from the git manifest?", "which recognized manager is recorded for this path?", "controller-drift or interactive-manager evidence?", "compare three-way + attribution for deploy/api". Composes `compare three-way` + `compare drift` + the attribution layer (`cause` / `managerHint` / `gitSource` / `bindingSource`). Do NOT promise who changed the value or which manager wrote last: path-level manager evidence is not time-ordered, and resource-level `explain` evidence is not field-specific. Do NOT load for: a triage where the workload won't start (use triage-unhealthy-workload), pure inventory (use scout-observe), generating a fingerprinted evidence artifact (use scout-verify and the no-manual-edits-since predicate), or any mutating fix (cub-scout never mutates)./migrate-from-kubectlUse when the user is MIGRATING from ad-hoc `kubectl apply` toward GitOps (Argo / Flux / ConfigHub) — and needs to find the manual edits, decide what to do with each (revert / port to git / accept as canonical), and plan the transition. Natural phrasing: "find all the manual edits in this cluster", "we have years of kubectl-apply, help us move to GitOps", "which resources have been hand-edited?", "audit drift caused by humans not controllers", "port my cluster state to git", "show me everything kubectl-* has touched". Composes attribution layer (`cause: manual-edit`) + `map orphans` (resources without a controller owner) + `scan` (risk classification) + `snapshot` / `import --git-path` preview once a repo skeleton exists. Read-only throughout — the migration itself is user-driven. Do NOT load for: real-time triage (use triage-unhealthy-workload), single-resource drift question (use investigate-drift), a fleet conformance audit (use audit-fleet-conformance), or any mutating action.Other plugins' skills for the same job