From castai-pack
Queries CAST AI API for Kubernetes cluster savings, node inventory, and policies via curl. Verifies connectivity and cost optimization after onboarding.
How this skill is triggered — by the user, by Claude, or both
Slash command
/castai-pack:castai-hello-worldThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
First API calls against the CAST AI REST API: list connected clusters, retrieve the savings report, and inspect node inventory. All examples use `curl` with the `X-API-Key` header -- no SDK required.
First API calls against the CAST AI REST API: list connected clusters, retrieve the savings report, and inspect node inventory. All examples use curl with the X-API-Key header -- no SDK required.
castai-install-auth setupCASTAI_API_KEY environment variable setcurl -s -H "X-API-Key: ${CASTAI_API_KEY}" \
https://api.cast.ai/v1/kubernetes/external-clusters \
| jq '.items[] | {id, name, status, providerType}'
Expected output:
{
"id": "abc123-def456",
"name": "production-eks",
"status": "ready",
"providerType": "eks"
}
export CASTAI_CLUSTER_ID="your-cluster-id"
# Current month savings
curl -s -H "X-API-Key: ${CASTAI_API_KEY}" \
"https://api.cast.ai/v1/kubernetes/clusters/${CASTAI_CLUSTER_ID}/savings" \
| jq '{
monthlySavings: .monthlySavings,
savingsPercentage: .savingsPercentage,
currentCost: .currentMonthlyCost,
optimizedCost: .optimizedMonthlyCost
}'
curl -s -H "X-API-Key: ${CASTAI_API_KEY}" \
"https://api.cast.ai/v1/kubernetes/external-clusters/${CASTAI_CLUSTER_ID}/nodes" \
| jq '.items[] | {
name: .name,
instanceType: .instanceType,
lifecycle: .lifecycle,
cpu: .allocatableCpu,
memory: .allocatableMemory,
zone: .zone
}'
curl -s -H "X-API-Key: ${CASTAI_API_KEY}" \
"https://api.cast.ai/v1/kubernetes/clusters/${CASTAI_CLUSTER_ID}/policies" \
| jq '{
enabled: .enabled,
unschedulablePods: .unschedulablePods.enabled,
nodeDownscaler: .nodeDownscaler.enabled,
spotInstances: .spotInstances.enabled
}'
| Error | Cause | Solution |
|---|---|---|
401 Unauthorized | Bad API key | Regenerate at console.cast.ai |
404 Not Found | Wrong cluster ID | List clusters first to get correct ID |
Empty items array | No clusters connected | Run castai-install-auth to onboard |
agentStatus: offline | Agent not running | Check kubectl get pods -n castai-agent |
Proceed to castai-local-dev-loop to set up a development workflow.
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin castai-packOptimizes Kubernetes costs using CAST AI APIs for spot instance strategies, workload right-sizing, savings analysis, and policy configuration.
Reviews IONOS managed Kubernetes cluster and node pool configuration including readiness, autoscaling, PDB coverage, upgrade safety, kubeconfig management, and GDPR region compliance.
Analyzes Kubernetes manifests and live cluster metrics to recommend pod right-sizing, estimate costs, detect over-provisioned containers, resource waste, and configuration drift.