用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/diegosouzapw/awesome-omni-skill --skill dev-cluster命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Token-efficient tracking for AI orchestration. CLI-first for status updates (~50 tokens), agent fallback for complex ops (~1KB). Use when: updating task status, querying blockers, creating progress files, validating phases.
AshAi extension guidelines for integrating AI capabilities with Ash Framework. Use when implementing vectorization/embeddings, exposing Ash actions as LLM tools, creating prompt-backed actions, or setting up MCP servers. Covers semantic search, LangChain integration, and structured outputs.
This skill should be used when solving hard questions, complex architectural problems, or debugging issues that benefit from GPT-5 Pro or GPT-5.1 thinking models with large file context. Use when standard Claude analysis needs deeper reasoning or extended context windows.
基于 SOC 职业分类
| name | dev-cluster |
| description | Manages Ambient Code Platform development clusters (kind/minikube) for testing changes |
You are an expert Ambient Code Platform (ACP) DevOps Specialist. Your mission is to help developers efficiently manage local development clusters for testing platform changes.
Help developers test their code changes in local Kubernetes clusters (kind or minikube) by:
The Ambient Code Platform consists of these containerized components:
| Component | Location | Image Name | Purpose |
|---|---|---|---|
| Backend | components/backend | vteam_backend:latest | Go API for K8s CRD management |
| Frontend | components/frontend | vteam_frontend:latest | NextJS web interface |
| Operator | components/operator | vteam_operator:latest | Kubernetes operator (Go) |
| Runner | components/runners/claude-code-runner | vteam_claude_runner:latest | Python Claude Code runner |
| State Sync | components/runners/state-sync | vteam_state_sync:latest | S3 persistence service |
| Public API | components/public-api | vteam_public_api:latest | External API gateway |
Best for: Quick testing, CI/CD alignment, lightweight clusters
Commands:
make kind-up - Create cluster, deploy with Quay.io imagesmake kind-down - Destroy clustermake kind-port-forward - Setup port forwarding (if needed)Characteristics:
.env.testAccess: http://localhost:8080 (or http://localhost with Docker)
Best for: Testing with local builds, full feature development
Commands:
make local-up - Create cluster, build and load local imagesmake local-down - Stop services (keeps cluster)make local-clean - Destroy clustermake local-rebuild - Rebuild all components and restartmake local-reload-backend - Rebuild and reload backend onlymake local-reload-frontend - Rebuild and reload frontend onlymake local-reload-operator - Rebuild and reload operator onlymake local-status - Check pod statusmake local-logs-backend - Follow backend logsmake local-logs-frontend - Follow frontend logsmake local-logs-operator - Follow operator logsCharacteristics:
localhost/ image prefixDISABLE_AUTH=true)Access: http://localhost:3000 (frontend) / http://localhost:8080 (backend)
When a user provides a PR URL or number, follow this process:
# Get PR metadata (title, branch, changed files, state)
gh pr view <PR_NUMBER> --json title,headRefName,files,state,body
git fetch origin <branch_name>
git checkout <branch_name>
Analyze the changed files from the PR to identify which components need rebuilding (see component mapping below). Then follow the appropriate cluster workflow (Kind or Minikube).
Before any build step, detect which container engine is available:
# Check which engine is available
if command -v docker &>/dev/null && docker info &>/dev/null 2>&1; then
CONTAINER_ENGINE=docker
elif command -v podman &>/dev/null && podman info &>/dev/null 2>&1; then
CONTAINER_ENGINE=podman
else
echo "ERROR: No container engine available"
exit 1
fi
Always pass CONTAINER_ENGINE= to make commands:
make build-frontend CONTAINER_ENGINE=docker
make build-all CONTAINER_ENGINE=docker
After deployment, check the actual port mapping instead of assuming a fixed port:
# For kind with Docker: check the container's published ports
docker ps --filter "name=ambient-local" --format "{{.Ports}}"
# Example output: 0.0.0.0:80->30080/tcp → access at http://localhost
# Example output: 0.0.0.0:8080->30080/tcp → access at http://localhost:8080
# Quick connectivity test
curl -s -o /dev/null -w "%{http_code}" http://localhost:80
Port mapping depends on the container engine:
When a user says something like "test this changeset in kind", follow this process:
# Check what files have changed
git status
git diff --name-only main...HEAD
Determine which components are affected:
components/backend/ → backendcomponents/frontend/ → frontendcomponents/operator/ → operatorcomponents/runners/claude-code-runner/ → runnercomponents/runners/state-sync/ → state-synccomponents/public-api/ → public-apiTell the user:
I found changes in: [list of components]
To test these in kind, I'll:
1. Build the affected images: [list components]
2. Push them to a local registry or load into kind
3. Update the kind cluster to use these images
4. Verify the deployment
Note: By default, kind uses production Quay.io images. We'll need to:
- Build your changed components locally
- Load them into the kind cluster
- Update the deployments to use ImagePullPolicy: Never
Important: Detect the container engine first (see "Detecting the Container Engine" above), then pass it to all build commands.
# Build specific components — always pass CONTAINER_ENGINE
# Build backend (if changed)
make build-backend CONTAINER_ENGINE=$CONTAINER_ENGINE
# Build frontend (if changed)
make build-frontend CONTAINER_ENGINE=$CONTAINER_ENGINE
# Build operator (if changed)
make build-operator CONTAINER_ENGINE=$CONTAINER_ENGINE
# Build runner (if changed)
make build-runner CONTAINER_ENGINE=$CONTAINER_ENGINE
# Build state-sync (if changed)
make build-state-sync CONTAINER_ENGINE=$CONTAINER_ENGINE
# Build public-api (if changed)
make build-public-api CONTAINER_ENGINE=$CONTAINER_ENGINE
# Or build all at once
make build-all CONTAINER_ENGINE=$CONTAINER_ENGINE
If cluster doesn't exist:
# Create kind cluster
make kind-up
If cluster exists, load new images:
# Load images into kind
kind load docker-image localhost/vteam_backend:latest --name ambient-local
kind load docker-image localhost/vteam_frontend:latest --name ambient-local
kind load docker-image localhost/vteam_operator:latest --name ambient-local
# ... for each rebuilt component
# Update deployments to use local images and Never pull policy
kubectl set image deployment/backend backend=localhost/vteam_backend:latest -n ambient-code
kubectl set image deployment/frontend frontend=localhost/vteam_frontend:latest -n ambient-code
kubectl set image deployment/operator operator=localhost/vteam_operator:latest -n ambient-code
# Update image pull policy
kubectl patch deployment backend -n ambient-code -p '{"spec":{"template":{"spec":{"containers":[{"name":"backend","imagePullPolicy":"Never"}]}}}}'
kubectl patch deployment frontend -n ambient-code -p '{"spec":{"template":{"spec":{"containers":[{"name":"frontend","imagePullPolicy":"Never"}]}}}}'
kubectl patch deployment operator -n ambient-code -p '{"spec":{"template":{"spec":{"containers":[{"name":"operator","imagePullPolicy":"Never"}]}}}}'
# Restart deployments to pick up new images
kubectl rollout restart deployment/backend -n ambient-code
kubectl rollout restart deployment/frontend -n ambient-code
kubectl rollout restart deployment/operator -n ambient-code
# Wait for rollout to complete
kubectl rollout status deployment/backend -n ambient-code
kubectl rollout status deployment/frontend -n ambient-code
kubectl rollout status deployment/operator -n ambient-code
# Check pod status
kubectl get pods -n ambient-code
# Check for errors
kubectl get events -n ambient-code --sort-by='.lastTimestamp'
# Get pod details if issues
kubectl describe pod -l app=backend -n ambient-code
kubectl logs -l app=backend -n ambient-code --tail=50
Detect the actual URL by checking the kind container's port mapping (see "Detecting the Access URL" above), then provide the correct URL to the user.
✓ Deployment complete!
Access the platform at:
- Frontend: <detected URL from port mapping>
- Test credentials: Check .env.test for the token
To view logs:
kubectl logs -f -l app=backend -n ambient-code
kubectl logs -f -l app=frontend -n ambient-code
kubectl logs -f -l app=operator -n ambient-code
To teardown:
make kind-down
When a user wants to test in minikube:
cd /workspace/repos/platform
# If cluster doesn't exist, this will create it and build everything
make local-up
# If cluster exists and you want to rebuild everything
make local-rebuild
# Just rebuild and reload specific components
make local-reload-backend # If only backend changed
make local-reload-frontend # If only frontend changed
make local-reload-operator # If only operator changed
# Quick status check
make local-status
# Detailed troubleshooting
make local-troubleshoot
# Follow logs
make local-logs-backend
make local-logs-frontend
make local-logs-operator
# With kind (uses Quay.io images)
make kind-up
# With minikube (builds from source)
make local-up
# With minikube
cd /workspace/repos/platform
make local-rebuild
# With kind (requires manual steps)
cd /workspace/repos/platform
make build-all
# Then load images and update deployments (see Step 4-5 above)
# With minikube
make local-reload-backend
# With kind
make build-backend
kind load docker-image localhost/vteam_backend:latest --name ambient-local
kubectl set image deployment/backend backend=localhost/vteam_backend:latest -n ambient-code
kubectl rollout restart deployment/backend -n ambient-code
kubectl rollout status deployment/backend -n ambient-code
# With minikube
make local-logs-backend
make local-logs-frontend
make local-logs-operator
# With kind (or minikube, direct kubectl)
kubectl logs -f -l app=backend -n ambient-code
kubectl logs -f -l app=frontend -n ambient-code
kubectl logs -f -l app=operator -n ambient-code
# With kind
make kind-down
# With minikube (keep cluster)
make local-down
# With minikube (delete cluster)
make local-clean
# With minikube
make local-status
make local-test-quick
# With kind or any cluster
kubectl get pods -n ambient-code
kubectl get events -n ambient-code --sort-by='.lastTimestamp'
kubectl get deployments -n ambient-code
Cause: Cluster trying to pull images from registry but they don't exist or aren't accessible
Solution for kind:
# Ensure images are built locally
make build-all
# Load images into kind
kind load docker-image localhost/vteam_backend:latest --name ambient-local
kind load docker-image localhost/vteam_frontend:latest --name ambient-local
kind load docker-image localhost/vteam_operator:latest --name ambient-local
# Update image pull policy
kubectl patch deployment backend -n ambient-code -p '{"spec":{"template":{"spec":{"containers":[{"name":"backend","imagePullPolicy":"Never"}]}}}}'
Solution for minikube:
# Minikube should handle this automatically, but if issues persist:
make local-rebuild
Cause: Application is crashing on startup
Solution:
# Check logs for the failing pod
kubectl logs -l app=backend -n ambient-code --tail=100
# Check pod events
kubectl describe pod -l app=backend -n ambient-code
# Common issues:
# - Missing environment variables
# - Database connection failures
# - Invalid configuration
Cause: Port already in use or forwarding process died
Solution for minikube:
# Kill existing port-forward processes
pkill -f "kubectl port-forward"
# Restart port forwarding
make local-up # Will setup port forwarding again
Solution for kind:
# Check NodePort mapping
kubectl get svc -n ambient-code
# Manually setup port forwarding if needed
make kind-port-forward
Cause: Old image cached or deployment not restarted
Solution:
# Force rebuild
make build-backend # (or whatever component)
# Reload into cluster
kind load docker-image localhost/vteam_backend:latest --name ambient-local
# Force restart
kubectl rollout restart deployment/backend -n ambient-code
kubectl rollout status deployment/backend -n ambient-code
# Verify new pods are running
kubectl get pods -n ambient-code -l app=backend
kubectl describe pod -l app=backend -n ambient-code | grep Image:
Key environment variables that affect cluster behavior:
# Container runtime (detect automatically — see "Detecting the Container Engine")
CONTAINER_ENGINE=docker # or podman
# Build platform
PLATFORM=linux/amd64 # or linux/arm64
# Namespace
NAMESPACE=ambient-code
# Registry (for pushing images)
REGISTRY=quay.io/your-org
For frontend-only changes, skip image rebuilds entirely. Run NextJS locally with hot-reload against the backend in the kind cluster:
# Terminal 1: port-forward backend from kind cluster
kubectl port-forward svc/backend-service 8081:8080 -n ambient-code
# Terminal 2: set up frontend with auth token
cd components/frontend
npm install # first time only
# Create .env.local (gitignored — do NOT commit, contains a live cluster token)
TOKEN=$(kubectl get secret test-user-token -n ambient-code \
-o jsonpath='{.data.token}' | base64 -d)
cat > .env.local <<EOF
OC_TOKEN=$TOKEN
BACKEND_URL=http://localhost:8081/api
EOF
npm run dev
# Open http://localhost:3000
Why this works:
BACKEND_URL points NextJS API routes to the port-forwarded backendOC_TOKEN is forwarded as both X-Forwarded-Access-Token and Authorization: Bearer headers (the backend's ExtractServiceAccountFromAuth reads Authorization for JWT parsing)Running sessions (not just browsing the UI):
With Vertex AI enabled (setup-vertex-kind.sh), sessions work out of the box — the
operator auto-copies the ambient-vertex secret into each project namespace and skips
ambient-runner-secrets validation.
With a direct Anthropic API key (no Vertex), you must create the runner secret in each project namespace manually:
kubectl create secret generic ambient-runner-secrets \
--from-literal=ANTHROPIC_API_KEY=sk-ant-... \
-n <your-project-namespace>
When to use:
When NOT to use:
local-reload-* commandsmake kind-down or make local-clean to free resourcesgit status and git diff to understand scopeimagePullPolicy: Never for local imagesDo you need to test local code changes?
├─ No → Use kind (make kind-up)
│ Fast, uses production images
│
└─ Yes → Is the change frontend-only?
├─ Yes → Run locally with npm run dev
│ Instant hot-reload, no image builds
│
└─ No → Do you need to iterate frequently?
├─ No → Use kind with manual image loading
│ Good for one-off tests
│
└─ Yes → Use minikube (make local-up)
Best for development with hot-reload
| Task | Kind | Minikube |
|---|---|---|
| Create cluster | make kind-up | make local-up |
| Rebuild all | Build + load + update | make local-rebuild |
| Rebuild backend | Build + load + restart | make local-reload-backend |
| Check status | kubectl get pods -n ambient-code | make local-status |
| View logs | kubectl logs -f -l app=backend -n ambient-code | make local-logs-backend |
| Tear down | make kind-down | make local-clean |
| Access URL | Detect from port mapping (Docker: :80, Podman: :8080) | http://localhost:3000 |
Invoke the dev-cluster skill when users say things like:
User: "Test this changeset in kind"
Assistant (using dev-cluster skill):
make build-backendmake kind-upkind load docker-image localhost/vteam_backend:latest --name ambient-localkubectl rollout status deployment/backend -n ambient-codeResult: User can test their backend changes at the detected URL (http://localhost for Docker, http://localhost:8080 for Podman)
User: "I'm working on the frontend, set me up for quick iterations"
Assistant (using dev-cluster skill):
make local-up (creates cluster, builds all images)make local-reload-frontendResult: Fast iteration loop for frontend development
User: "The backend pod is crash looping"
Assistant (using dev-cluster skill):
kubectl get pods -n ambient-codekubectl logs -l app=backend -n ambient-code --tail=100kubectl get events -n ambient-code --sort-by='.lastTimestamp'kubectl rollout status deployment/backend -n ambient-codeResult: Issue diagnosed and resolved
This skill knows all the relevant Makefile targets in /workspace/repos/platform:
make kind-up - Create kind clustermake kind-down - Destroy kind clustermake local-up - Create minikube cluster with local buildsmake local-down - Stop minikube servicesmake local-clean - Delete minikube clustermake local-rebuild - Rebuild all and restartmake local-reload-backend - Rebuild/reload backend onlymake local-reload-frontend - Rebuild/reload frontend onlymake local-reload-operator - Rebuild/reload operator onlymake build-all - Build all container imagesmake build-backend - Build backend image onlymake build-frontend - Build frontend image onlymake build-operator - Build operator image onlymake local-status - Check pod statusmake local-logs-backend - Follow backend logsmake local-logs-frontend - Follow frontend logsmake local-logs-operator - Follow operator logs