/platform-skills:kubescape-operator [install|vulns|runtime|netpol|exceptions|metrics|debug] [namespace or workload]from platform-skills
Installs, tunes, and troubleshoots the Kubescape operator for continuous Kubernetes security: posture scans, vulnerability relevancy filtering, eBPF runtime threat detection, NetworkPolicy generation, and Prometheus metrics.
Ships in platform-skills. 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.
Run Kubescape inside the cluster: posture that updates itself, CVEs ranked by whether they load, alerts on behaviour a container never showed, and NetworkPolicies drafted from real traffic.
Read references/kubescape-operator.md before responding. It holds the preflight, the capability matrix and install profiles, the scanner image override, result commands, runtime and NetworkPolicy details, exceptions, metrics and troubleshooting. The working files are in examples/kubescape-operator.
The GitOps engine for this organisation is ${user_config.gitops_engine}. If that reads as a literal placeholder or is empty, it is not configured: detect Flux (kubectl get crd helmreleases.helm.toolkit.fluxcd.io) or Argo CD (kubectl get crd applications.argoproj.io), or ask.
| Question | Authoritative command |
|---|---|
| "Scan continuously, keep results in the cluster" | this command |
| "Which CVEs are in code that actually runs?" | this command (vulns) |
| "Alert on unexpected container behaviour" | this command (runtime), or /platform-skills:runtime-security where Falco runs |
| "Draft NetworkPolicies from traffic" | this command (netpol) |
| "Score the cluster now / CIS audit / PR gate" | /platform-skills:kubescape |
| "CVE reports with Trivy Operator" | /platform-skills:trivy k8s |
| "Dashboards and alert routing" | /platform-skills:observability |
Parse the first word of $ARGUMENTS as the mode. When $ARGUMENTS is empty, or is a question in plain words, run the interactive wizard.
| Mode | What it does |
|---|---|
install | Preflight, pick a profile, write the Flux (or Argo CD) manifests, install, verify, upgrade or roll back |
vulns | Read and rank vulnerability results; on-demand scan; private registries |
runtime | Enable detection, check learning progress, bind rules, route alerts, test an alert |
netpol | Turn a generated policy into a reviewed NetworkPolicy in Git |
exceptions | Accept a risk in the cluster: SecurityException with reason, author, expiry |
metrics | Exporter, ServiceMonitor, alert rules |
debug | Diagnose an operator that installs but misbehaves |
| (empty) | Interactive wizard |
kubectl config current-context
kubectl version -o json | jq -r .serverVersion.gitVersion # >= 1.28
kubectl get nodes -o jsonpath='{range .items[*]}{.status.nodeInfo.kernelVersion}{" "}{.spec.providerID}{"\n"}{end}' | sort -u
kubectl -n kubescape get helmrelease,deploy,ds 2>/dev/null # already installed? which profile?
kubectl get crd | grep -E 'helm.toolkit.fluxcd.io|argoproj.io|monitoring.coreos.com|kyverno'
kubectl get ds -A | grep -iE 'falco|tetragon' # another eBPF agent
kubectl get deploy -A | grep -i trivy-operator # another CVE operator
Then, only if a node-agent profile is in play, run the kernel preflight from the reference on one node per node image (CONFIG_FANOTIFY_ACCESS_PERMISSIONS, CONFIG_DEBUG_INFO_BTF). Tell the user what you found in one short block before the first question, for example:
Cluster: prod-eu-west-1 (EKS, Kubernetes 1.33, 3 node images)
Flux: yes · Prometheus Operator: yes · Falco: yes (daemonset falco) · Trivy Operator: no
Kernel: fanotify permissions ✔ on all node images
Kubescape: not installed
Ask with the AskUserQuestion tool when it is available (one question per call, recommended option first); otherwise print the numbered menu and wait.
What do you want Kubescape to do in this cluster?
1. "Install it" / "change what it does" → install
2. "Show me which vulnerabilities actually matter" → vulns
3. "Alert me when a container does something odd" → runtime
4. "Write NetworkPolicies from real traffic" → netpol
5. "We accept this risk in the cluster" → exceptions
6. "Get it into Prometheus / Grafana" → metrics
7. "It's installed but something is wrong" → debug
Just a score or a CIS audit right now → /platform-skills:kubescape cluster
Not installed and the user picked 2–6 → say it needs install first and offer it.
Offer the profiles from the reference, pre-selected from Step 0:
Which profile?
a. Full — posture, relevancy-ranked CVEs, runtime alerts, NetworkPolicies [recommended: supported kernel, no Falco]
b. Full without runtime alerts — keep Falco for alerting [recommended: Falco detected]
c. Posture + CVEs, no node-agent — any kernel, no privileged DaemonSet [required: kernel lacks fanotify permissions]
d. Posture only — Trivy Operator keeps CVEs [recommended: Trivy Operator detected]
State why the recommended one fits, in one line. Never offer a node-agent profile on nodes that failed the kernel preflight: the install would fail and Flux would uninstall the release.
runtime): "Profiles learn for 24h before anomaly rules fire. Keep 24h? [Y]" Shorter means more false alerts.install): "Name this cluster in reports? []". The chart default cluster makes clusters indistinguishable.runtime): logs only (default), Alertmanager or syslog. HTTP only with a Kubescape backend configured (server plus credentials); chart 1.40.4 ignores the HTTP URL otherwise.Kubescape operator — prod-eu-west-1 chart 1.40.4 · scanner v4.0.16
Posture ✔ 214 workloads scanned · 3 critical · 41 high last scan 12m ago
CVEs ✔ relevancy on · 2 critical in loaded packages (of 31 total)
Runtime ✔ 38/41 profiles completed · 0 alerts in 24h
NetPol ✔ 41 generated · 0 applied from Git yet
Exceptions 2 active · next expiry 2026-12-31 (payments-api C-0237)
Next: /platform-skills:kubescape-operator netpol payments
Build it from kubectl get workloadconfigurationscansummaries -A, vulnerabilitymanifestsummaries -A, containerprofiles -A annotations, generatednetworkpolicies -A, se -A/cse. Show only lines for enabled capabilities; one next command.
examples/kubescape-operator/flux/ into the user's GitOps path; apply the profile's capability changes; set clusterName; keep version exact and kubescape.image.tag at v4.0.16 (or later) — the bundled v4.0.13 scanner produces no results; keep global.enableClusterWideSecretAccess: false (the chart default true lets the scanner and operator read every Secret in the cluster) and ask for explicit approval before turning it on.Application (helm.valuesObject, ServerSideApply=true).Available, kubescape operator scan configurations followed by summaries appearing.complete.flux suspend, git revert).Upgrade: bump version in a PR; read the release notes; compare the new bundled scanner tag with the override.
kubectl get vulnerabilitymanifestsummaries -A → rank by critical.relevant then high.relevant (with relevancy) or by all (without, and say so)./platform-skills:trivy.kubescape operator scan vulnerabilities --include-namespaces <ns>.imageScanning.privateRegistries.credentials from a managed secret.capabilities.runtimeDetection: enable, alertCRD.installDefault: true; one node pool first.containerprofiles with kubescape.io/status and kubescape.io/completion; explain ready = still learning, completed = active.all-rules-all-pods. A binding cannot reach a namespace in excludeNamespaces (node-agent never traces it). To narrow a noisy namespace (CI runners) to signature rules, use the opt-in examples/kubescape-operator/ci-runners/ in two steps: first its binding (after the operator is Ready; Flux dependsOn), then switch the operator's Kustomization to ci-runners/release/, which adds the post-renderer that removes the namespace from the default binding. Never the other way round, and never in the base install.completed, kubectl exec into a test pod and show the R2000/R0001 alert in kubectl -n kubescape logs ds/node-agent.kubectl -n <ns> get generatednetworkpolicies; pick the workload (<kind>-<name>)..spec. Use policyRef (dns, server) to identify each destination, then write in-cluster peers as podSelector/namespaceSelector and external ones as a reviewed ipBlock CIDR — NetworkPolicy has no hostname peers (FQDN rules need a CNI-specific policy such as Cilium toFQDNs). The policy selects only this workload, so it isolates only these pods. Add a namespace-wide default-deny later, once every workload in the namespace has a reviewed allow policy and its traffic is validated; earlier, it cuts traffic for pods that have none yet.kubectl apply the generated object to production./platform-skills:kubernetes.SecurityException from examples/kubescape-operator/security-exception.yaml (ClusterSecurityException with namespaceSelector for many namespaces); action: ignore, or alert_only to keep it visible.capabilities.riskAcceptance: enable; apply through Git; show the control at passed (w/exceptions) after the automatic rescan.capabilities.prometheusExporter: enable; ServiceMonitor with the Prometheus Operator, otherwise configurations.prometheusAnnotations: enable.examples/kubescape-operator/prometheusrule.yaml; fix the release label to the user's Prometheus ruleSelector.relevant series are 0 and the fallback alert exists./platform-skills:observability.Classify, then follow the matching troubleshooting entry in the reference:
| Symptom | First command | Usual cause |
|---|---|---|
| node-agent CrashLoopBackOff | kubectl -n kubescape logs ds/node-agent --previous | grep -i fanotify | runc path (global.overrideRuntimePath) or kernel without fanotify permissions |
| Installed, no results | kubectl -n kubescape logs deploy/kubescape | grep 'scanning failed' | bundled scanner v4.0.13 (framework 'C-0042' not found) |
| HelmRelease gone / InstallFailed | kubectl -n kubescape get hr kubescape -o jsonpath='{.status.conditions}' | node-agent not Ready → Flux uninstall remediation |
| APIService unavailable | kubectl get apiservice v1beta1.spdx.softwarecomposition.kubescape.io | storage starting or out of memory |
Profiles stay partial | kubectl get containerprofiles -n <ns> annotations | pods older than node-agent → restart |
| No metrics | port-forward the exporter, curl /metrics | ServiceMonitor selection, or scans failing |
Use the systematic order: evidence first, one hypothesis, smallest test, then the fix with verification and rollback.
remediation or autoUpgrading.global.enableClusterWideSecretAccess without explicit security approval.kubectl get applicationprofiles or networkneighborhoods (removed); use containerprofiles.references/kubescape-operator.md — full operator reference/platform-skills:kubescape — CLI, CIS audits, PR gate, VAP/platform-skills:runtime-security · /platform-skills:trivy · /platform-skills:fluxcd · /platform-skills:observabilityWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nitinjain999/platform-skills --plugin platform-skills52 skills in this plugin
/ai-governanceGenerate and enforce policy gates for AI coding agents (Copilot, Claude Code) — real-time session hooks that deny protected-path edits and dangerous commands, plus a merge-time backstop for anything that bypasses them. Use when asked to "govern AI agents", "block AI from touching secrets", "add an AI policy gate", or "why did the AI agent hook not fire"./awesome-docsGenerate, convert, and maintain animated GitHub-safe Markdown documents with animated SVG diagrams. Covers four SVG patterns (architecture flow, lifecycle loop, field carousel, timeline phases), guided interview for any doc type (README, architecture guide, runbook, API reference, tutorial, RFC, post-mortem, how-it-works, or custom), converting existing plain Markdown, diffing for stale diagrams, quality auditing, local preview, and multi-platform export. Use when asked to "create a README for X", "write an architecture doc", "animate this guide", "convert my doc to animated", "check if my diagrams are stale", or "export my doc for Confluence"./awsStructured guidance for AWS CloudFront distributions, WAF web ACLs, Lambda@Edge, CloudFront Functions, Firewall Manager multi-account enforcement, and IAM/IRSA patterns. Covers OAC, cache policies, security headers, managed rule groups, rate limiting, FMS FIRST/MIDDLE/LAST ownership model, and production-ready Terraform generation.Other plugins' skills for the same job