AGENT SKILL

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).

License 许可
MIT
最近更新
2026-11-14
Stars
★ 14
Forks
1

01 前言 Front Matter

name
scout-observe
phase
verify
description
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).
allowed-tools
Bash(./cub-scout doctor) Bash(./cub-scout doctor *) Bash(cub-scout doctor) Bash(cub-scout doctor *) Bash(cub scout doctor) Bash(cub scout doctor *) Bash(./cub-scout map list *) Bash(./cub-scout map workloads *) Bash(./cub-scout map orphans *) Bash(./cub-scout map activity *) Bash(./cub-scout map hooks *) Bash(./cub-scout map meaning *) Bash(cub-scout map list *) Bash(cub-scout map workloads *) Bash(cub-scout map orphans *) Bash(cub-scout map activity *) Bash(cub-scout map hooks *) Bash(cub-scout map meaning *) Bash(cub scout map list *) Bash(cub scout map workloads *) Bash(cub scout map orphans *) Bash(cub scout map activity *) Bash(cub scout map hooks *) Bash(cub scout map meaning *) Bash(./cub-scout trace *) Bash(cub-scout trace *) Bash(cub scout trace *) Bash(./cub-scout tree *) Bash(cub-scout tree *) Bash(cub scout tree *) Bash(./cub-scout scan *) Bash(cub-scout scan *) Bash(cub scout scan *) Bash(./cub-scout graph *) Bash(cub-scout graph *) Bash(cub scout graph *) Bash(./cub-scout snapshot *) Bash(cub-scout snapshot *) Bash(cub scout snapshot *) Bash(./cub-scout status) Bash(./cub-scout status *) Bash(cub-scout status) Bash(cub-scout status *) Bash(cub scout status) Bash(cub scout status *) Bash(kubectl get *) Bash(kubectl describe *) Bash(kubectl logs *) Bash(kubectl version) Bash(kubectl config current-context) Bash(kubectl config get-contexts *)

03 SKILL.md 正文

scout-observe

The Observe verb group of cub-scout. Ten commands that show what is running in a cluster and who owns it — without modifying anything.

When to use

Explicit phrasings:

  • "What is running in my cluster?" / "show me the Deployments in namespace prod"
  • "Give me a map of ownership" / "who manages this resource?"
  • "Trace deploy/api back to its Git source" / "what created this?"
  • "Show me the ownership tree" / "render the resource hierarchy"
  • "Scan this cluster for risk" / "scan this manifest file"
  • "Dump cluster state as JSON" / "snapshot the namespace"
  • "Stream cluster events to a webhook"
  • "Run cub-scout as an in-cluster observer bot"
  • "What's my connection status?" / "am I connected to ConfigHub?"
  • "Is this cluster healthy?" / "give me a one-screen status"

Implicit intents the skill should catch:

  • The user wants a picture of the cluster, not a diagnosis or remediation
  • The user wants a stable JSON / ASCII artifact (for an agent, an audit, or a pipeline)
  • The user is starting a triage and needs to know what they're looking at before going deeper

Do not load for

  • "Why is this broken?" — load scout-diagnose instead
  • "Does the cluster match what Git says?" — load scout-compare
  • "Where did this field's value come from?" — load scout-attribute
  • "Fix this" / "apply this" / "delete this" — cub-scout cannot mutate; route to cub, kubectl (user driven), or another tool

Standalone vs connected

  • Standalone (cluster only): all ten Observe verbs work. doctor, map, trace, tree, scan, graph, snapshot, watch, bot, status need only your current kubectl context or in-cluster service account.
  • Connected (cluster + cub auth login): trace --with-confighub, explain --with-confighub, and single-resource receipt verify --with-confighub can attach object-correlated ConfigHub delivery evidence; map activity --with-confighub adds bounded release, unit-event, live-status, and event-consumer timeline rows; status shows ConfigHub session detail; scan can correlate findings with units.
  • Offline (file / bundle only): scan --file <path> audits manifests without a cluster; bundle inspect reads recorded debug bundles.

Tool boundary

  • Allowed (read-only): the specific Observe verbs — cub-scout doctor, cub-scout map list / workloads / orphans / activity / hooks / meaning, cub-scout trace, cub-scout tree, cub-scout scan, cub-scout graph, cub-scout snapshot, cub-scout status (in all three invocation forms: cub-scout, ./cub-scout, cub scout). Plus kubectl get/describe/logs, kubectl version, kubectl config current-context / get-contexts. cub-scout watch and cub-scout bot are Observe verbs too, but are not auto-approved: its --webhook flag sends events to any URL, so the host asks each time; kubectl config view is left out because --raw prints credentials. Never the broad cub-scout * wildcard — that would grant demo (kubectl-applies), import apply (writes to ConfigHub), and compare --suggest --apply (writes to ConfigHub).
  • Not allowed: kubectl apply/edit/patch/delete/scale/rollout/exec, kubectl debug (privileged debug pods), any cub * create/update/delete.
  • Boundary with scout-diagnose: Observe shows what is there; Diagnose interprets why it looks the way it does and recommends next steps. The two often chain: Observe to map, then Diagnose to interpret.

The verb menu

Pick by the question being asked:

Question Verb Notes
"Is this cluster healthy at a glance?" cub-scout doctor One-screen health summary, with --presentation human|ai|paired and --hint-mode default|beginner|operator
"What's in this cluster, grouped by ownership?" cub-scout map (interactive TUI) Sub-commands: map list, map hooks, map activity, map orphans, map meaning
"What happened recently in delivery/status feedback?" cub-scout map activity --with-confighub --confighub-space <space> Timeline rows for controller activity, Kubernetes events, ConfigHub releases, unit events, live-status writeback, event-consumer health, and omissions
"Can I keep the exact delivery/status observation for review?" cub-scout receipt verify <kind>/<name> -n <ns> --with-confighub --confighub-space <space> Fingerprint-covered predicate.evidence.deliveryEvidence on a single-resource receipt
"Trace this workload back to its Git / OCI source" cub-scout trace <kind>/<name> -n <ns> Walks Deployment → Application → Git or Deployment → HelmRelease → GitRepository
"Show me the runtime + ownership + git hierarchy" cub-scout tree Multi-axis composition view
"Scan for risk patterns" cub-scout scan 46 built-in patterns. Variants: --state, --kyverno, --lifecycle-hazards, --timing-bombs, --dangling, --file <yaml>
"Export the resource graph" cub-scout graph export DOT / JSON for downstream tools
"Dump the cluster as GSF JSON" cub-scout snapshot Stable snapshot for AI / agent / audit; includes top-level observation metadata
"Stream observation events" cub-scout watch -n <ns> [--webhook url] Webhook / file sinks, namespace / owner / severity filters; events include observation metadata
"Run an in-cluster observer bot" cub-scout bot --webhook <url> Same event shape as watch, with env-var configuration for Kubernetes manifests and per-event observation metadata
"What mode am I in? Connection / cluster info" cub-scout status Standalone vs connected, context, cluster details

Snapshot-style verbs that support --format json emit deterministic JSON for agents. map list --format json, snapshot, watch, and bot also expose point-in-time observation.source/mode/observedAt/freshness metadata so agents can avoid confusing a stale artifact with a fresh read.

The loop

  1. Identify intent. Translate the user's question into one of the rows in the verb menu above. If multiple verbs could answer, prefer the most specific (trace over map if the question is about one resource's lineage).
  2. Pick the format. Humans: ASCII (the default). Agents / CI / MCP: --format json.
  3. Invoke. Use ./cub-scout ... in the local repo; cub-scout ... standalone; cub scout ... plugin-form. All three accept the same flags.
  4. Interpret. Read the structured output:
    • doctor → top-level health, top issues, next-step hints
    • map → resource list with owner + namespace + health columns
    • trace → ownership chain (controller → source → repository → commit)
    • scan → findings list with severity + pattern + resource
    • snapshot / graph export → bulk JSON for downstream tooling
  5. Hand off. If the user needs a why or a fix, route to scout-diagnose. If they need to compare against intent, route to scout-compare. If they need to act, refuse and route to cub skills or kubectl with the user driving.

Worked example

User: "Map the boutique namespace and show me which Deployments are managed by Argo."

$ cub-scout map list -n boutique --format ascii
NAME              KIND          OWNER     SOURCE                                      HEALTH
frontend          Deployment    Argo CD   apps/prod/boutique/frontend                Ready
catalog           Deployment    Argo CD   apps/prod/boutique/catalog                 Ready
checkout          Deployment    Flux      flux-system/Kustomization/boutique-checkout Ready
redis             StatefulSet   Native    -                                           Ready

Read off: 2 Argo-managed Deployments, 1 Flux-managed, 1 native (no GitOps controller). The output is enough for the user to drill into any single resource with trace deploy/frontend -n boutique (which is still in scope for this skill) or jump to scout-diagnose if they want to know why a status is what it is.

For agents:

$ cub-scout map list -n boutique --format json | jq '[.[] | {name, owner, source}]'
[
  {"name": "frontend", "owner": "Argo CD", "source": "apps/prod/boutique/frontend"},
  {"name": "catalog", "owner": "Argo CD", "source": "apps/prod/boutique/catalog"},
  {"name": "checkout", "owner": "Flux", "source": "flux-system/Kustomization/boutique-checkout"},
  {"name": "redis", "owner": "Native", "source": null}
]

Output evidence

  • Primary artifact: ASCII or JSON output from the chosen verb.
  • MCP gateway: the standalone Observe tools (doctor, map, scan, trace, explain, gitops_status, gitops_settings, release_check) are exposed as MCP tools via cub-scout mcp serve. See references/mcp-tool-catalog.md for the full per-tool catalog (8 standalone + 13 connected, verified against cmd/cub-scout/mcp.go). Note: not every CLI verb is an MCP tool — e.g., tree, graph, snapshot, watch, bot, status are CLI-only.
  • nextSteps[] structured hints (where supported): every entry has actionType: read-only — mutating actionType is rejected at every cub-scout emit point.

References

Constraints

  • All output is point-in-time. map list --format json, snapshot, watch, and bot declare this with observation metadata. For a durable, fingerprinted record of "what cub-scout observed at time T", use the Verify verb group (cub-scout receipt verify) — see scout-verify.
  • If managedFields is missing or stripped from the live object, ownership detection still works (via labels + annotations) but per-field attribution falls back to resource-level. See references/kubernetes-managedfields.md for the data substrate notes.
  • The watch and bot verbs run indefinitely until interrupted; agents should pass --once or a time bound. Streaming receipts use --emit-receipt-on, with per-poll backpressure from --emit-receipt-batch-cap.
  • If a user asks the skill to act (apply / edit / sync / patch / delete), refuse and route to the appropriate cub skill in confighub/confighub-skills or to direct kubectl with the user's hands on the keyboard.

04 同仓库更多 Skills

confighub
confighub/cub-scout

异常工作负载故障分诊

triage-unhealthy-workload

当用户需要在时间压力下应对出现故障的 Kubernetes 工作负载时使用——例如寻呼告警响起、CI 飘红、“生产环境挂了”的场景。自然表述包括:“deploy/api 出现 CrashLoopBackOff,该怎么办?”“发布卡住了,帮帮我”“这个 pod 起不来”“支付服务触发了寻呼告警”“argocd 里全红了”“我应该先检查什么?”“给我一份针对这个工作负载的分诊方案”。它将 doctor → explain → trace 组合成一个紧凑的约 30 秒循环,运维人员可在已确认寻呼告警的上下文中执行。不要用于:没有紧迫性的计划性排查(直接使用 scout-diagnose)、漂移相关问题(使用 investigate-drift),或任何变更操作(cub-scout 从不做变更——应由用户主导,转由 kubectl 处理)。

SRE 工程师生产事故响应与应急处置
★ 14
confighub
confighub/cub-scout

资源证据收据生成与校验

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 处理)。

SRE 工程师审计准备与证据管理
★ 14
confighub
confighub/cub-scout

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).

★ 14
confighub
confighub/cub-scout

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.

★ 14
confighub
confighub/cub-scout

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` —— 请提前说明。

SRE 工程师工程变更管理
★ 14
confighub
confighub/cub-scout

Kubernetes 诊断与修复建议

scout-diagnose

当用户希望 cub-scout 解读(INTERPRET)其观察到的内容并建议下一步操作时使用该技能 —— Diagnose(诊断)动词组。自然表述:"解释一下这个 Deployment"、"为什么这个出问题了?"、"我该怎么办?"、"这是漂移还是同步慢?"、"这个错误是什么意思?"、"这有没有已知的模式?"、"我的 GitOps 流水线健康吗?"、"这个 Pod 上触发了哪些事件?"、"针对这个发现给我一个建议的修复方案"。当意图是针对 Kubernetes 集群或扫描发现进行解释 / 原因 / 含义 / 该怎么办 / 解读 / 诊断 / 推荐 / 建议修复时加载。不要用于:纯集群清单(使用 scout-observe)、逐字段比较预期状态与运行态(使用 scout-compare)、逐字段溯源(使用 scout-attribute),或实际应用修复(cub-scout 从不修改状态 —— 应转由用户驱动 cub 或 kubectl 执行)。

SRE 工程师调试与故障排查
★ 14