bex: Skill for Claude Code

.claude/skills/mock-cluster/SKILL.md

mock-cluster is a skill for Claude Code, Codex from bex-co/bex. It costs 48 tokens per session (987 once invoked), scanned A, original, Apache-2.0.

A runbook for creating or resizing a local test cluster that imitates the hosting environment and deploying the bex operator into it.

In plain words
What is it for?
Starting the local Kind and Cluster API cluster, installing its required components, loading the operator image, deploying the operator, or scaling the cluster to a chosen number of nodes.
Why use it?
It provides a repeatable local environment for testing cluster behavior without changing the live system.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also agents/openai.yaml present.

This is bex-co/bex's own configuration. It tells Claude Code and Codex how to work on bex itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything bex configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is Bash(bash scripts/mock-cluster.sh:*), Bash(kubectl:*), Bash(docker:*), Bash(make:*), Bash(kind:*), Bash(clusterctl:*), Bash(cut:*).

Reuse

Borrowing it

Nothing to install: this file belongs to bex-co/bex. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/bex-co/bex/main/.claude/skills/mock-cluster/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/bex-co/bex

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mock-cluster

README.md
[![agentmods](https://agentmods.dev/badge/skills/bex-co/bex/mock-cluster/github.svg)](https://agentmods.dev/skills/bex-co/bex/mock-cluster)
Your own site
<a href="https://agentmods.dev/skills/bex-co/bex/mock-cluster"><img src="https://agentmods.dev/badge/skills/bex-co/bex/mock-cluster/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mock-cluster

Your own site · 80×15
<a href="https://agentmods.dev/skills/bex-co/bex/mock-cluster"><img src="https://agentmods.dev/badge/skills/bex-co/bex/mock-cluster.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 987 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 12
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 17
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 12
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 16
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 17
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.00987
Opus 5.5 $0.00019 $0.00395
Sonnet 5.5 $0.00010 $0.00197
Haiku 4.5 $0.00005 $0.00099

Measured 1mo ago against content hash 6eb164b22fb9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mock-cluster scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/mock-cluster/SKILL.md · 44 lines

What it actually says

Bring up the local mock of the Hetzner substrate and deploy the bex operator into it.

If $ARGUMENTS is scale N: just run bash scripts/mock-cluster.sh scale N, then show kubectl get nodes (with KUBECONFIG=infra/local/bex.kubeconfig) and stop.

Otherwise, run the full bring-up:

  1. bash scripts/mock-cluster.sh — kind infra cluster + Cluster API + CAPD app cluster, plus the app-cluster baseline the operator needs: Calico, coredns/calico-kube-controllers control-plane pins, local-path default StorageClass, cert-manager (prod's pinned version; make deploy's webhook cert requires it). This can take several minutes; it writes the app-cluster kubeconfig to infra/local/bex.kubeconfig.
  2. Use that kubeconfig for every following command: export KUBECONFIG=$PWD/infra/local/bex.kubeconfig (or --kubeconfig). Never print its contents.
  3. Build and load the operator image (CAPD nodes can't pull local-only images):
    • ( cd lego/operator && make docker-build IMG=bex-operator:dev )
    • docker save bex-operator:dev -o /tmp/bex-op.tar
    • For each node (strip the node/ prefix — kubectl get nodes -o name returns node/<name> but docker cp/docker exec need the bare container name):
      for n in $(kubectl get nodes -o name | cut -d/ -f2); do
        docker cp /tmp/bex-op.tar "$n":/op.tar && docker exec "$n" ctr -n k8s.io images import /op.tar
      done
      
  4. ( cd lego/operator && make deploy IMG=bex-operator:dev ) — deploys to ns bex-system with BEX_RUNTIME=kubernetes. The bex-ssh-gateway IngressRouteTCP fails without Traefik CRDs — expected and harmless on the mock; everything else applies. Then kubectl apply -f deploy/gitops/base/operator-apps-rbac.yaml — the apps-namespace bex-operator-apps Role/RoleBinding is Argo-managed in prod and absent from the operator's kustomize config; without it the manager crashloops on "failed to wait for … caches to sync" (its namespace-scoped Secret/Job watches in default are forbidden; w1/043).
  5. Local-CAPD-only fixes (re-apply all three after every make deploy — it reverts them; w1/043):
    • Label the control-plane node into the platform pool (the manifest's nodeSelector is bex.co/pool=platform, and the operator must sit on the control-plane node because OrbStack/Calico can't route cross-node pod→apiserver; see docs/ADR004-app-deployment.md): kubectl label node <control-plane-node> bex.co/pool=platform --overwrite
    • Pin the operator to the control-plane node:
      kubectl -n bex-system patch deploy bex-controller-manager --type merge -p \
       '{"spec":{"template":{"spec":{"nodeSelector":{"node-role.kubernetes.io/control-plane":""},
        "tolerations":[{"key":"node-role.kubernetes.io/control-plane","effect":"NoSchedule"}]}}}}'
      
    • The manifest sets imagePullPolicy: Always, which can never be satisfied by the ctr-imported local image (ErrImagePull) — override it:
      kubectl -n bex-system patch deploy bex-controller-manager --type strategic -p \
       '{"spec":{"template":{"spec":{"containers":[{"name":"manager","imagePullPolicy":"IfNotPresent"}]}}}}'
      
  6. kubectl -n bex-system rollout status deploy/bex-controller-manager — wait for Ready.

Finish by reporting: node list, operator pod status, and the one-liners to deploy an App (/deploy-app) and to scale machines (/mock-cluster scale N).

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 44 lines · 48 tokens per session scan A 6eb164b22fb9

Subscribe to this mod's changes

mock-cluster is a skill published in the GitHub repository bex-co/bex (574 stars, last pushed today), licensed Apache-2.0. It adds 48 tokens to every session and 987 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

network-rca

Kubernetes network root cause analysis skill powered by Kubeshark MCP. Use this skill whenever the user wants to investigate past incidents, perform retrospective traffic analysis, take or manage traffic snapshots, extract PCAPs, dissect L7 API calls from historical captures, compare traffic patterns over time, detect…

kubeshark/kubeshark · 163 tokens

kfl

KFL2 (Kubeshark Filter Language) reference. This skill MUST be loaded before writing, constructing, or suggesting any KFL filter expression. KFL is statically typed — incorrect field names or syntax will fail silently or error. Do not guess at KFL syntax without this skill loaded. Trigger on any mention of KFL, CEL…

kubeshark/kubeshark · 203 tokens

security-audit

Kubernetes network security audit skill powered by Kubeshark MCP. Use this skill whenever the user wants to audit a cluster for security threats, detect compromised workloads, find malicious traffic patterns, hunt for indicators of compromise (IOCs), check for data exfiltration, identify C2 (command and control)…

kubeshark/kubeshark · 182 tokens

install

Kubeshark installation and deployment skill. Use this skill whenever the user wants to install Kubeshark, deploy Kubeshark to a Kubernetes cluster, set up Kubeshark, configure Kubeshark helm values, generate a Kubeshark config file, customize Kubeshark deployment, troubleshoot Kubeshark installation, upgrade…

kubeshark/kubeshark · 257 tokens

argocd-expert

Expert-level ArgoCD GitOps deployment, application management, sync strategies, and production operations. Use when the user mentions GitOps, Kubernetes, continuous deployment, declarative, or automation, or when the task involves ArgoCD Architecture, Application CRD, AppProject, or ApplicationSet.

personamanagmentlayer/pcl · 65 tokens

epistemic-graph-deploy

Promote and deploy the epistemic-graph engine (the SI-native database) in the live Kubernetes graph-os unified-image deployment, and restart its clients safely. Use when shipping a new engine build, rolling out Rust-side changes, or restarting graph-os and messaging to pick up a validated artifact. The engine is baked…

Knuckles-Team/epistemic-graph · 103 tokens