observe-helm
Use when the user wants to observe HELM-managed resources specifically — the controller-specific observer skill for Helm. The key complication: there are three ways a resource can "be Helm" — direct `helm install/upgrade`, Flux helm-controller delivering a HelmRelease, and Argo CD rendering Helm charts as an Application source. This skill teaches the disambiguation matrix. Natural phrasing: "is this a Helm release?", "which Helm chart produced this deployment?", "is this Helm-via-Flux or direct Helm or Argo-as-Helm-renderer?", "what does `app.kubernetes.io/managed-by: Helm` mean here?", "trace this Helm release back to source". Do NOT load for: Flux-specifically (use observe-flux for the Kustomization side), Argo-specifically (use observe-argocd), generic ownership (use scout-observe), authoring Helm charts.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 14
- Forks
- 1
01 前言 Front Matter
- name
- observe-helm
- phase
- cross-cutting
- description
- Use when the user wants to observe HELM-managed resources specifically — the controller-specific observer skill for Helm. The key complication: there are three ways a resource can "be Helm" — direct `helm install/upgrade`, Flux helm-controller delivering a HelmRelease, and Argo CD rendering Helm charts as an Application source. This skill teaches the disambiguation matrix. Natural phrasing: "is this a Helm release?", "which Helm chart produced this deployment?", "is this Helm-via-Flux or direct Helm or Argo-as-Helm-renderer?", "what does `app.kubernetes.io/managed-by: Helm` mean here?", "trace this Helm release back to source". Do NOT load for: Flux-specifically (use observe-flux for the Kustomization side), Argo-specifically (use observe-argocd), generic ownership (use scout-observe), authoring Helm charts.
- allowed-tools
- Bash(./cub-scout doctor *) Bash(cub-scout doctor *) Bash(cub scout doctor *) Bash(./cub-scout explain *) Bash(cub-scout explain *) Bash(cub scout explain *) Bash(./cub-scout trace *) Bash(cub-scout trace *) Bash(cub scout trace *) Bash(./cub-scout map list *) Bash(./cub-scout map workloads *) Bash(./cub-scout map orphans *) Bash(cub-scout map list *) Bash(cub-scout map workloads *) Bash(cub-scout map orphans *) Bash(cub scout map list *) Bash(cub scout map workloads *) Bash(cub scout map orphans *) Bash(kubectl get *) Bash(kubectl describe *) Bash(kubectl get --show-managed-fields *) Bash(helm list *) Bash(helm get *) Bash(helm status *) Bash(helm history *) Bash(flux get hr *) Bash(argocd app get *)
02 资源文件 1
- 参考文档agents/openai.yaml119 B
03 SKILL.md 正文
observe-helm
The controller-specific observer skill for Helm. The complication: "Helm-managed" can mean three different things depending on who wrote app.kubernetes.io/managed-by: Helm. This skill teaches the disambiguation matrix and the manager-string co-signal that resolves it.
Verified against pkg/agent/ownership.go detectHelmOwnership and pkg/agent/manager_strings.go ManagerHelm.
When to use
- "Is this a Helm release?"
- "Which Helm chart produced deploy/api?"
- "Is this Helm-via-Flux, direct Helm, or Argo-as-Helm-renderer?"
- "What does the
app.kubernetes.io/managed-by: Helmlabel actually mean here?" - "Trace this Helm release back to its chart + source"
Do not load for
- Flux specifically (Kustomization side, source-controller, the rest of Flux) —
observe-flux - Argo CD Applications (even when the source is a Helm chart, Argo writes are Argo writes) —
observe-argocd - Generic ownership detection —
scout-observe - Authoring Helm charts / writing values.yaml — out of cub-scout scope
Detection signals (in detectHelmOwnership)
cub-scout classifies a resource as Helm-owned when either of two label families is present:
| Signal | Source | SubType | Confidence | Resulting Name |
|---|---|---|---|---|
app.kubernetes.io/managed-by: Helm label |
label | release |
high | Value of app.kubernetes.io/instance |
helm.sh/chart label |
label | release |
high | Value of app.kubernetes.io/instance (falls back to chart name) |
Both are written by Helm v3's default release labels. Pre-v3 Helm charts wrote helm.sh/chart only; v3+ writes both.
The three-ways-to-be-Helm disambiguation matrix
This is the unique value of this skill. Same labels appear in all three cases; the manager string in metadata.managedFields distinguishes them.
| Scenario | managed-by label |
Manager string in managedFields |
cub-scout classification |
|---|---|---|---|
Direct helm install/upgrade (a human or CI ran the CLI) |
Helm |
helm (bare; the default kube.ManagedFieldsManager from helm/helm) |
OwnerHelm + controller manager is helm |
| Flux helm-controller (HelmRelease CRD) | Helm (Helm v3 sets it even when called via the library) |
helm-controller |
OwnerFlux SubType=helmrelease (Flux labels take detection priority over Helm); controller co-signal is helm-controller |
| Argo CD Application sourcing a Helm chart | Helm (Argo renders Helm and applies the result) |
argocd-controller or kubectl-client-side-apply |
OwnerArgo SubType=application (Argo labels take detection priority); controller co-signal is argocd-controller |
cub-scout's ownership detector runs in priority order — Flux first, then Argo, then Helm. So a HelmRelease-managed resource is OwnerFlux, not OwnerHelm. A pure direct-Helm resource is OwnerHelm because nothing else claimed it first.
The ManagerHelm = "helm" constant in manager_strings.go denotes the bare Helm CLI invocation, which is what you see in scenario 1 only. Third-party embedders (Flux helm-controller, terraform-provider-helm) override the field-manager identity with their own name.
Manager strings
| Manager | Source | Meaning |
|---|---|---|
helm |
upstream helm/helm kube.ManagedFieldsManager default (filepath.Base(os.Args[0])) |
Direct helm install / helm upgrade invocation. |
That's it — the bare helm string is the only one cub-scout treats as a "Helm controller" writer. Anything else writing Helm-labelled resources is some OTHER controller using the Helm library, and its identity is in its manager string (helm-controller, argocd-controller, etc.).
controllerManagersForOwner(OwnerHelm, ...) returns just {ManagerHelm} — the narrow match.
Worked example
# Direct helm install
$ kubectl get deploy api -n prod -o yaml | yq '.metadata.labels, .metadata.managedFields[].manager'
labels:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/instance: payments-api
helm.sh/chart: payments-api-1.2.3
managers:
- helm
cub-scout reads this as OwnerHelm release=payments-api. A subsequent kubectl edit adds a kubectl-edit manager → drift cause is manual-edit.
# Flux helm-controller
$ kubectl get deploy api -n prod -o yaml | yq '.metadata.labels, .metadata.managedFields[].manager'
labels:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/instance: payments-api
helm.sh/chart: payments-api-1.2.3
helm.toolkit.fluxcd.io/name: payments-api # ← Flux label wins
helm.toolkit.fluxcd.io/namespace: flux-system
managers:
- helm-controller
cub-scout reads this as OwnerFlux helmrelease=payments-api in flux-system. The Helm labels are still there but the Flux label takes priority. The controller co-signal is helm-controller, not bare helm.
# Argo CD as Helm renderer
$ kubectl get deploy api -n prod -o yaml | yq '.metadata.labels, .metadata.managedFields[].manager'
labels:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/instance: payments-api # Helm chart's instance label
argocd.argoproj.io/instance: payments-app # ← Argo label
helm.sh/chart: payments-api-1.2.3
managers:
- argocd-controller
cub-scout reads this as OwnerArgo application=payments-app. Argo rendered the Helm chart and applied the result; the managed-by: Helm label is an artifact of the chart, not evidence of who's reconciling.
Edge cases
- No instance label:
app.kubernetes.io/managed-by: Helmwithoutapp.kubernetes.io/instanceproducesOwnerHelmwith an emptyName. cub-scout falls back to thehelm.sh/chartlabel value when available. - Legacy charts: Pre-v3 Helm wrote only
helm.sh/chart. cub-scout's second detector branch handles this — producesOwnerHelmwithNamefromapp.kubernetes.io/instanceor, if that's also missing, from the chart name itself. - Argo as Helm renderer for ConfigHub: When ConfigHub renders a unit through Argo with a Helm source, the resource has
confighub.com/UnitSlug+ Argo labels + Helm labels. ConfigHub detection runs first →OwnerConfigHub. Seeobserve-confighub-managed. terraform-provider-helm: Writes its own manager identity (terraform-provider-helm), so resources installed through it look like Helm-labelled with a TF-attributable manager. cub-scout's verified manager enumeration does NOT include this string — falls through tocause=unknown, parse-don't-guess.source-truth-passpredicate caveat: Thehelm-fluxandhelm-argostrategies emit aruntime.helm_chart_anchorproof gap because the runtime chart-version extractor isn't fully wired (Phase 2 of #409). The strategy still produces a verdict; the gap is recorded inomissions[].
References
- Code:
pkg/agent/ownership.godetectHelmOwnership,pkg/agent/manager_strings.goManagerHelm - Upstream:
- Helm field-manager default:
helm/helmkube.ManagedFieldsManager—filepath.Base(os.Args[0]) - Helm v3 labels: Helm chart best practices — Labels and Annotations
- Helm field-manager default:
- Related skills:
observe-flux,observe-argocd,scout-attribute,scout-compare(thehelm-*strategies)
Constraints
- This skill is read-only.
helm install,helm upgrade,helm rollback,helm uninstallare mutations and NOT in allowed-tools; route to the user driving thehelmCLI. - The disambiguation matrix is the value here. Don't conflate Helm-via-Flux with direct Helm — the operator response is completely different (revert via Flux reconcile vs. helm rollback).
app.kubernetes.io/managed-by: Helmis necessary but not sufficient to call something "Helm-managed" — always check the manager string and the Flux/Argo label co-signals.
04 同仓库更多 Skills
异常工作负载故障分诊
triage-unhealthy-workload
当用户需要在时间压力下应对出现故障的 Kubernetes 工作负载时使用——例如寻呼告警响起、CI 飘红、“生产环境挂了”的场景。自然表述包括:“deploy/api 出现 CrashLoopBackOff,该怎么办?”“发布卡住了,帮帮我”“这个 pod 起不来”“支付服务触发了寻呼告警”“argocd 里全红了”“我应该先检查什么?”“给我一份针对这个工作负载的分诊方案”。它将 doctor → explain → trace 组合成一个紧凑的约 30 秒循环,运维人员可在已确认寻呼告警的上下文中执行。不要用于:没有紧迫性的计划性排查(直接使用 scout-diagnose)、漂移相关问题(使用 investigate-drift),或任何变更操作(cub-scout 从不做变更——应由用户主导,转由 kubectl 处理)。
资源证据收据生成与校验
scout-verify
当用户需要针对某个 Kubernetes 资源生成带类型、带指纹、不可篡改(TYPED、FINGERPRINTED、IMMUTABLE)的证据工件时使用——即 cub-scout 的 Verify 动词组(在 #446 中发布的收据能力)。自然表述包括:“出具一份证明此资源合规的收据”“给我一份证明集群与 Git 一致的证明”“我需要一份可用于审计跟踪的可验证记录”“生成一份收据,证明自部署以来没有人工改动”“对照事实源(source-truth)校验 deploy/api 并保存工件”“验证此收据未被篡改”“展示我们有哪些收据”“此收据是否被篡改过?”“把证据附加到我的 CI 关卡”。当意图涉及 receipt / attestation / evidence-artifact / tamper-evident-record / verified-record / audit-trail / postmortem-evidence / acceptance-judge-input 时均应加载。不要用于:不落盘工件的实时比对(使用 scout-compare)、解读单个字段的来源出处(使用 scout-attribute),或真正实施修复(cub-scout 从不做变更——应由用户主导,转由 cub / argocd / kubectl 处理)。
scout-observe
Use when the user wants to SEE what is running in a Kubernetes cluster, who owns it, and how it is structured — the read-only Observe verb group of cub-scout. Natural phrasing: "what is running in my cluster?", "give me a map of resources", "who owns this Deployment?", "trace this back to its source", "show me the ownership tree", "scan this cluster for risk", "dump the cluster as JSON", "stream cluster events", "run cub-scout as a bot", "what is the connection status?", "is this cluster healthy?". Load when intent is observe / inventory / map / show / list / trace / scan / dump / stream / bot / health-check over a Kubernetes cluster. Do NOT load for: explaining WHY something is broken (use scout-diagnose), comparing cluster state to intended state (use scout-compare), provenance of individual field values (use scout-attribute), or any action that mutates the cluster (cub-scout never mutates — route to cub or kubectl with the user driving).
scout-mcp
Use when the user wants to expose cub-scout to an AI agent over MCP, wants a deterministic AI-ready snapshot of cluster context, or wants cub-scout running as a read-only event bot — the Integrate verb group. Natural phrasing: "start the MCP server", "expose cub-scout to Claude / Codex / my agent", "give me an AI-ready context pack of this cluster", "set up the MCP gateway", "what MCP tools does cub-scout expose?", "run cub-scout as a bot", "produce JSON context for an LLM to reason about this cluster". Load whenever intent is mcp / mcp-gateway / mcp-serve / context-pack / bot / agent-context / ai-snapshot / llm-context / model-context-protocol. Do NOT load for: actually running a non-integrate verb (those are scout-observe / scout-diagnose / scout-compare / scout-attribute / scout-ingest / scout-govern / scout-verify), or `cub` MCP integration (that's a separate tool surface).
scout-ingest
Use when the user wants to ADOPT existing Kubernetes / GitOps workload structure into ConfigHub after observing the live cluster — the adoption/import verb group of cub-scout. Natural phrasing: "discover workloads in this cluster and propose ConfigHub units", "show me the import proposal before I apply", "import this Argo Application set", "bring my Flux Kustomizations into ConfigHub", "preview what would land in ConfigHub if I imported this repo", "parse my git repo as a ConfigHub import bundle", "import a cluster aggregator", "what would --git-path produce for this repo?". Load whenever intent is adopt / import / ingest / preview / propose / parse-repo / discovery / aggregator / bring-into-confighub / what-would-confighub-see. Do NOT load for: questions about who changed a resource, whether it was edited by hand or drifted (use scout-attribute or investigate-drift); reading an exported `kubectl get -o yaml` dump to answer a question about the cluster (that is not an import); basic live-cluster inventory (use scout-observe), troubleshooting (use scout-diagnose), comparing live state to ConfigHub (use scout-compare), or the actual write to ConfigHub via `cub variant upload` (that is `cub`, not cub-scout — route to cub skills). Important: `cub-scout import apply` IS the mutating write into ConfigHub — this skill teaches the read-only preview path and explicitly refuses to invoke `import apply` itself.
ConfigHub 治理信号查询
scout-govern
当用户希望从 cub-scout 获取已连接的(CONNECTED)ConfigHub 治理信号时使用该技能 —— Govern(治理)动词组。自然表述:"给我看这个单元的 ChangeSet 历史"、"如果我修改这个单元,影响范围(blast radius)有多大?"、"我的机群中哪些集群是异常值?"、"给我看昨天的连接摘要"、"在整个机群中呈现这个视图"、"审计谁修改了这个"、"上一次应用来自哪里?"、"列出我拥有的 ConfigHub bundle"、"给我看过往快照的目录"。当意图为历史 / 影响 / 影响范围 / 机群异常 / 摘要 / 视图 / 审计 / bundle / 目录 / 连接上下文时加载。不要用于:实时集群比较(使用 scout-compare)、回执(使用 scout-verify)、正在运行的 Pod 清单(使用 scout-observe),或通过 cub 进行的任何修改。该技能的大部分功能需要 `cub auth login` —— 请提前说明。