/cub-scout:triage-unhealthy-workloadfrom cub-scout
Runs a tight ~30-second triage loop for broken Kubernetes workloads under time pressure, composing cub-scout doctor → explain → trace commands with a first-things-to-check checklist. Activates on pager/CI-red/prod-down framing; routes non-urgent or mutating work elsewhere.
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 pager-pressed loop. A workload is broken and the operator has 30 seconds before they need to make a decision. This skill composes doctor → explain → trace (plus targeted kubectl reads) into the tightest possible investigation path, with a checklist for what to look at FIRST.
Explicit phrasings:
1/3 ready, help"False state"<kind>/<name>"Implicit intents:
now, urgent, pager, prod is down)scout-diagnose covers the verb group at leisureinvestigate-driftscout-observeoperator-incident-evidencekubectl rollout undo, argocd app rollback, or cub for ConfigHub mutations.1. doctor → cluster-level signal (which namespace? which workloads?)
2. explain → resource-level why (ownership + cause + nextSteps)
3. trace → source chain (who delivered this? what revision?)
4. kubectl → events + logs for the specific failure
5. decide → wait / revert / escalate (operator drives mutations)
Each step is one cub-scout call. The full loop is typically 4–6 commands. If you need to go deeper, hand off to the verb-group skills.
doctor (cluster signal)$ cub-scout doctor --namespace prod --format json | jq '.summary, .issues[:5]'
doctor is the first-stop diagnostic. It returns:
summary — count of healthy / degraded / failing workloads in scopeissues[] — top-N issues ordered by severity, each with kind/name, primary cause, and a nextSteps[] array of read-only follow-up hintsIf doctor already names the specific workload that broke, you're a step ahead.
explain (resource why)$ cub-scout explain deploy/api -n prod --presentation ai --format json
explain returns the plain-English answer for a single resource:
ownership — which controller (if any) reconciles this; what labels signal itcause from the attribution layer — controller-drift / manual-edit / unknowngitSource / bindingSource — where the desired value comes fromevents[] — recent K8s events (added in #368; top 5, errors first)nextSteps[] — structured actionType=read-only|waiting|human-decision hints. Mutating actionTypes are filtered at emit-time.The --presentation ai flag uses uppercase markers + bracket notation that LLMs reliably parse.
trace (source chain)$ cub-scout trace deploy/api -n prod --format json | jq '.chain, .secrets'
trace walks the ownership chain backwards:
It also surfaces secret evidence (#328 / #360): which secrets the workload depends on, their resolution status (present / missing / unreadable / unresolved). A missing secret is often the silent killer.
kubectl$ kubectl describe deploy api -n prod | grep -A 5 Conditions
$ kubectl get events --field-selector involvedObject.name=api -n prod --sort-by='.lastTimestamp'
$ kubectl logs deploy/api -n prod --tail 50 --previous # crashlooping containers
Three targeted reads. The events list is the single most useful K8s native output for a triage; cub-scout's explain already inlines the top 5, but for deeper history go direct.
cub-scout returns evidence. The operator decides:
| Evidence | Likely action (operator-driven) |
|---|---|
cause: controller-drift, events: ImagePullBackOff | Wait OR fix the image (kubectl set image, helm upgrade, or git commit) |
cause: manual-edit, recent kubectl-edit writer | Revert via kubectl rollout undo OR commit the edit back to git |
cause: unknown, no signal | Escalate; the cluster's managedFields is stripped or compromised |
secrets: missing/unresolved | Check the secret + RBAC; the workload literally can't start |
Argo OutOfSync + controller-drift | Argo will catch up; wait 30s and re-check |
None of these are cub-scout actions. cub-scout produces the evidence; the operator executes.
$ cub-scout doctor -n prod --format json | jq '.issues[0]'
{
"kind": "Deployment", "name": "api", "namespace": "prod",
"primaryCause": "ImagePullBackOff",
"severity": "error",
"nextSteps": [
{"actionType": "read-only", "reason": "Image pull is failing; the registry may be down or the tag stale", "nextCommand": "cub-scout explain deploy/api -n prod"}
]
}
$ cub-scout explain deploy/api -n prod
Resource: Deployment/api in prod
Owner: Argo CD application "payments-api" (label:argocd.argoproj.io/instance)
Status: Degraded — 0/3 ready
Events: ImagePullBackOff (5 mins ago, repeating)
Mutation cause: controller-drift (manager: argocd-controller)
Git source: https://github.com/org/platform-config @abc123 path=apps/prod/api
Next steps:
- [read-only] Image ghcr.io/org/api:v2.3.0 cannot be pulled; check ghcr.io status or the image existence
- [read-only] If image is correct, verify imagePullSecrets
$ kubectl describe deploy api -n prod | grep Image:
Image: ghcr.io/org/api:v2.3.0 # ← the tag in the manifest
$ kubectl get events --field-selector involvedObject.name=api-xxx -n prod | tail -3
... Failed to pull image "ghcr.io/org/api:v2.3.0": ... manifest unknown
Decision: The image tag is wrong. Either:
v2.3.0 for v2.3.1) → commit fix, let Argo reconcilecub-scout doesn't pick. The operator does, with full evidence in hand.
kubectl rollout undo, kubectl set image, kubectl delete pod, argocd app sync, argocd app rollback, flux reconcile, helm rollback, any cub * create/update/delete. The triage produces evidence; the rollback / fix is the operator's call.doctor and explain is denser per-character than JSON--presentation ai for LLM-driven triage — uppercase markers and bracket notation are more reliable than free-form textdoctor -n <ns> and explain <kind>/<name> -n <ns> keep blast-radius smallcub-scout receipt verify deploy/api -n prod --since <time> --save. See scout-verify.scout-diagnose — the verb group this skill composesscout-observe — for inventory framingscout-attribute — for reading the cause fieldoperator-incident-evidence — for the slower, postmortem-shaped variant--presentation flag: #359#368#328, #360cause=unknown or secrets=unresolved, the triage may need to escalate. Don't pretend unknown is a verdict.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.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