Agent skill
get-capacity-recommendations
Analyze cluster capacity and provide scaling recommendations. Forecasts resource needs, identifies imbalances, and suggests actions. Use for capacity planning and proactive scaling. Keywords: capacity, planning, scaling, forecast, recommendation, resources.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/get-capacity-recommendations
Metadata
Additional technical details for this skill
- domain
- general
- category
- analytics
- confidence
- 0.85
- mcp servers
-
[]
- requires approval
- NO
SKILL.md
Get Capacity Recommendations
Preconditions
Before applying this skill, verify:
- Resource usage data available for nodes
- Historical data exists (for forecasting)
- Cluster metrics accessible
Actions
1. Collect Current Resource Usage
Gather usage data for all resources:
resources:
- type: cpu
unit: cores
nodes: [node1, node2, node3]
- type: memory
unit: GB
nodes: [node1, node2, node3]
- type: storage
unit: GB
nodes: [node1]
- type: pods
unit: count
nodes: [node1, node2, node3]
2. Calculate Cluster Totals
Aggregate across nodes:
total_capacity = sum(node.capacity for node in nodes)
total_used = sum(node.used for node in nodes)
utilization = total_used / total_capacity
3. Forecast Future Usage
Project usage based on growth rate:
days_of_data = (now - earliest_data).days
growth_rate = (latest_usage - earliest_usage) / days_of_data
forecast_30d = current_usage + (growth_rate * 30)
forecast_90d = current_usage + (growth_rate * 90)
4. Calculate Days Until Threshold
Project when thresholds will be reached:
warning_threshold = 0.80 * total_capacity
critical_threshold = 0.90 * total_capacity
days_to_warning = (warning_threshold - current_usage) / growth_rate
days_to_critical = (critical_threshold - current_usage) / growth_rate
5. Check Node Balance
Identify imbalanced nodes:
avg_utilization = mean(node.utilization for node in nodes)
imbalanced = [n for n in nodes if abs(n.utilization - avg_utilization) > 0.2]
6. Generate Recommendations
Create actionable recommendations:
recommendations:
- type: scale_up
urgency: high
resource: memory
reason: "Days to critical: 15"
- type: rebalance
urgency: medium
nodes: [node1, node3]
reason: "Utilization imbalance > 20%"
Success Criteria
The skill succeeds when:
- All resource types analyzed
- Forecast calculated with confidence
- Recommendations prioritized by urgency
Failure Handling
If analysis fails:
- Insufficient data: Return only current state
- Missing metrics: Use available data, note gaps
- Calculation error: Return partial recommendations
Examples
Input Context:
{
"cluster": "production",
"forecast_days": 30
}
Expected Output:
{
"current_state": {
"cpu_utilization": 0.65,
"memory_utilization": 0.78,
"storage_utilization": 0.45,
"pod_count": 150
},
"forecast_30d": {
"memory_utilization": 0.92,
"days_to_warning": 12,
"days_to_critical": 25
},
"recommendations": [
{
"type": "scale_up",
"resource": "memory",
"urgency": "high",
"confidence": 0.85,
"action": "Add 32GB memory or 1 new node",
"reason": "Memory will reach 80% in 12 days at current growth"
}
],
"node_balance": {
"balanced": false,
"imbalanced_nodes": ["worker-3"],
"suggestion": "Rebalance workloads from worker-3"
}
}
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?