/cub-scout:observe-crossplanefrom cub-scout
Observes Crossplane-managed resources (XRs, Claims, Compositions, MRDs, ProviderConfigs) using cub-scout. Traces composed children, decodes manager strings, and maps the crossplane-system control plane. Not for generic ownership, Helm/Argo/Flux, or authoring Crossplane CRDs.
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 Crossplane. cub-scout's coverage here is comprehensive — XRs, Claims, MRDs, composite/composed, the reference resolver, and the crossplane-system control-plane subset. This skill is the field guide.
Verified against pkg/agent/ownership.go (detectCrossplaneOwnership, detectCrossplaneSystemOwnership) and pkg/agent/manager_strings.go Crossplane constants.
Marked experimental in CLAUDE.md § "Ownership Detection" — the breadth of provider-specific writers Crossplane gets composed through means edge cases keep appearing.
apiextensions.crossplane.io/composed-<hash> manager string mean?"*.crossplane.io or *.upbound.io?"scout-observeobserve-* skillsdetectCrossplaneOwnership + detectCrossplaneSystemOwnership)Crossplane detection runs in two passes:
detectCrossplaneSystemOwnership)Catches the Crossplane control-plane / package-manager API groups even when they're not managed by GitOps. Narrow on purpose — broad capture would mislabel provider-managed resources like *.aws.crossplane.io.
| Trigger | SubType | Confidence | Notes |
|---|---|---|---|
apiVersion in pkg.crossplane.io or apiextensions.crossplane.io | system | high | XRDs, Compositions, Providers, ProviderRevisions, Functions, FunctionRevisions, Configurations |
Resource in crossplane-system namespace AND apiGroup ends in .crossplane.io or .upbound.io AND kind is one of: providerrevision, configurationrevision, functionrevision, provider, configuration, function, deploymentruntimeconfig | system | medium | Heuristic — best-effort for the control-plane subset that lives in crossplane-system |
detectCrossplaneOwnership)Catches managed resources produced by Crossplane workflows.
| Signal | SubType | Confidence | Notes |
|---|---|---|---|
crossplane.io/claim-name label | claim | high | Resource was created from a Claim. crossplane.io/claim-namespace label populates Namespace. |
crossplane.io/composite label | composite | high | Resource is a composed child of an XR. Name = composite name. |
crossplane.io/composition-resource-name annotation | managed-resource | medium | Names the slot within a Composition that produced this resource. |
ownerReferences[].apiVersion matches *crossplane.io* or *upbound.io* | <lowercase owner kind> | high | The owner-reference fallback when labels aren't present. |
The two passes are intentional: control-plane resources (XRDs, Compositions, etc.) classify differently from workload resources (a Composite Resource's Deployment, etc.). The control-plane pass runs FIRST so a Composition itself never gets misclassified as managed-resource.
metadata.managedFields)Five distinct writers, four of which appear on managed children, plus the reference resolver:
| Manager | Source | Reconciles |
|---|---|---|
apiextensions.crossplane.io/composite | crossplane/crossplane FieldOwnerXR | Fields on the XR itself (composite-controller writes) |
apiextensions.crossplane.io/composed-<hash> | crossplane/crossplane FieldOwnerComposedPrefix + ComposedFieldOwnerName | Fields on composed children (one suffix per XR). Match by prefix only. |
apiextensions.crossplane.io/claim | crossplane/crossplane claim package | Fields synced from a Claim back to its XR |
apiextensions.crossplane.io/managed | crossplane/crossplane FieldOwnerMRD | Fields written by the managed-resource-definition reconciler |
managed.crossplane.io/api-simple-reference-resolver | crossplane/crossplane-runtime fieldOwnerAPISimpleRefResolver | Cross-resource reference resolution (every provider that links via crossplane-runtime) |
controllerManagersForOwner(OwnerCrossplane, ...) returns all five matchers, with the composed-prefix one matching by strings.HasPrefix.
apiextensions.crossplane.io/composed-<hash> is the only manager string in cub-scout's enumeration that does NOT match by exact equality. The <hash> is per-XR (Crossplane computes it from the XR identity), so trying to match on the exact string would miss every other XR. The matcher uses strings.HasPrefix, captured in the managerMatcher{pattern, isPrefix} shape in manager_strings.go.
$ kubectl get bucket my-bucket -n crossplane-system -o yaml | yq '.metadata.labels, .metadata.ownerReferences, .metadata.managedFields[].manager'
labels:
crossplane.io/composite: storage-prod-7m4k9
crossplane.io/claim-name: storage-prod
crossplane.io/claim-namespace: platform
ownerReferences:
- apiVersion: storage.acme.io/v1alpha1
kind: XStorage
name: storage-prod-7m4k9
managers:
- apiextensions.crossplane.io/composite
- apiextensions.crossplane.io/composed-9f3a2b
- managed.crossplane.io/api-simple-reference-resolver
cub-scout reads this as:
$ cub-scout explain bucket/my-bucket -n crossplane-system
Resource: Bucket/my-bucket in crossplane-system
Owner: Crossplane composite "storage-prod-7m4k9" (label:crossplane.io/composite)
Drift: None detected
Mutation cause: controller-drift (manager: apiextensions.crossplane.io/composed-9f3a2b)
The matcher correctly identifies apiextensions.crossplane.io/composed-9f3a2b via the prefix match.
Composition resource lives in crossplane-system AND its apiGroup is apiextensions.crossplane.io. Pass 1 catches it → SubType=system. Pass 2 would otherwise misclassify it. Don't reorder.crossplane.io/claim-name wins (Pass 2 priority order). The composite name is recoverable from the ownerReference chain.*crossplane.io* or *upbound.io* in apiVersion). If neither matches, the resource classifies as OwnerUnknown (parse-don't-guess).apiextensions.crossplane.io/managed (MRD): A WRITER, not a detector signal. cub-scout's ownership detector doesn't look for this manager string to identify ownership — it identifies XR/Claim/composite via labels first. MRD is only relevant as a controller co-signal once ownership is already established.crossplane-runtime will produce a managed.crossplane.io/api-simple-reference-resolver entry in managedFields. This is normal and counts as controller-drift (the controller resolved a reference), not manual-edit.Crossplane providers reference auth secrets via ProviderConfig.spec.credentials.secretRef. cub-scout's secret evidence layer (#328) detects these and surfaces them in trace output. Cross-namespace resolution is handled (a ProviderConfig in crossplane-system can reference a secret in any namespace). The secret status surfaces as present / missing / unreadable / unresolved — see scout-observe for the secret evidence surface.
pkg/agent/ownership.go detectCrossplaneOwnership + detectCrossplaneSystemOwnership, pkg/agent/manager_strings.go ManagerCrossplaneComposite / ManagerCrossplaneComposedPrefix / ManagerCrossplaneClaim / ManagerCrossplaneMRD / ManagerCrossplaneRefResolvercrossplane/crossplane FieldOwnerXR / FieldOwnerComposedPrefix / FieldOwnerMRDcrossplane/crossplane-runtime fieldOwnerAPISimpleRefResolverscout-observe, scout-attribute, observe-native (for OwnerReference fallback)examples/crossplane-system/unknown. Parse, don't guess.crossplane install, crossplane update, claim creation / mutation are out of allowed-tools.manual-edit regardless of how exotic the controller chain is.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.Other plugins' skills for the same job