prepare-for-confighub
Use when the user is ADOPTING ConfigHub — they have existing live K8s + GitOps state (an existing cluster, live Argo ApplicationSets, Flux Kustomizations, or secondarily a git repo of manifests) and want to PREVIEW what a ConfigHub import would look like before committing. Natural phrasing: "show me the proposed units before I apply", "I want to adopt ConfigHub for this app", "what would ConfigHub see in our cluster?", "what would ConfigHub see in our argocd setup?", "preview what would land in ConfigHub if I imported this repo". Composes `cub-scout import --dry-run` + `import --git-path` + `import argocd` + `import cluster-aggregator` + `import parse-repo` + `app` for the **preview-only** flow. Do NOT load for: actually applying the proposal (that's `cub-scout import apply`, user-driven), live conformance audits (use audit-fleet-conformance), or comparing live to ConfigHub once units exist (use scout-compare). The whole skill is read-only and refuses to invoke `import apply`.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 14
- Forks
- 1
01 前言 Front Matter
- name
- prepare-for-confighub
- phase
- cross-cutting
- description
- Use when the user is ADOPTING ConfigHub — they have existing live K8s + GitOps state (an existing cluster, live Argo ApplicationSets, Flux Kustomizations, or secondarily a git repo of manifests) and want to PREVIEW what a ConfigHub import would look like before committing. Natural phrasing: "show me the proposed units before I apply", "I want to adopt ConfigHub for this app", "what would ConfigHub see in our cluster?", "what would ConfigHub see in our argocd setup?", "preview what would land in ConfigHub if I imported this repo". Composes `cub-scout import --dry-run` + `import --git-path` + `import argocd` + `import cluster-aggregator` + `import parse-repo` + `app` for the **preview-only** flow. Do NOT load for: actually applying the proposal (that's `cub-scout import apply`, user-driven), live conformance audits (use audit-fleet-conformance), or comparing live to ConfigHub once units exist (use scout-compare). The whole skill is read-only and refuses to invoke `import apply`.
- allowed-tools
- Bash(./cub-scout import parse-repo *) Bash(cub-scout import parse-repo *) Bash(cub scout import parse-repo *) Bash(./cub-scout import cluster-aggregator *) Bash(cub-scout import cluster-aggregator *) Bash(cub scout import cluster-aggregator *) Bash(./cub-scout app list *) Bash(cub-scout app list *) Bash(cub scout app list *) Bash(./cub-scout app list) Bash(cub-scout app list) Bash(cub scout app list) Bash(./cub-scout map workloads *) Bash(cub-scout map workloads *) Bash(cub scout map workloads *) Bash(./cub-scout scan *) Bash(cub-scout scan *) Bash(cub scout scan *) Bash(./cub-scout status) Bash(cub-scout status) Bash(cub scout status) Bash(kubectl get *) Bash(kubectl describe *) Bash(cub space list *) Bash(cub unit get *) Bash(cub unit list *) Bash(cub link get *) Bash(cub link list *) Bash(cub view get *) Bash(cub view list *) Bash(cub unit-event list *) Bash(cub resource list *) Bash(cub release list *) Bash(cub changeset list *) Bash(argocd app get *) Bash(argocd appset get *) Bash(argocd appset list *) Bash(flux get *)
02 资源文件 4
- 参考文档_meta.json122 B
- 参考文档skill-card.md1.7 KB
- 参考文档SOURCE.md236 B
- 参考文档TRUST.auto.yaml2.1 KB
03 SKILL.md 正文
prepare-for-confighub
The adoption-preview loop. The user has existing live K8s + GitOps state and wants to KNOW what a ConfigHub import would produce before committing. Start from the live cluster when possible; use local repo parsing only when the manifest repository itself is under review. This skill is the preview flow — every verb is read-only, and import apply (the mutating write) is explicitly out of band. The user runs that themselves after reviewing the proposal.
When to use
Explicit phrasings:
- "Show me the proposed units before I apply"
- "I want to adopt ConfigHub for this app — what would it look like?"
- "What would ConfigHub see in this live cluster?"
- "What would ConfigHub see in our Argo CD setup?"
- "Preview what would land in ConfigHub if I imported this repo"
- "Walk me through ConfigHub adoption for
payments-api" - "Compare ApplicationSet generator import vs a raw
--git-pathimport for this repo"
Implicit intents:
- The user is before ConfigHub adoption, not in steady state
- The user wants reviewable output, not a live mutation
- The user is comparing options ("what if I use ApplicationSet vs raw YAML import?")
- The user is gating on team-review or compliance approval before the actual write
Do not load for
- Actually applying the proposal (
cub-scout import apply) — that's user-driven, not in this skill's allowed-tools - Live conformance audits once units exist —
audit-fleet-conformance - Comparing live state to existing ConfigHub units —
scout-compare(specificallycompare three-way) - The write into ConfigHub from rendered resources (
cub variant upload) — that'scub, not cub-scout. Route toconfighub/confighub-skills. - Triage / drift investigation — the corresponding workflow skills
The loop
- Identify the source. Where is the structure today? Live namespace (
import --dry-run -n <ns>)? Cluster Argo Applications (import argocd)? Multi-cluster snapshot (import cluster-aggregator)? Local git repo (--git-path <dir>)? Pick the verb. - Run the preview verb. ASCII for review-by-eye;
--jsonif the output feeds a PR-bot or a CI check. - Save a review artifact when needed.
cub-scout import ... --json > proposal.jsongives reviewers a deterministic proposal without writing ConfigHub state. - Iterate. Adjust the source structure (rename, regroup, split namespaces) until the proposal looks right. cub-scout doesn't change anything; you just re-run the preview.
- Hand off the mutation. Once the proposal is approved, the user runs
cub-scout import apply --space <s>themselves. cub-scout'sprepare-for-confighubskill never invokes apply.
Step-by-step
Step 1 — pick the source verb
| Source | Verb | Notes |
|---|---|---|
| Live namespace or cluster | cub-scout import --dry-run -n <namespace> --json |
First adoption path. Reads current workloads, ownership, and labels before any write. |
| Local git checkout | cub-scout import --git-path <repo> --dry-run --json |
Advanced path. Classifies kustomize / helm / raw manifests; emits proposed slugs + spaces + targets without upload or render. |
| Existing Argo Applications | cub-scout import argocd --space <s> |
Reads Argo state from the cluster, proposes one ConfigHub unit per Application. Preserves ApplicationSet generator origin as hierarchy. |
| Multi-cluster bundle | cub-scout import cluster-aggregator --space <s> |
Aggregator-pattern. Aggregates per-cluster snapshots into a single ConfigHub proposal. |
| Just structure parsing | cub-scout import parse-repo <repo> |
Lower-level. Extracts ApplicationSet directories, helm chart paths, kustomization roots. Used as a primitive. |
The verbs are preview by default. None of them write to ConfigHub.
Step 2 — run the preview
Git-path preview (most common):
$ cub-scout import --git-path ./platform-config --dry-run --json | jq '.'
{
"units": [
{"slug": "apps-prod-api", "path": "apps/prod/api", "kind": "Deployment", "rendererHint": "kustomize", "confidence": "high"},
{"slug": "apps-prod-worker", "path": "apps/prod/worker", "kind": "Deployment", "rendererHint": "kustomize", "confidence": "high"}
],
"spaces": ["platform-prod"],
"targets": ["Kubernetes:prod-use2"],
"unsupported": []
}
Argo-import preview:
$ cub-scout import argocd guestbook --space payments --dry-run
The output structure is per-Application: each gets a proposed slug, the source path the Application reads, and the renderer hint (kustomize / helm / raw). ApplicationSet generators are preserved — see observe-argocd for the generator support.
Step 3 — save a reviewable proposal
The safest workflow today: save the proposal JSON; review it in git, a ticket, or the PR that is coordinating the adoption; only THEN does anyone run import apply.
$ cub-scout import --git-path ./platform-config --dry-run --json > proposal.json
$ git checkout -b adopt-confighub
$ git add proposal.json
$ git commit -m "preview ConfigHub units for platform-config"
$ git push origin adopt-confighub
$ gh pr create ...
The proposal is reviewable in git, with all the usual diff tooling. ConfigHub itself sees nothing until someone runs import apply post-review.
Step 4 — iterate
If the proposal isn't right (wrong slugs, wrong space grouping, missing workloads), adjust the source structure and re-run. cub-scout's import verbs are deterministic — same source produces same proposal, so the PR diff narrows iteration-by-iteration.
Common adjustments:
- Rename repo directories to control proposed slugs (
apps/prod/api→ slugapps-prod-api) - Split monolithic kustomize roots into per-workload directories
- Add README or NOTES files to explain non-obvious structure
- Tag ApplicationSet templates so generator-derived units get distinguishable slugs
Step 5 — hand off the apply
Once the proposal is approved:
# THE USER runs this — not cub-scout, not this skill
$ cub-scout import apply proposal.json
import apply writes to ConfigHub. It IS a mutation. It is intentionally NOT in this skill's allowed-tools. Recommend the user run it themselves and verify the result with cub unit list --space platform-prod.
Worked example
A team has a live payments namespace and a git repo platform-config/ with three apps under apps/prod/. They want to adopt ConfigHub, so they preview the live cluster first and use the repo preview as a secondary check.
$ cub-scout import --dry-run -n payments --json > proposal-live.json
$ cub-scout import --git-path ./platform-config --dry-run --json > proposal-repo.json
Proposal:
Units (3):
apps-prod-api — apps/prod/api/ kustomize high
apps-prod-worker — apps/prod/worker/ kustomize high
apps-prod-frontend — apps/prod/frontend/ raw medium
Spaces (1):
platform-prod
Targets (1):
Kubernetes:prod-use2
Unsupported (0): —
$ git checkout -b adopt-confighub
$ git add proposal-live.json proposal-repo.json
$ git commit -m "preview ConfigHub units for platform-prod"
$ # ...PR review...
$ # ...merge...
# After PR merges, the operator runs:
$ cub-scout import apply proposal-live.json
cub-scout produced the proposals; git carried the review; the operator drove the apply. Three tools, three responsibilities.
Boundaries
cub-scout vs cub's own load path
This is the distinction to make clear:
cub-scout import --git-path <repo>is structure-and-preview focused. Walks a local git checkout, classifies kustomize/helm/raw, emits a proposal. No cluster, no ConfigHub required for the preview itself.cub variant upload(incub, not cub-scout) loads already-rendered resources: a directory, a file,-, or anoci://bundle. It renders nothing — you render withhelm template,kustomize buildor an installer — and makes the space's units match the input, create-or-update with a 3-way merge.
They solve different problems. cub-scout is for adoption (first-time preview/import); cub variant upload is for ongoing load of rendered configuration. Don't claim they overlap.
cub gitops discoverandcub gitops importno longer exist: cub deleted thegitopsgroup on 2026-07-25 with no replacement, andcub gitopsexits 1 withunknown command. If a user asks for that flow, say so rather than running it (#573).
apply boundary
cub-scout import apply IS the mutating write. The user runs it directly; this skill describes its shape but does not invoke it. Defense in depth: not in allowed-tools.
Tool boundary
- Allowed (agent-callable preview):
cub-scout import parse-repo *— pure parsercub-scout import cluster-aggregator *— emits proposal as JSONcub-scout app list *— read-only ConfigHub App inventorymap workloads,scan,status;cub <entity> get / listfor the entities named in allowed-tools;argocd app get,argocd appset get/list,flux get
- Preview, but not auto-approved:
cub-scout import --git-path <dir>andcub-scout import --dry-runchange nothing as written, but a later flag overrides them (--git-path=clears the path,--dry-run=falseturns preview off), so a wildcard grant would admit a real import. The host asks before each run. - Not allowed (user-driven only):
cub-scout import apply *— writes ConfigHub unitscub-scout import argocd *— without--dry-runit creates units, can disable Argo auto-sync, can delete the Argo Application (cmd/cub-scout/import_argocd.go:465-488). The wildcard cannot enforce--dry-run, so the verb is out of allowed-tools entirely; recommend the user runcub-scout import argocd <app> --dry-runthemselves and feed the proposal to the agent for review.cub-scout app create *—app listis the read-only form in allowed-toolscub * create/update/delete,cub variant upload(different tool),kubectl apply/edit/patch/delete
References
scout-ingest— the verb group this skill composesobserve-argocd— ApplicationSet generator detailobserve-flux— Kustomization / source structureobserve-confighub-managed— the result-side view of ConfigHub-managed resources- ApplicationSet generator support:
#363 - Render integration investigation:
#364(verdict: keep tools separate) - Examples:
examples/argo-import-confighub-demo/,examples/flux-import-confighub-demo/,examples/fleet-import/
Constraints
- This skill is preview-only.
import applyis explicitly out of band — recommend the user runs it themselves after PR review. - Save proposal JSON for review today. A future
import --git-path --output-dirflow is tracked separately for emitting proposed unit YAMLs directly. - For deeply-nested Helm or templated structure, the parser produces lower-confidence proposals; surface those explicitly. cub-scout's import is for adoption, not for renderer reconstruction.
- Helm / Kustomize back-resolution at file:line precision is currently raw-YAML only (#440 stage B); templated sources fall back to resource-level anchors.
04 同仓库更多 Skills
triage-unhealthy-workload
Use when the user is responding to a broken Kubernetes workload UNDER TIME PRESSURE — pager-going-off, CI-red, "prod is down" framing. Natural phrasing: "deploy/api is CrashLoopBackOff, what now?", "the rollout is stuck, help", "this pod won't start", "pager fired on payments", "everything is red in argocd", "what should I check first?", "give me a triage plan for this workload". Composes doctor → explain → trace into a tight ~30-second loop the operator can run in a pager-acknowledged context. Do NOT load for: a planned investigation without urgency (use scout-diagnose directly), a drift question (use investigate-drift), or anything mutating (cub-scout never mutates — route to kubectl with the user driving).
scout-verify
Use when the user wants a TYPED, FINGERPRINTED, IMMUTABLE evidence artifact about a Kubernetes resource — the Verify verb group of cub-scout (the receipt capability shipped in #446). Natural phrasing: "produce a receipt that this is in compliance", "give me an attestation that the cluster matches Git", "I need a verifiable record for the audit trail", "build a receipt verifying no manual edits since deploy", "verify deploy/api against source-truth and save the artifact", "validate this receipt has not been tampered with", "show me what receipts we have", "is this receipt tampered with?", "attach evidence to my CI gate". Load whenever intent is receipt / attestation / evidence-artifact / tamper-evident-record / verified-record / audit-trail / postmortem-evidence / acceptance-judge-input. Do NOT load for: a live comparison without a persisted artifact (use scout-compare), interpreting a single field's provenance (use scout-attribute), or actually applying a fix (cub-scout never mutates — route to cub / argocd / kubectl with the user driving).
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.
scout-govern
Use when the user wants to consume CONNECTED ConfigHub governance signals from cub-scout — the Govern verb group. Natural phrasing: "show me the ChangeSet history for this unit", "what is the blast radius if I change this unit?", "which clusters in my fleet are outliers?", "show me yesterday's connected summary", "render this view across the fleet", "audit who changed this", "where did the last apply come from?", "list ConfigHub bundles I have", "show me the catalog of past snapshots". Load whenever intent is history / impact / blast-radius / fleet-outliers / summary / view / audit / bundle / catalog / connected-context. Do NOT load for: live cluster comparison (use scout-compare), receipts (use scout-verify), inventory of running pods (use scout-observe), or any mutation via cub. Most of this skill requires `cub auth login` — say so upfront.