/cub-scout:scout-attributefrom cub-scout
Traces Kubernetes field-level provenance: which controller or interactive manager wrote a value, which git file or ConfigHub Link supplies desired state, and whether managedFields shows manual edits. Answers "why is replicas: 1 in prod?" or "is this controller-drift or manual-edit?"
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 Attribute layer of cub-scout (#435). Reads metadata.managedFields + label-based owner detection + Argo/Flux tracer + ConfigHub Link bindings. It reports recognized manager evidence for a field path when decodable FieldsV1 is available, otherwise a resource-level manager summary, alongside the field's desired-state source where available. These manager classifications do not form a time-ordered mutation history.
Explicit phrasings:
replicas: 1 in prod when ConfigHub says replicas: 3?"kubectl edit this?" / "is this manual or controller drift?"image field on this Deployment?"controller-drift or manual-edit?"cause / managerHint field mean in this JSON?"Implicit intents:
scout-compare and wants to know who caused itscout-observe covers that via cub-scout map / cub-scout tracescout-comparescout-diagnosecub or kubectl (user driving)cause + managerHint (from managedFields), gitSource.{repoUrl, revision, path} (from controller tracer). Per-field attribution via FieldsV1 decoding (A1.5) works standalone.--source-path <dir>): Stage B back-resolution adds gitSource.file + gitSource.line for raw-YAML manifests (#440).cub auth login): adds incomingBindings[] (the ConfigHub Links influencing this unit) and per-field bindingSource (which upstream unit + path feeds each field).The attribution layer always emits something honest — if managedFields was stripped, cause: unknown and managerHint is omitted. If ConfigHub is unavailable in standalone mode, bindingSource is omitted from the JSON. The current JSON contract expresses missing evidence via cause: unknown + field omission; structured omissions[] entries are a forthcoming receipt-layer surface (in #446 batch 1, not today's attribution output). See references/kubernetes-managedfields.md § "What happens when evidence is missing" for the today-vs-future distinction.
cub-scout compare *, cub-scout explain *, cub-scout trace *, kubectl get/describe, kubectl get --show-managed-fields, cub link list/get, cub unit get/list.kubectl edit/patch/apply/delete, argocd app sync, cub * create/update/delete. Attribution reads the writer; it never becomes one.Attribution evidence is not its own verb — it's enrichment on the output of scout-compare's compare three-way and scout-diagnose's explain. The fields:
| Field | Means | Source |
|---|---|---|
cause | One of controller-drift, manual-edit, unknown. A classification of recognized manager evidence for the mapped path, or a resource-level rollup when path attribution is unavailable. It does not say who wrote last. | metadata.managedFields + owner co-signal |
managerHint | A representative recognized manager string (e.g., argocd-controller, kubectl-edit) for transparency. Resource-level explain output aggregates manager strings across the object. | metadata.managedFields[].manager |
gitSource | {repoUrl, revision, path, file?, line?} — where the field's desired value lives in git | Controller spec (Argo Application / Flux GitRepository) + optional --source-path back-resolution (#440) |
bindingSource | {linkId, linkSlug, upstreamUnitId, upstreamPath, transformExpr} — the ConfigHub Link that supplies this field's value | cub link list for the owning unit |
incomingBindings[] | All Links whose downstream is this resource's unit | cub link list --where "FromUnitID = ..." |
See references/verified-manager-strings.md for the full enumeration of recognized manager strings and references/kubernetes-managedfields.md for the data substrate.
replicas: 1, image: ghcr.io/.../v1.4, env[LOG_LEVEL]) — figure out which resource and which field../cub-scout explain <kind>/<name> -n <ns> --field-path '<path>' --format json directly (MCP: explain with field_path). Do not run doctor, map, trace, or a broad compare first just to rediscover manager evidence. The fieldAttribution block is scoped to the requested path; the normal resource summary remains. Absent, malformed, unrecognized-only, or ambiguous evidence remains unknown and never falls back to resource-level evidence. Do not guess a canonical path; if the path is not known, use the comparison/read needed to identify it or ask the user../cub-scout explain <kind>/<name> -n <ns>. Its mutationCause and representative mutationManager aggregate manager evidence across the resource; they do not identify a field or latest writer../cub-scout compare three-way --scope resource:<kind>/<name> or --scope namespace/<ns> when the user also needs intended/live values or a divergence identified. A mismatch can use the mapped path's cause and managerHint when decodable FieldsV1 is available; otherwise it may fall back to the resource-level summary, which must not be stated as evidence for that field. This classification does not order managers by time.cause:
controller-drift → a recognized expected-controller manager claims the resource or mapped path; this does not establish that reconciliation is happening nowmanual-edit → a recognized interactive manager is present in the resource-level rollup or on the mapped compare path; this does not establish that it wrote last or identify a person. On an exact fieldAttribution query, shared controller and interactive claims or any unrecognized co-claimant make the field cause unknown, while all observed managers remain visible.unknown → manager evidence is missing, unrecognized, or cannot be mapped; never guessgitSource: when present, this is the git origin of the desired value. Add --source-path <local-checkout> to populate file + line (stage B back-resolution, raw YAML only — #440).bindingSource (connected only): which upstream ConfigHub unit + path supplies this field. incomingBindings[] shows the full Link graph for the unit.cause: manual-edit as manager evidence, not proof of a person or latest write. If the user separately needs raw entry details or timestamps, inspect that field's managedFields path; timestamps still do not identify a person and may not establish the latest writer. If the record is incomplete or ambiguous, say unknown. Any correction remains user-driven; cub-scout does not mutate.The primary v1 path. No ConfigHub auth required.
$ cub-scout compare three-way Deployment/api -n prod --source-path /home/me/platform-config
Drift cause: controller-drift (manager: argocd-controller)
Git source: https://github.com/org/platform-config @abc123 path=apps/prod/api file=deployment.yaml:9
Diff Highlights
- replicas: DRY=3 | WET=3 | LIVE=1
Standalone — no ConfigHub. Argo is the controller; the gitSource.file:line points at the exact line in the local checkout where replicas is set. Stage B (#440) — raw YAML only; Helm/Kustomize templated sources fall back to resource-level gitSource (no file:line).
Without --source-path, the resource-level gitSource still applies — repoUrl, revision, path from the controller's spec.
$ cub-scout compare three-way Deployment/api -n prod
Compare Resource: Deployment/api (namespace: prod)
Mode: dry-live Connection: connected
DRY (unit intent)
replicas: 3
LIVE (cluster)
replicas: 1
Drift cause: manual-edit (manager: kubectl-edit)
Diff Highlights
- replicas: DRY=3 | WET=- | LIVE=1
<- bound from unit:01HFK...XY path:.spec.scale.value via link:replicas-from-scale
There is no WET side: ConfigHub no longer exposes a unit's live data, so a connected compare shows DRY against LIVE (Mode: dry-live) and says so in its notes.
For this .spec.replicas mismatch, a path-specific manual-edit classification means a recognized interactive manager is recorded for that path (when decodable FieldsV1 is available); a controller manager may also be recorded. It does not prove which manager wrote the value last or identify who ran a command. A resource-level fallback must not be stated as evidence about replicas. The bound from line tells the user the upstream ConfigHub unit + path that should be feeding replicas — that's the C2 connected enrichment on top of standalone's cause + gitSource.
Next read-only step (don't apply!): inspect the exact path's managed-field entries; use audit logs if the user needs write history or identity.
$ kubectl get deploy/api -n prod -o yaml --show-managed-fields | grep -A 3 "manager: kubectl-edit"
- manager: kubectl-edit
operation: Update
time: "2026-05-21T13:42:00Z"
fieldsV1: { f:spec: { f:replicas: {} } }
So replicas was overwritten by kubectl edit at 13:42 UTC. The user can now decide: port back to ConfigHub (governed) or revert (also governed). The skill does not act.
$ cub-scout compare three-way Deployment/api -n prod --format json | \
jq '.mismatches[] | {field, cause, managerHint, bindingSource}'
{
"field": "replicas",
"cause": "manual-edit",
"managerHint": "kubectl-edit",
"bindingSource": {
"linkId": "01HFK...A1",
"linkSlug": "replicas-from-scale",
"upstreamUnitId": "01HFK...XY",
"upstreamPath": ".spec.scale.value",
"transformExpr": "to_int"
}
}
The agent can say that the live replicas path is associated with the kubectl-edit manager while the intended value comes from upstream unit 01HFK...XY at path .spec.scale.value via link replicas-from-scale. The manager string does not identify a human or prove it was the latest write.
compare three-way JSON and explain JSON — there is no cub-scout attribute command. The Attribute layer is enrichment, not its own verb.docs/reference/json-contracts.md § "Field Mutation Attribution Contract" for the full schema.examples/drift/mutation-cause-attribution/.README.md § Attributereferences/verified-manager-strings.mdreferences/kubernetes-managedfields.mdcub-scout receipt verify output once #446 batch 1 landscause: manual-edit is a manager-presence signal, not proof of a person or the latest writer. managedFields records a manager string, not the human identity behind it. To attribute to a specific user or order writes, cross-reference cluster audit logs (out of scope for cub-scout).kubectl-client-side-apply manager string is ambiguous — Argo CD's CSA migration uses it as the default, and so does kubectl apply (client-side). The classifier disambiguates via the argocd.argoproj.io/tracking-id annotation (label co-signal). See references/verified-manager-strings.md.apiextensions.crossplane.io/composed-<hash>). The classifier matches by prefix, not exact string.gitSource.file:line is not populated (stage B handles raw YAML only). Resource-level gitSource (repoUrl, revision, path) still applies.cub-scout path can act on the evidence. Always hand off mutation to the appropriate cub / kubectl skill with the user driving.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