/cub-scout:observe-fluxfrom cub-scout
Observes FLUX-managed Kubernetes resources via cub-scout and flux CLI. Traces ownership through Kustomizations, HelmReleases, and source artifacts (GitRepository, OCIRepository, Bucket).
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 Flux. Documents the four Flux controllers (kustomize, helm, source, image) cub-scout knows about, the labels/annotations each writes, the manager-string enumeration in managedFields, and the source-artifact hierarchy.
Verified against pkg/agent/ownership.go detectFluxOwnership and pkg/agent/manager_strings.go Flux constants (ManagerFluxKustomize, ManagerFluxHelm, ManagerFluxSource).
observe-argocdhelm install (not via Flux helm-controller) — observe-helmscout-observeflux CLI or YAML editing, not cub-scoutdetectFluxOwnership)cub-scout classifies a resource as Flux-owned when EITHER of two label families is present, in priority order:
| Signal | Source | SubType | Confidence | Resulting Name |
|---|---|---|---|---|
kustomize.toolkit.fluxcd.io/name label | label | kustomization | high | Kustomization name |
helm.toolkit.fluxcd.io/name label | label | helmrelease | high | HelmRelease name |
The matching *-namespace labels (kustomize.toolkit.fluxcd.io/namespace, helm.toolkit.fluxcd.io/namespace) populate the Namespace field on the resulting Ownership.
metadata.managedFields)Flux writes through Server-Side Apply with three controllers, each identified by an exact manager string:
| Controller | Manager | Reconciles |
|---|---|---|
| kustomize-controller | kustomize-controller | Resources produced by a Kustomization |
| helm-controller | helm-controller | Resources produced by a HelmRelease |
| source-controller | source-controller | The source artifacts themselves (GitRepository / HelmRepository / OCIRepository / Bucket / HelmChart) |
cub-scout's controllerManagersForOwner(OwnerFlux, ownerSubType) returns the narrow matcher set when ownerSubType is known (kustomization → only kustomize-controller; helmrelease → only helm-controller; source / gitrepository / ocirepository / helmrepository / bucket → only source-controller). When subtype is absent, all three are accepted as controller co-signals.
Flux delivery is a two-stage chain:
GitRepository / OCIRepository / HelmRepository / Bucket (source-controller)
↓ (fetched, revision pinned)
Kustomization or HelmRelease (kustomize/helm-controller)
↓ (applied)
Deployment / Service / ConfigMap … (manager: kustomize-controller / helm-controller)
cub-scout's tracer (pkg/agent/flux_trace.go) walks this chain backwards from a workload:
spec.sourceRefstatus.artifact.revision)This is what powers cub-scout trace and the gitSource{repoUrl, revision, path} evidence on compare JSON for Flux-owned resources.
| Source kind | Provides | Notes |
|---|---|---|
GitRepository | Plain Git tree | The common case. Revision is the Git SHA. |
OCIRepository | OCI artifact (e.g., a ConfigHub-rendered OCI bundle) | Revision is the OCI digest. ConfigHub-via-OCI-via-Flux strategy in source-truth. |
HelmRepository | Helm chart repo | Fed to a HelmRelease. Chart version is the anchor. |
Bucket | S3 / GCS / generic blob store | Less common; supported in the tracer. |
HelmChart | A specific chart from a HelmRepository | Inlined into HelmRelease usually; cub-scout walks through. |
The Flux interop slice (#349 / v0.20.0) explicitly covers all five source types.
$ kubectl get deploy api -n prod -o yaml | yq '.metadata.labels, .metadata.managedFields[].manager'
labels:
kustomize.toolkit.fluxcd.io/name: platform-prod
kustomize.toolkit.fluxcd.io/namespace: flux-system
managers:
- kustomize-controller
- kubectl-patch # uh oh
cub-scout reads this as:
$ cub-scout explain deploy/api -n prod
Resource: Deployment/api in prod
Owner: Flux Kustomization "platform-prod" in flux-system (label:kustomize.toolkit.fluxcd.io/name)
Drift: Detected
Mutation cause: manual-edit (manager: kubectl-patch; controller co-signal: kustomize-controller)
Git source: https://github.com/org/platform-config @abc123 path=clusters/prod/apps
The owner co-signal (kustomize-controller) plus the interactive writer (kubectl-patch) is unambiguous: someone bypassed Flux. Route the user to the original-author path: commit the change back to git, let Flux reconcile.
spec.sources[] multi-source; each Kustomization/HelmRelease has exactly one spec.sourceRef. No multi-source proof gap to worry about.source-controller writing to source artifacts: When the resource being observed IS a GitRepository / OCIRepository / etc., the writer is source-controller. cub-scout classifies these as OwnerFlux with SubType=source-controller-family (or specific subtype if known).metadata.managedFields shows helm-controller, NOT helm. The bare helm manager string means a direct helm install invocation (no Flux). See observe-helm for the disambiguation matrix.confighub.com/UnitSlug and kustomize.toolkit.fluxcd.io/name. cub-scout classifies as OwnerConfigHub (ConfigHub detection priority), and accepts kustomize-controller / helm-controller as controller co-signals. See observe-confighub-managed.cub-scout watch v2.1.0 may flip Ready=true → false for stalled Flux workloads — tracked in #427. Not a Flux-source issue, but worth knowing about when reading watch output.pkg/agent/ownership.go detectFluxOwnership, pkg/agent/manager_strings.go ManagerFluxKustomize / ManagerFluxHelm / ManagerFluxSource, pkg/agent/flux_trace.gofluxcd/kustomize-controller controllerNamefluxcd/helm-controller controllerNamefluxcd/source-controller controllerNamescout-observe, scout-attribute, observe-argocd, observe-helm, observe-confighub-managedexamples/flux-import-confighub-demo/, examples/flux-boutique/#349 (Flux Operator Interop v0.20.0)flux reconcile, flux suspend, flux resume, flux trace --apply are mutations and NOT in allowed-tools; route to the flux CLI with the user driving.Kustomization + OCIRepository fan-out; cub-scout supports parsing this layout but the configuration itself lives in Flux YAML, not in cub-scout.compare source-truth, the helm-flux strategy emits a runtime.helm_chart_anchor proof gap until the runtime chart-version extractor is plumbed in (Phase 2, partial). See scout-compare.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
35 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.Generated from the plugin's indexed repository (confighub/cub-scout) — no native marketplace selected
npx claudepluginhub p/confighub-cub-scoutOther plugins' skills for the same job