harness/claude/skills/k8s-connection/SKILL.md
Use when connecting to a Platforma instance running in Kubernetes. Covers port-forwarding, endpoint checks, pod/job diagnostics, and a fast “find the issue” triage flow.
npx skillsauth add popoffvg/dotfiles k8s-connectionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Connect to and debug a Platforma instance running in Kubernetes.
Run these checks in order and stop when the root cause is clear.
# 1) Confirm context/namespace
kubectl config current-context
kubectl get ns
# 2) Deployment and pod health
kubectl get deploy,pods -n <namespace> -o wide
kubectl get pods -n <namespace> --sort-by=.status.startTime
# 3) Recent warnings/errors
kubectl get events -n <namespace> --sort-by='.lastTimestamp' | tail -50
# 4) App logs (current + previous)
kubectl logs deployment/<platforma-deployment> -n <namespace> --tail=200
kubectl logs deployment/<platforma-deployment> -n <namespace> --previous --tail=200
If jobs are involved, immediately add:
kubectl get jobs -n <namespace>
kubectl describe job <job-name> -n <namespace>
kubectl logs job/<job-name> -n <namespace> --tail=200
# Forward debug API and metrics from Platforma deployment
kubectl port-forward deployment/<platforma-deployment> -n <namespace> 9091:9091 9090:9090
After this, use localhost:9091 for debug API and pl-db-cli calls.
# If auth is disabled:
curl -sf http://localhost:9091/debug/health || true
# If service address is used in tests:
kubectl get svc -n <namespace>
If endpoint is unreachable, debug networking/readiness before test logic.
kubectl set env deployment/<platforma-deployment> -n <namespace> \
PL_DEBUG_ENABLED=true PL_DEBUG_PORT=9091 PL_DEBUG_IP=0.0.0.0
kubectl rollout status deployment/<platforma-deployment> -n <namespace>
Re-establish port-forward after rollout.
Requirement: PL_DEBUG_IP=0.0.0.0 is required for port-forward access.
kubectl get deployments --all-namespaces | grep -i platforma
kubectl get pods -n <namespace> -l app=<label>
kubectl describe pod <pod-name> -n <namespace>
ImagePullBackOff / ErrImagePull → wrong image/tag or registry authFailedScheduling / Insufficient cpu|memory → cluster capacity or requests too highCrashLoopBackOff / OOMKilled → app startup failure or memory limits too lowBackoffLimitExceeded on Job → retry exhausted; inspect pod logs/eventsForbidden on kubectl actions (pods/exec, secrets, etc.) → RBAC issuekubectl get appwrappers -n <namespace> 2>/dev/null || true
kubectl get workloads -n <namespace> 2>/dev/null || true
kubectl get pvc -n <namespace>
kubectl describe pod <job-pod> -n <namespace>
Use these when Kueue or PVC/workdir behavior is suspected.
pkill -f "port-forward.*<platforma-deployment>" || true
kubectl port-forward deployment/<platforma-deployment> -n <namespace> 9091:9091 9090:9090
If multiple replicas exist, target a fixed pod to avoid random routing:
kubectl port-forward pod/<pod-name> -n <namespace> 9091:9091
When reporting findings, always include:
pod/job/deploy) and namespacetools
Improve a whole CLAUDE.local.md — the private, per-project rules captured from user corrections. Wraps each conditional rule in a <task-relevant> block so it only surfaces for matching work, merges duplicates, generalizes one-off facts, drops stale entries, and routes raw project facts to engram. Use when the user says "improve claude.local", "clean up the local rules", "claude.local is bloated", or after the Stop hook has appended many rules.
testing
WM pipeline and conventions shared across all phases. Agents must read this before spec, impl, or verify work.
development
One entry point for spec writing, implementation, and bug fixing. Default is new (write spec → grill loop → produce notes → author TODO bodies). Other subcommands: verify (audit), revise (sync to shipped), prototype (settle a decision), code-map (diagram), impl (execute one TODO), fix (analyze cause, correct thoughts, fix behavior), help (this page). Invoke as /code <subcommand>.
development
Red-Green-Refactor cycle for bug fixes. Before fixing a bug, first write a failing test that reproduces it (Red), then make the minimal change to pass (Green), then clean up the code (Refactor). Use on any bug fix, error correction, failing test repair, or when user says "fix this bug".