/castai-pack:castai-security-basicsfrom castai-pack
Secures CAST AI clusters by managing API key rotation, auditing RBAC, enabling Kvisor runtime security, and applying network policies.
Ships in castai-pack. 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.
Secure your CAST AI integration: API key management, RBAC least-privilege, Kvisor runtime security agent, and network policy configuration.
# Use separate keys per environment
# console.cast.ai > API > API Access Keys
# Development: Read-Only key (monitoring only)
# Staging: Full Access key with limited cluster scope
# Production: Full Access key, rotated every 90 days
# Store in secrets manager, never in code
aws secretsmanager create-secret \
--name "castai/prod/api-key" \
--secret-string "${CASTAI_API_KEY}"
# Rotate key procedure:
# 1. Generate new key in console
# 2. Update secrets manager
# 3. Restart CAST AI agent pods to pick up new key
# 4. Verify agent reconnects
# 5. Revoke old key in console
# Audit CAST AI ClusterRoles
kubectl get clusterroles -l app.kubernetes.io/managed-by=castai -o yaml
# The CAST AI agent needs these minimum permissions:
# - get/list/watch: pods, nodes, events, namespaces, replicasets
# - get: persistentvolumes, storageclasses
# The cluster controller additionally needs:
# - create/delete: nodes (for autoscaling)
# - patch: pods/eviction (for evictor)
# Check for overly broad permissions
kubectl auth can-i --list --as=system:serviceaccount:castai-agent:castai-agent
# Kvisor scans for CVEs, misconfigurations, and runtime threats
helm upgrade --install castai-kvisor castai-helm/castai-kvisor \
-n castai-agent \
--set castai.apiKey="${CASTAI_API_KEY}" \
--set castai.clusterID="${CASTAI_CLUSTER_ID}" \
--set controller.extraArgs.image-scan-enabled=true \
--set controller.extraArgs.kube-bench-enabled=true
# Verify Kvisor is running
kubectl get pods -n castai-agent -l app.kubernetes.io/name=castai-kvisor
# Restrict CAST AI agent egress to only api.cast.ai
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: castai-agent-egress
namespace: castai-agent
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: castai-agent
policyTypes:
- Egress
egress:
- to:
- ipBlock:
cidr: 0.0.0.0/0 # api.cast.ai resolves dynamically
ports:
- protocol: TCP
port: 443
- to: # Allow DNS
- namespaceSelector: {}
ports:
- protocol: UDP
port: 53
.gitignore| Issue | Detection | Mitigation |
|---|---|---|
| API key in git history | git log -S "CASTAI" | Rotate key immediately |
| Agent has cluster-admin | kubectl auth can-i --list | Apply scoped ClusterRole |
| Kvisor high resource use | kubectl top pods -n castai-agent | Adjust scan intervals |
| Network policy blocks agent | Agent goes offline | Allow egress to 443 |
For production deployment checklist, see castai-prod-checklist.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
castai, kubernetes-security, api-key-management, rbac, kvisor, network-policy
18 skills in this plugin
/castai-ci-integrationIntegrate CAST AI policy validation and cost checks into CI/CD pipelines.
Use when adding CAST AI savings verification to GitHub Actions,
validating Terraform plans, or gating deployments on cost thresholds.
Trigger with phrases like "cast ai CI", "cast ai github actions",
"cast ai terraform CI", "cast ai pipeline".
/castai-common-errorsDiagnose and fix CAST AI agent, API, and autoscaler errors.
Use when the CAST AI agent is offline, nodes are not scaling,
or API calls return errors.
Trigger with phrases like "cast ai error", "cast ai not working",
"cast ai agent offline", "cast ai debug", "fix cast ai".
/castai-core-workflow-aConfigure CAST AI autoscaler policies and node templates for cost optimization.
Use when enabling Phase 2 automation, setting spot instance policies,
or configuring node downscaler and evictor settings.
Trigger with phrases like "cast ai autoscaler", "cast ai policies",
"cast ai spot instances", "cast ai node optimization".
/castai-core-workflow-bConfigure CAST AI Workload Autoscaler for pod-level right-sizing and VPA.
Use when enabling workload autoscaling, configuring resource recommendations,
or tuning pod CPU and memory requests with CAST AI.
Trigger with phrases like "cast ai workload autoscaler", "cast ai pod sizing",
"cast ai resource recommendations", "cast ai VPA".
/castai-cost-tuningMaximize Kubernetes cost savings with CAST AI spot strategies and right-sizing.
Use when analyzing cloud spend, optimizing spot-to-on-demand ratios,
or configuring CAST AI for maximum savings.
Trigger with phrases like "cast ai cost", "cast ai savings",
"cast ai spot strategy", "reduce kubernetes cost", "cast ai budget".
/castai-debug-bundleCollect CAST AI diagnostic bundle for support tickets and troubleshooting.
Use when preparing a support case, collecting agent logs,
or building a diagnostic snapshot of cluster state.
Trigger with phrases like "cast ai debug", "cast ai support bundle",
"collect cast ai diagnostics", "cast ai logs".
npx claudepluginhub flight505/skill-forge --plugin castai-packOther plugins' skills for the same job