[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F80Z3RVCMDFRVR7H4YJB7C":3,"skill-same:01M6F80Z3RVCMDFRVR7H4YJB7C":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":61,"ownerHtmlUrl":62,"ownerBlogUrl":6,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M6F80Z3RVCMDFRVR7H4YJB7C","castai-cost-tuning",null,"Maximize Kubernetes cost savings with CAST AI spot strategies and right-sizing.\nUse when analyzing cloud spend, optimizing spot-to-on-demand ratios,\nor configuring CAST AI for maximum savings.\nTrigger with phrases like \"cast ai cost\", \"cast ai savings\",\n\"cast ai spot strategy\", \"reduce kubernetes cost\", \"cast ai budget\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fcastai-cost-tuning\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"castai cost tuning","castai","tuning","cost","edit","trigger","io","strategies","cast","use","strategy","kubernetes","write","read","Bash","Budget","saas","analyzing","Optimization","code","2026-11-10 10:12:30",false,"---\nname: castai-cost-tuning\ndescription: |\n  Maximize Kubernetes cost savings with CAST AI spot strategies and right-sizing.\n  Use when analyzing cloud spend, optimizing spot-to-on-demand ratios,\n  or configuring CAST AI for maximum savings.\n  Trigger with phrases like \"cast ai cost\", \"cast ai savings\",\n  \"cast ai spot strategy\", \"reduce kubernetes cost\", \"cast ai budget\".\nallowed-tools: Read, Write, Edit, Bash(curl:*), Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, kubernetes, cost-optimization, castai]\ncompatible-with: claude-code\n---\n\n# CAST AI Cost Tuning\n\n## Overview\n\nMaximize Kubernetes cost savings through CAST AI: spot instance strategies, workload right-sizing, cluster hibernation, and savings tracking. Typical savings: 50-70% on cloud compute costs.\n\n## Prerequisites\n\n- CAST AI Phase 2 enabled with full automation\n- Savings report available (requires 24h+ of data)\n- Understanding of workload criticality tiers\n\n## Instructions\n\n### Step 1: Analyze Current Savings\n\n```bash\n# Get savings breakdown\ncurl -s -H \"X-API-Key: ${CASTAI_API_KEY}\" \\\n  \"https:\u002F\u002Fapi.cast.ai\u002Fv1\u002Fkubernetes\u002Fclusters\u002F${CASTAI_CLUSTER_ID}\u002Fsavings\" \\\n  | jq '{\n    currentMonthlyCost: .currentMonthlyCost,\n    optimizedMonthlyCost: .optimizedMonthlyCost,\n    monthlySavings: .monthlySavings,\n    savingsPercentage: .savingsPercentage,\n    spotSavings: .spotSavings,\n    rightSizingSavings: .rightSizingSavings\n  }'\n```\n\n### Step 2: Maximize Spot Usage\n\n```bash\n# Enable aggressive spot with diversity and fallbacks\ncurl -X PUT -H \"X-API-Key: ${CASTAI_API_KEY}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  \"https:\u002F\u002Fapi.cast.ai\u002Fv1\u002Fkubernetes\u002Fclusters\u002F${CASTAI_CLUSTER_ID}\u002Fpolicies\" \\\n  -d '{\n    \"enabled\": true,\n    \"spotInstances\": {\n      \"enabled\": true,\n      \"clouds\": [\"aws\"],\n      \"spotDiversityEnabled\": true,\n      \"spotDiversityPriceIncreaseLimitPercent\": 20,\n      \"spotBackups\": {\n        \"enabled\": true,\n        \"spotBackupRestoreRateSeconds\": 600\n      }\n    }\n  }'\n```\n\n**Spot allocation strategy by workload tier:**\n\n| Workload Type | Spot % | Rationale |\n|---------------|--------|-----------|\n| Batch jobs, CI runners | 100% spot | Interruptible, restartable |\n| Stateless APIs (behind LB) | 80% spot | Can handle brief interruptions |\n| Stateful services, databases | 0% spot | Use on-demand or reserved |\n| ML training | 80-100% spot | Checkpointing handles interrupts |\n\n### Step 3: Workload Right-Sizing\n\n```bash\n# Get resource waste analysis\ncurl -s -H \"X-API-Key: ${CASTAI_API_KEY}\" \\\n  \"https:\u002F\u002Fapi.cast.ai\u002Fv1\u002Fworkload-autoscaling\u002Fclusters\u002F${CASTAI_CLUSTER_ID}\u002Fworkloads\" \\\n  | jq '[.items[] | select(.estimatedSavingsPercent > 20) | {\n    name: .workloadName,\n    namespace: .namespace,\n    wastedCpu: (.currentCpuRequest - .recommendedCpuRequest),\n    wastedMemory: (.currentMemoryRequest - .recommendedMemoryRequest),\n    savingsPercent: .estimatedSavingsPercent\n  }] | sort_by(-.savingsPercent) | .[0:10]'\n```\n\n### Step 4: Cluster Hibernation (Dev\u002FStaging)\n\n```bash\n# Hibernate non-production clusters during off-hours\n# Scales nodes to zero, resume on demand\n\n# Enable hibernation\ncurl -X POST -H \"X-API-Key: ${CASTAI_API_KEY}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  \"https:\u002F\u002Fapi.cast.ai\u002Fv1\u002Fkubernetes\u002Fclusters\u002F${CASTAI_CLUSTER_ID}\u002Fhibernate\" \\\n  -d '{\n    \"schedule\": {\n      \"enabled\": true,\n      \"hibernateAt\": \"20:00\",\n      \"wakeUpAt\": \"08:00\",\n      \"timezone\": \"America\u002FNew_York\",\n      \"weekdaysOnly\": true\n    }\n  }'\n```\n\n### Step 5: Cost Tracking Dashboard\n\n```typescript\ninterface CostReport {\n  cluster: string;\n  period: string;\n  currentCost: number;\n  optimizedCost: number;\n  savings: number;\n  spotPercent: number;\n}\n\nasync function generateMonthlyCostReport(\n  clusterIds: string[]\n): Promise\u003CCostReport[]> {\n  const reports: CostReport[] = [];\n\n  for (const clusterId of clusterIds) {\n    const [cluster, savings, nodes] = await Promise.all([\n      castaiGet(`\u002Fv1\u002Fkubernetes\u002Fexternal-clusters\u002F${clusterId}`),\n      castaiGet(`\u002Fv1\u002Fkubernetes\u002Fclusters\u002F${clusterId}\u002Fsavings`),\n      castaiGet(`\u002Fv1\u002Fkubernetes\u002Fexternal-clusters\u002F${clusterId}\u002Fnodes`),\n    ]);\n\n    const spotNodes = nodes.items.filter(\n      (n: { lifecycle: string }) => n.lifecycle === \"spot\"\n    ).length;\n\n    reports.push({\n      cluster: cluster.name,\n      period: new Date().toISOString().slice(0, 7),\n      currentCost: savings.currentMonthlyCost,\n      optimizedCost: savings.optimizedMonthlyCost,\n      savings: savings.monthlySavings,\n      spotPercent:\n        nodes.items.length > 0\n          ? (spotNodes \u002F nodes.items.length) * 100\n          : 0,\n    });\n  }\n\n  return reports;\n}\n```\n\n## Cost Optimization Checklist\n\n- [ ] Spot instances enabled with diversity\n- [ ] Workload autoscaler right-sizing resources\n- [ ] Dev\u002Fstaging clusters hibernated off-hours\n- [ ] Empty node downscaler enabled\n- [ ] Instance families include latest generation (cheaper)\n- [ ] Reserved\u002Fsavings plan for baseline on-demand nodes\n- [ ] Weekly savings report review\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Savings lower than expected | Too many on-demand constraints | Relax node template constraints |\n| Spot interruptions too frequent | Single instance type | Enable spot diversity |\n| Hibernation not triggering | Schedule timezone wrong | Use IANA timezone format |\n| Right-sizing too aggressive | Low headroom | Increase memory headroom to 20% |\n\n## Resources\n\n- [CAST AI Savings Report](https:\u002F\u002Fdocs.cast.ai\u002Fdocs\u002Fgetting-started)\n- [Spot Instance Best Practices](https:\u002F\u002Fdocs.cast.ai\u002Fdocs\u002Fautoscaler-settings)\n- [Cluster Hibernation](https:\u002F\u002Fdocs.cast.ai\u002Fdocs\u002Fautoscaling-cluster-hibernation)\n\n## Next Steps\n\nFor architecture patterns, see `castai-reference-architecture`.\n\n","# CAST AI Cost Tuning\n\n## Overview\n\nMaximize Kubernetes cost savings through CAST AI: spot instance strategies, workload right-sizing, cluster hibernation, and savings tracking. Typical savings: 50-70% on cloud compute costs.\n\n## Prerequisites\n\n- CAST AI Phase 2 enabled with full automation\n- Savings report available (requires 24h+ of data)\n- Understanding of workload criticality tiers\n\n## Instructions\n\n### Step 1: Analyze Current Savings\n\n```bash\n# Get savings breakdown\ncurl -s -H \"X-API-Key: ${CASTAI_API_KEY}\" \\\n  \"https:\u002F\u002Fapi.cast.ai\u002Fv1\u002Fkubernetes\u002Fclusters\u002F${CASTAI_CLUSTER_ID}\u002Fsavings\" \\\n  | jq '{\n    currentMonthlyCost: .currentMonthlyCost,\n    optimizedMonthlyCost: .optimizedMonthlyCost,\n    monthlySavings: .monthlySavings,\n    savingsPercentage: .savingsPercentage,\n    spotSavings: .spotSavings,\n    rightSizingSavings: .rightSizingSavings\n  }'\n```\n\n### Step 2: Maximize Spot Usage\n\n```bash\n# Enable aggressive spot with diversity and fallbacks\ncurl -X PUT -H \"X-API-Key: ${CASTAI_API_KEY}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  \"https:\u002F\u002Fapi.cast.ai\u002Fv1\u002Fkubernetes\u002Fclusters\u002F${CASTAI_CLUSTER_ID}\u002Fpolicies\" \\\n  -d '{\n    \"enabled\": true,\n    \"spotInstances\": {\n      \"enabled\": true,\n      \"clouds\": [\"aws\"],\n      \"spotDiversityEnabled\": true,\n      \"spotDiversityPriceIncreaseLimitPercent\": 20,\n      \"spotBackups\": {\n        \"enabled\": true,\n        \"spotBackupRestoreRateSeconds\": 600\n      }\n    }\n  }'\n```\n\n**Spot allocation strategy by workload tier:**\n\n| Workload Type | Spot % | Rationale |\n|---------------|--------|-----------|\n| Batch jobs, CI runners | 100% spot | Interruptible, restartable |\n| Stateless APIs (behind LB) | 80% spot | Can handle brief interruptions |\n| Stateful services, databases | 0% spot | Use on-demand or reserved |\n| ML training | 80-100% spot | Checkpointing handles interrupts |\n\n### Step 3: Workload Right-Sizing\n\n```bash\n# Get resource waste analysis\ncurl -s -H \"X-API-Key: ${CASTAI_API_KEY}\" \\\n  \"https:\u002F\u002Fapi.cast.ai\u002Fv1\u002Fworkload-autoscaling\u002Fclusters\u002F${CASTAI_CLUSTER_ID}\u002Fworkloads\" \\\n  | jq '[.items[] | select(.estimatedSavingsPercent > 20) | {\n    name: .workloadName,\n    namespace: .namespace,\n    wastedCpu: (.currentCpuRequest - .recommendedCpuRequest),\n    wastedMemory: (.currentMemoryRequest - .recommendedMemoryRequest),\n    savingsPercent: .estimatedSavingsPercent\n  }] | sort_by(-.savingsPercent) | .[0:10]'\n```\n\n### Step 4: Cluster Hibernation (Dev\u002FStaging)\n\n```bash\n# Hibernate non-production clusters during off-hours\n# Scales nodes to zero, resume on demand\n\n# Enable hibernation\ncurl -X POST -H \"X-API-Key: ${CASTAI_API_KEY}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  \"https:\u002F\u002Fapi.cast.ai\u002Fv1\u002Fkubernetes\u002Fclusters\u002F${CASTAI_CLUSTER_ID}\u002Fhibernate\" \\\n  -d '{\n    \"schedule\": {\n      \"enabled\": true,\n      \"hibernateAt\": \"20:00\",\n      \"wakeUpAt\": \"08:00\",\n      \"timezone\": \"America\u002FNew_York\",\n      \"weekdaysOnly\": true\n    }\n  }'\n```\n\n### Step 5: Cost Tracking Dashboard\n\n```typescript\ninterface CostReport {\n  cluster: string;\n  period: string;\n  currentCost: number;\n  optimizedCost: number;\n  savings: number;\n  spotPercent: number;\n}\n\nasync function generateMonthlyCostReport(\n  clusterIds: string[]\n): Promise\u003CCostReport[]> {\n  const reports: CostReport[] = [];\n\n  for (const clusterId of clusterIds) {\n    const [cluster, savings, nodes] = await Promise.all([\n      castaiGet(`\u002Fv1\u002Fkubernetes\u002Fexternal-clusters\u002F${clusterId}`),\n      castaiGet(`\u002Fv1\u002Fkubernetes\u002Fclusters\u002F${clusterId}\u002Fsavings`),\n      castaiGet(`\u002Fv1\u002Fkubernetes\u002Fexternal-clusters\u002F${clusterId}\u002Fnodes`),\n    ]);\n\n    const spotNodes = nodes.items.filter(\n      (n: { lifecycle: string }) => n.lifecycle === \"spot\"\n    ).length;\n\n    reports.push({\n      cluster: cluster.name,\n      period: new Date().toISOString().slice(0, 7),\n      currentCost: savings.currentMonthlyCost,\n      optimizedCost: savings.optimizedMonthlyCost,\n      savings: savings.monthlySavings,\n      spotPercent:\n        nodes.items.length > 0\n          ? (spotNodes \u002F nodes.items.length) * 100\n          : 0,\n    });\n  }\n\n  return reports;\n}\n```\n\n## Cost Optimization Checklist\n\n- [ ] Spot instances enabled with diversity\n- [ ] Workload autoscaler right-sizing resources\n- [ ] Dev\u002Fstaging clusters hibernated off-hours\n- [ ] Empty node downscaler enabled\n- [ ] Instance families include latest generation (cheaper)\n- [ ] Reserved\u002Fsavings plan for baseline on-demand nodes\n- [ ] Weekly savings report review\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Savings lower than expected | Too many on-demand constraints | Relax node template constraints |\n| Spot interruptions too frequent | Single instance type | Enable spot diversity |\n| Hibernation not triggering | Schedule timezone wrong | Use IANA timezone format |\n| Right-sizing too aggressive | Low headroom | Increase memory headroom to 20% |\n\n## Resources\n\n- [CAST AI Savings Report](https:\u002F\u002Fdocs.cast.ai\u002Fdocs\u002Fgetting-started)\n- [Spot Instance Best Practices](https:\u002F\u002Fdocs.cast.ai\u002Fdocs\u002Fautoscaler-settings)\n- [Cluster Hibernation](https:\u002F\u002Fdocs.cast.ai\u002Fdocs\u002Fautoscaling-cluster-hibernation)\n\n## Next Steps\n\nFor architecture patterns, see `castai-reference-architecture`.\n\n",{"name":5,"tags":49,"author":51,"license":15,"version":52,"description":53,"allowed-tools":54,"compatible-with":55},[40,35,50,25],"cost-optimization","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Maximize Kubernetes cost savings with CAST AI spot strategies and right-sizing.\nUse when analyzing cloud spend, optimizing spot-to-on-demand ratios,\nor configuring CAST AI for maximum savings.\nTrigger with phrases like \"cast ai cost\", \"cast ai savings\",\n\"cast ai spot strategy\", \"reduce kubernetes cost\", \"cast ai budget\".\n","Read, Write, Edit, Bash(curl:*), Grep","claude-code","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fcastai-cost-tuning",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill castai-cost-tuning",{"tool":71,"command":72},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill castai-cost-tuning",{"tool":74,"command":75},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill castai-cost-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fcastai-cost-tuning\u002FSKILL.md",true,[],[80,92,102,111,117,124],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":88,"publishedAt":44},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[85],{"categoryNo":86,"categoryName":87,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[89,90,91],"model","model hierarchy","model hierarchy skill",{"skillNo":93,"name":94,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":98,"publishedAt":44},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[97],{"categoryNo":86,"categoryName":87,"taxonomyType":21,"taxonomyTypeDesc":22},[99,100,101],"MCP","zoom","zoom mcp",{"skillNo":103,"name":104,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":44},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[108,109,110,100],"sdk","zoom apps sdk","apps",{"skillNo":112,"name":113,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":44},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[113],{"skillNo":118,"name":119,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":123,"publishedAt":44},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[122],{"categoryNo":86,"categoryName":87,"taxonomyType":21,"taxonomyTypeDesc":22},[119],{"skillNo":125,"name":126,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":44},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[126]]