observe-argocd
Use when the user wants to observe ARGO CD-managed resources specifically — the controller-specific observer skill for Argo. Natural phrasing: "is this resource managed by Argo CD?", "show me Argo applications in this cluster", "trace this Argo-owned deployment back to source", "which ApplicationSet generated this app?", "did Argo apply the latest commit?", "explain the Argo CSA migration default", "what tracking-id annotation does Argo write?". Load whenever intent involves Argo CD specifically — Applications, ApplicationSets, sync status, tracking-id annotation, the kubectl-client-side-apply migration default, or Argo-as-deliverer-for-ConfigHub. Do NOT load for: generic ownership detection (use scout-observe), comparing live state to git (use scout-compare), the ConfigHub authoring side (use cub skills), or general Argo CRD authoring (Argo is a separate tool — this skill is about *observing* Argo-managed resources, not configuring Argo itself).
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 14
- Forks
- 1
01 前言 Front Matter
- name
- observe-argocd
- phase
- cross-cutting
- description
- Use when the user wants to observe ARGO CD-managed resources specifically — the controller-specific observer skill for Argo. Natural phrasing: "is this resource managed by Argo CD?", "show me Argo applications in this cluster", "trace this Argo-owned deployment back to source", "which ApplicationSet generated this app?", "did Argo apply the latest commit?", "explain the Argo CSA migration default", "what tracking-id annotation does Argo write?". Load whenever intent involves Argo CD specifically — Applications, ApplicationSets, sync status, tracking-id annotation, the kubectl-client-side-apply migration default, or Argo-as-deliverer-for-ConfigHub. Do NOT load for: generic ownership detection (use scout-observe), comparing live state to git (use scout-compare), the ConfigHub authoring side (use cub skills), or general Argo CRD authoring (Argo is a separate tool — this skill is about *observing* Argo-managed resources, not configuring Argo itself).
- 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(argocd app get *) Bash(argocd appset get *) Bash(argocd app list *) Bash(argocd appset list *)
02 资源文件 1
- 参考文档agents/openai.yaml107 B
03 SKILL.md 正文
observe-argocd
The controller-specific observer skill for Argo CD. Documents the exact labels / annotations / manager strings Argo writes, how cub-scout's ownership detector classifies Argo-managed resources, and the edge cases (CSA migration, tracking-id format, ApplicationSet generators).
This skill is verified against pkg/agent/ownership.go detectArgoOwnership and pkg/agent/manager_strings.go ManagerArgoCD — the constants are the single source of truth for what Argo writes.
When to use
- "Is this resource managed by Argo CD?"
- "Show me the Argo Applications in this cluster"
- "Trace this Argo-owned deployment back to source"
- "Which ApplicationSet generated this Application?"
- "Did Argo apply the latest commit?"
- "Explain the Argo CSA migration /
kubectl-client-side-applywriter" - "What does the
argocd.argoproj.io/tracking-idannotation mean?"
Do not load for
- Generic ownership detection ("who manages this resource?") —
scout-observewalks all detectors - Comparing live state to ConfigHub or git —
scout-compare - Authoring / mutating Argo Applications — that's the Argo CLI directly, not cub-scout
- Flux-managed resources —
observe-flux
Detection signals (in detectArgoOwnership)
cub-scout classifies a resource as Argo-owned when ANY of these labels / annotations is present, in priority order:
| Signal | Source field | Confidence | Notes |
|---|---|---|---|
argocd.argoproj.io/tracking-id annotation |
annotation | medium | Primary signal. Value is <app-name>:<group>/<kind>:<namespace>/<name>; cub-scout reads the leading <app-name>. Argo CD writes it under the annotation (default) and annotation+label tracking methods (argocd-cm application.resourceTrackingMethod), so when present it names the owning Application, and an instance label that disagrees is stale or copied (#628). An empty or malformed tracking-id falls through to the labels. |
argocd.argoproj.io/instance label |
label | medium | Label tracking, used when there is no usable tracking-id. Value is the Application name. |
app.kubernetes.io/instance label |
label (fallback only) | medium | Only used when argocd.argoproj.io/instance is present but empty. |
Resulting Ownership: Type=argo, SubType=application, Name=<application-name>.
Manager strings (the writer identity in metadata.managedFields)
Argo writes through Server-Side Apply with two possible manager strings:
| Manager | Source | Meaning |
|---|---|---|
argocd-controller |
upstream common.ArgoCDSSAManager |
Modern Argo CD application-controller SSA writes. The expected and unambiguous case. |
kubectl-client-side-apply |
upstream kubectl/FieldManagerClientSideApply |
Argo's CSA migration default — Argo writes with this string during the client-side-apply → server-side-apply migration. This is ALSO the bare kubectl apply default, so the string alone is ambiguous. |
The CSA disambiguation
When metadata.managedFields carries kubectl-client-side-apply and there's no other Argo signal, the writer is ambiguous: it could be Argo CSA-migration or a human running kubectl apply (no --server-side).
cub-scout disambiguates via the owner co-signal (in IsControllerManagerFor):
- Argo-owned resource (label or tracking-id) +
kubectl-client-side-apply→controller-drift(Argo CSA migration default) - Native resource (no Argo signal) +
kubectl-client-side-apply→manual-edit(a human rankubectl apply)
Same string, opposite verdicts. This is why ownership detection must run before attribution classification — see scout-attribute for the full classification rule.
ApplicationSet generators
When an Application was generated by an ApplicationSet (git generator, list generator, cluster generator, matrix generator), the parent Application label argocd.argoproj.io/instance still identifies it. cub-scout's git source tracer (pkg/agent/argo_trace.go) reads the Application spec and resolves the git path back to the generator's directories[].path pattern when applicable. ApplicationSet import is also supported by cub-scout import argocd — see scout-ingest.
The full ApplicationSet generator coverage:
- Git generator with
directories[].pathpatterns including!exclude - List generator with explicit Application enumeration
- Cluster generator with selector-based fan-out
- Matrix generator with nested git generators
- Full-path slugs so
apps/team-a/apiandservices/team-a/apidon't collide
Worked example
$ kubectl get deploy api -n prod -o yaml | yq '.metadata.labels, .metadata.annotations, .metadata.managedFields[].manager'
labels:
argocd.argoproj.io/instance: payments-api
app: api
annotations:
argocd.argoproj.io/tracking-id: "payments-api:apps/Deployment:prod/api"
managers:
- argocd-controller
- kubectl-edit # uh oh
cub-scout reads this as:
$ cub-scout explain deploy/api -n prod
Resource: Deployment/api in prod
Owner: Argo CD application "payments-api" (label:argocd.argoproj.io/instance)
Drift: Detected
Mutation cause: manual-edit (manager: kubectl-edit; controller co-signal: argocd-controller)
The classifier sees the Argo controller co-signal AND an interactive writer (kubectl-edit) → cause is manual-edit (someone bypassed Argo). See scout-attribute for the full classification semantics.
Edge cases
- Argo CD as deliverer for ConfigHub units: A ConfigHub-managed resource (label
confighub.com/UnitSlug) delivered through Argo will have BOTH the ConfigHub label and the Argo signals. cub-scout treats this asOwnerConfigHub(ConfigHub detection runs before Argo detection); the Argo writer is then accepted as a valid controller co-signal for ConfigHub. Seeobserve-confighub-managed. - Empty
argocd.argoproj.io/instancelabel: cub-scout falls back toapp.kubernetes.io/instanceonly when the Argo-specific label is present-but-empty. A pureapp.kubernetes.io/instancelabel without any Argo signal does NOT classify as Argo-owned. - Malformed tracking-id:
argocd.argoproj.io/tracking-idwithout a:separator is tolerated; cub-scout uses the whole string as the Application name. Empty tracking-id is rejected.
References
- Code:
pkg/agent/ownership.godetectArgoOwnership,pkg/agent/manager_strings.goManagerArgoCD+controllerManagersForOwner(OwnerArgo, ...),pkg/agent/argo_trace.go - Upstream:
- Argo CD SSA manager constant:
argoproj/argo-cd common.ArgoCDSSAManager - Argo CD tracking-id format: ApplicationInstance label spec (
<app-name>:<group>/<kind>:<namespace>/<name>)
- Argo CD SSA manager constant:
- Related skills:
scout-observe,scout-attribute,scout-compare,observe-confighub-managed,observe-flux - Examples:
examples/argo-import-confighub-demo/,examples/drift/mutation-cause-attribution/
Constraints
- This skill is read-only by construction.
argocd app sync,argocd app patch,argocd app deleteare NOT in the allowed-tools — those are mutations and belong to the user driving Argo CLI directly. - cub-scout's Argo support is observation, not authoring. Configuring Argo Applications themselves is out of scope; route to the Argo CLI.
- ApplicationSet parsing (for import-preview) lives in
scout-ingest; this skill is about observing the resulting Application-managed workloads in the cluster.
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` —— 请提前说明。