[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73AZAC6MJXS8XASBZCREHXD":3,"skill-same:01M73AZAC6MJXS8XASBZCREHXD":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M73AZAC6MJXS8XASBZCREHXD","plan-capacity",null,"Perform capacity planning using historical metrics and growth models. Use predict_linear for forecasting, identify resource constraints, calculate headroom, and recommend scaling actions before saturation. Use before seasonal traffic spikes or product launches, during quarterly capacity reviews, when resource utilization trends upward, or before budget planning cycles.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fplan-capacity\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: plan-capacity\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\ndescription: >\n  Perform capacity planning using historical metrics and growth models. Use\n  predict_linear for forecasting, identify resource constraints, calculate\n  headroom, and recommend scaling actions before saturation. Use before\n  seasonal traffic spikes or product launches, during quarterly capacity\n  reviews, when resource utilization trends upward, or before budget planning\n  cycles.\nlicense: MIT\nallowed-tools: Read Write Edit Bash Grep Glob\nmetadata:\n  author: Philipp Thoss\n  version: \"1.0\"\n  domain: observability\n  complexity: intermediate\n  language: multi\n  tags: capacity-planning, forecasting, predict-linear, growth, headroom\n---\n\n# Plan Capacity\n\nForecast resource needs and prevent saturation through data-driven capacity planning.\n\n## When to Use\n\n- Before seasonal traffic spikes (holidays, sales events)\n- When planning new feature launches\n- During quarterly capacity reviews\n- When resource utilization trends upward\n- Before budget planning cycles\n\n## Inputs\n\n- **Required**: Historical metrics (CPU, memory, disk, network, requests\u002Fsec)\n- **Required**: Time range for trend analysis (minimum 4 weeks)\n- **Optional**: Business growth projections (expected user growth, feature launches)\n- **Optional**: Budget constraints\n\n## Procedure\n\n### Step 1: Collect Historical Metrics\n\nQuery Prometheus for key resource metrics:\n\n```promql\n# CPU usage trend over 8 weeks\navg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m])) by (instance)\n\n# Memory usage trend\navg(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) by (instance)\n\n# Disk usage growth\navg(node_filesystem_size_bytes - node_filesystem_free_bytes) by (instance, device)\n\n# Request rate growth\nsum(rate(http_requests_total[5m])) by (service)\n\n# Database connection pool usage\navg(db_connection_pool_used \u002F db_connection_pool_max) by (instance)\n```\n\nExport to analyze:\n\n```bash\n# Export 8 weeks of CPU data\ncurl -G 'http:\u002F\u002Fprometheus:9090\u002Fapi\u002Fv1\u002Fquery_range' \\\n  --data-urlencode 'query=avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m])) by (instance)' \\\n  --data-urlencode 'start=2024-12-15T00:00:00Z' \\\n  --data-urlencode 'end=2025-02-09T00:00:00Z' \\\n  --data-urlencode 'step=1h' | jq '.data.result' > cpu_8weeks.json\n```\n\n**Got:** Clean time series data for each resource with no large gaps.\n\n**If fail:** Missing data reduces forecast accuracy. Check metric retention and scrape intervals.\n\n### Step 2: Calculate Growth Rates with predict_linear\n\nUse Prometheus's `predict_linear()` to forecast saturation:\n\n```promql\n# Predict when CPU will hit 80% (4 weeks ahead)\npredict_linear(\n  avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m]))[8w:],\n  4*7*24*3600  # 4 weeks in seconds\n) > 0.80\n\n# Predict disk full date (8 weeks ahead)\npredict_linear(\n  avg(node_filesystem_size_bytes - node_filesystem_free_bytes)[8w:],\n  8*7*24*3600\n) > 0.95 * avg(node_filesystem_size_bytes)\n\n# Predict memory pressure (2 weeks ahead)\npredict_linear(\n  avg(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes)[8w:],\n  2*7*24*3600\n) \u002F avg(node_memory_MemTotal_bytes) > 0.90\n\n# Predict request rate capacity breach (4 weeks ahead)\npredict_linear(\n  sum(rate(http_requests_total[5m]))[8w:],\n  4*7*24*3600\n) > 10000  # known capacity limit\n```\n\nCreate a forecasting dashboard:\n\n```json\n{\n  \"dashboard\": {\n    \"title\": \"Capacity Forecast\",\n    \"panels\": [\n      {\n        \"title\": \"CPU Saturation Forecast (4 weeks)\",\n        \"targets\": [\n          {\n            \"expr\": \"predict_linear(avg(rate(node_cpu_seconds_total{mode!=\\\"idle\\\"}[5m]))[8w:], 4*7*24*3600)\",\n            \"legendFormat\": \"Predicted CPU\"\n          },\n          {\n            \"expr\": \"0.80\",\n            \"legendFormat\": \"Target Threshold (80%)\"\n          }\n        ]\n      },\n      {\n        \"title\": \"Disk Full Date\",\n        \"targets\": [\n          {\n            \"expr\": \"(avg(node_filesystem_size_bytes) - predict_linear(avg(node_filesystem_free_bytes)[8w:], 8*7*24*3600)) \u002F avg(node_filesystem_size_bytes)\",\n            \"legendFormat\": \"Predicted Usage %\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n**Got:** Clear visualization showing when resources will breach thresholds.\n\n**If fail:** If predictions look wrong (negative values, wild swings), check for:\n- Insufficient history (need minimum 4 weeks)\n- Step spikes (deployments, migrations) distorting trend\n- Seasonal patterns not captured by linear model\n\n### Step 3: Calculate Current Headroom\n\nDetermine safety margin before saturation:\n\n```promql\n# CPU headroom (percentage remaining before 80% threshold)\n(0.80 - avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m]))) \u002F 0.80 * 100\n\n# Memory headroom (bytes remaining before 90% usage)\navg(node_memory_MemAvailable_bytes) - (avg(node_memory_MemTotal_bytes) * 0.10)\n\n# Request rate headroom (requests\u002Fsec before saturation)\n10000 - sum(rate(http_requests_total[5m]))\n\n# Time until saturation (weeks until CPU hits 80%)\n(0.80 - avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m]))) \u002F\n  deriv(avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m]))[8w:]) \u002F\n  (7*24*3600)\n```\n\nCreate a headroom summary report:\n\n```bash\ncat > capacity_headroom.md \u003C\u003C'EOF'\n# Capacity Headroom Report (2025-02-09)\n\n## Current Utilization\n- **CPU**: 45% average (target: \u003C80%)\n- **Memory**: 62% (target: \u003C90%)\n- **Disk**: 71% (target: \u003C95%)\n- **Request Rate**: 4,200 req\u002Fs (capacity: 10,000)\n\n## Headroom Analysis\n- **CPU**: 35% headroom → ~12 weeks until saturation\n- **Memory**: 28% headroom → ~16 weeks until saturation\n- **Disk**: 24% headroom → ~8 weeks until full\n- **Request Rate**: 5,800 req\u002Fs headroom → ~20 weeks until capacity\n\n## Priority Actions\n1. **Disk**: Implement log rotation or expand volume within 4 weeks\n2. **CPU**: Plan horizontal scaling in next quarter\n3. **Memory**: Monitor but no immediate action needed\nEOF\n```\n\n**Got:** Quantified headroom for each resource with time-to-saturation estimates.\n\n**If fail:** If headroom is already negative, you're in reactive mode. Immediate scaling needed.\n\n### Step 4: Model Growth Scenarios\n\nFactor in business projections:\n\n```python\n# Example Python script for scenario modeling\nimport pandas as pd\nimport numpy as np\n\n# Load historical data\ndf = pd.read_json('cpu_8weeks.json')\n\n# Calculate weekly growth rate\ngrowth_rate_weekly = df['value'].pct_change(periods=7).mean()\n\n# Scenario 1: Current trend\nweeks_ahead = 12\ncurrent_trend = df['value'].iloc[-1] * (1 + growth_rate_weekly) ** weeks_ahead\n\n# Scenario 2: 2x user growth (marketing campaign)\naccelerated_trend = df['value'].iloc[-1] * (1 + growth_rate_weekly * 2) ** weeks_ahead\n\n# Scenario 3: New feature launch (+30% baseline)\nfeature_launch = (df['value'].iloc[-1] * 1.30) * (1 + growth_rate_weekly) ** weeks_ahead\n\nprint(f\"Current Trend (12 weeks): {current_trend:.1%} CPU\")\nprint(f\"2x Growth Scenario: {accelerated_trend:.1%} CPU\")\nprint(f\"Feature Launch Scenario: {feature_launch:.1%} CPU\")\nprint(f\"Threshold: 80%\")\n```\n\n**Got:** Multiple scenarios showing impact of business changes on capacity.\n\n**If fail:** If scenarios exceed capacity, prioritize scaling before the event.\n\n### Step 5: Generate Scaling Recommendations\n\nCreate actionable recommendations:\n\n```markdown\n## Capacity Scaling Plan\n\n### Immediate Actions (Next 4 Weeks)\n1. **Disk Expansion** [Priority: HIGH]\n   - Current: 500GB, 71% used\n   - Projected full date: 2025-04-01 (8 weeks)\n   - Action: Expand to 1TB by 2025-03-15\n   - Cost: $50\u002Fmonth additional\n   - Justification: 5 weeks lead time needed\n\n2. **Log Rotation Policy** [Priority: MEDIUM]\n   - Current: Logs retained 90 days\n   - Action: Reduce to 30 days, archive to S3\n   - Savings: ~150GB disk space\n   - Cost: $5\u002Fmonth S3 storage\n\n### Near-Term Actions (Next Quarter)\n3. **Horizontal Scaling - API Tier** [Priority: MEDIUM]\n   - Current: 4 instances, 45% CPU\n   - Projected: 65% CPU by 2025-05-01\n   - Action: Add 2 instances (to 6 total)\n   - Cost: $400\u002Fmonth\n   - Trigger: When CPU avg exceeds 60% for 7 days\n\n4. **Database Connection Pool** [Priority: LOW]\n   - Current: 50 max connections, 40% used\n   - Projected: 55% by Q3\n   - Action: Increase to 75 in Q2\n   - Cost: None (configuration change)\n\n### Long-Term Planning (Next 6 Months)\n5. **Migration to Auto-Scaling** [Priority: MEDIUM]\n   - Current: Manual scaling\n   - Action: Implement Kubernetes HPA (Horizontal Pod Autoscaler)\n   - Timeline: Q3 2025\n   - Benefit: Automatic response to load spikes\n```\n\n**Got:** Prioritized list with costs, timelines, and trigger conditions.\n\n**If fail:** If recommendations are rejected due to cost, revisit thresholds or accept risk.\n\n### Step 6: Set Up Capacity Alerts\n\nCreate alerts for low headroom:\n\n```yaml\n# capacity_alerts.yml\ngroups:\n  - name: capacity\n    interval: 1h\n    rules:\n      - alert: CPUCapacityLow\n        expr: |\n          (0.80 - avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m]))) \u002F 0.80 \u003C 0.20\n        for: 24h\n        labels:\n          severity: warning\n        annotations:\n          summary: \"CPU headroom below 20%\"\n          description: \"Current CPU headroom: {{ $value | humanizePercentage }}. Scaling needed within 4 weeks.\"\n\n      - alert: DiskFillForecast\n        expr: |\n          predict_linear(avg(node_filesystem_free_bytes)[8w:], 4*7*24*3600) \u003C 0.10 * avg(node_filesystem_size_bytes)\n        for: 1h\n        labels:\n          severity: warning\n        annotations:\n          summary: \"Disk projected to fill within 4 weeks\"\n          description: \"Expand disk volume soon.\"\n\n      - alert: MemoryCapacityLow\n        expr: |\n          avg(node_memory_MemAvailable_bytes) \u003C 0.15 * avg(node_memory_MemTotal_bytes)\n        for: 6h\n        labels:\n          severity: warning\n        annotations:\n          summary: \"Memory headroom below 15%\"\n```\n\n**Got:** Alerts fire before saturation, giving time to scale proactively.\n\n**If fail:** Tune thresholds if alerts fire too often (alert fatigue) or too late (reactive scrambling).\n\n## Validation\n\n- [ ] Historical metrics cover at least 8 weeks\n- [ ] `predict_linear()` queries return sensible forecasts (no negative values)\n- [ ] Headroom calculated for all critical resources\n- [ ] Growth scenarios include business projections\n- [ ] Scaling recommendations have costs and timelines\n- [ ] Capacity alerts configured and tested\n- [ ] Report reviewed with engineering leadership and finance\n\n## Pitfalls\n\n- **Insufficient history**: Linear predictions need 4+ weeks of data. Less than that, forecasts are unreliable.\n- **Ignoring step changes**: Deployments, migrations, or feature launches create spikes that distort trends. Filter or annotate.\n- **Linear assumption**: Not all growth is linear. Exponential growth (viral products) needs different models.\n- **Forgetting lead time**: Cloud provisioning is fast, but procurement, budgets, and migrations take weeks. Plan early.\n- **No budget alignment**: Capacity planning without budget buy-in leads to last-minute scrambles. Involve finance early.\n\n## Related Skills\n\n- `setup-prometheus-monitoring` - collect the metrics used for capacity planning\n- `build-grafana-dashboards` - visualize forecasts and headroom\n- `optimize-cloud-costs` - balance capacity planning with cost optimization\n","# Plan Capacity\n\nForecast resource needs and prevent saturation through data-driven capacity planning.\n\n## When to Use\n\n- Before seasonal traffic spikes (holidays, sales events)\n- When planning new feature launches\n- During quarterly capacity reviews\n- When resource utilization trends upward\n- Before budget planning cycles\n\n## Inputs\n\n- **Required**: Historical metrics (CPU, memory, disk, network, requests\u002Fsec)\n- **Required**: Time range for trend analysis (minimum 4 weeks)\n- **Optional**: Business growth projections (expected user growth, feature launches)\n- **Optional**: Budget constraints\n\n## Procedure\n\n### Step 1: Collect Historical Metrics\n\nQuery Prometheus for key resource metrics:\n\n```promql\n# CPU usage trend over 8 weeks\navg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m])) by (instance)\n\n# Memory usage trend\navg(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) by (instance)\n\n# Disk usage growth\navg(node_filesystem_size_bytes - node_filesystem_free_bytes) by (instance, device)\n\n# Request rate growth\nsum(rate(http_requests_total[5m])) by (service)\n\n# Database connection pool usage\navg(db_connection_pool_used \u002F db_connection_pool_max) by (instance)\n```\n\nExport to analyze:\n\n```bash\n# Export 8 weeks of CPU data\ncurl -G 'http:\u002F\u002Fprometheus:9090\u002Fapi\u002Fv1\u002Fquery_range' \\\n  --data-urlencode 'query=avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m])) by (instance)' \\\n  --data-urlencode 'start=2024-12-15T00:00:00Z' \\\n  --data-urlencode 'end=2025-02-09T00:00:00Z' \\\n  --data-urlencode 'step=1h' | jq '.data.result' > cpu_8weeks.json\n```\n\n**Got:** Clean time series data for each resource with no large gaps.\n\n**If fail:** Missing data reduces forecast accuracy. Check metric retention and scrape intervals.\n\n### Step 2: Calculate Growth Rates with predict_linear\n\nUse Prometheus's `predict_linear()` to forecast saturation:\n\n```promql\n# Predict when CPU will hit 80% (4 weeks ahead)\npredict_linear(\n  avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m]))[8w:],\n  4*7*24*3600  # 4 weeks in seconds\n) > 0.80\n\n# Predict disk full date (8 weeks ahead)\npredict_linear(\n  avg(node_filesystem_size_bytes - node_filesystem_free_bytes)[8w:],\n  8*7*24*3600\n) > 0.95 * avg(node_filesystem_size_bytes)\n\n# Predict memory pressure (2 weeks ahead)\npredict_linear(\n  avg(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes)[8w:],\n  2*7*24*3600\n) \u002F avg(node_memory_MemTotal_bytes) > 0.90\n\n# Predict request rate capacity breach (4 weeks ahead)\npredict_linear(\n  sum(rate(http_requests_total[5m]))[8w:],\n  4*7*24*3600\n) > 10000  # known capacity limit\n```\n\nCreate a forecasting dashboard:\n\n```json\n{\n  \"dashboard\": {\n    \"title\": \"Capacity Forecast\",\n    \"panels\": [\n      {\n        \"title\": \"CPU Saturation Forecast (4 weeks)\",\n        \"targets\": [\n          {\n            \"expr\": \"predict_linear(avg(rate(node_cpu_seconds_total{mode!=\\\"idle\\\"}[5m]))[8w:], 4*7*24*3600)\",\n            \"legendFormat\": \"Predicted CPU\"\n          },\n          {\n            \"expr\": \"0.80\",\n            \"legendFormat\": \"Target Threshold (80%)\"\n          }\n        ]\n      },\n      {\n        \"title\": \"Disk Full Date\",\n        \"targets\": [\n          {\n            \"expr\": \"(avg(node_filesystem_size_bytes) - predict_linear(avg(node_filesystem_free_bytes)[8w:], 8*7*24*3600)) \u002F avg(node_filesystem_size_bytes)\",\n            \"legendFormat\": \"Predicted Usage %\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n**Got:** Clear visualization showing when resources will breach thresholds.\n\n**If fail:** If predictions look wrong (negative values, wild swings), check for:\n- Insufficient history (need minimum 4 weeks)\n- Step spikes (deployments, migrations) distorting trend\n- Seasonal patterns not captured by linear model\n\n### Step 3: Calculate Current Headroom\n\nDetermine safety margin before saturation:\n\n```promql\n# CPU headroom (percentage remaining before 80% threshold)\n(0.80 - avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m]))) \u002F 0.80 * 100\n\n# Memory headroom (bytes remaining before 90% usage)\navg(node_memory_MemAvailable_bytes) - (avg(node_memory_MemTotal_bytes) * 0.10)\n\n# Request rate headroom (requests\u002Fsec before saturation)\n10000 - sum(rate(http_requests_total[5m]))\n\n# Time until saturation (weeks until CPU hits 80%)\n(0.80 - avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m]))) \u002F\n  deriv(avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m]))[8w:]) \u002F\n  (7*24*3600)\n```\n\nCreate a headroom summary report:\n\n```bash\ncat > capacity_headroom.md \u003C\u003C'EOF'\n# Capacity Headroom Report (2025-02-09)\n\n## Current Utilization\n- **CPU**: 45% average (target: \u003C80%)\n- **Memory**: 62% (target: \u003C90%)\n- **Disk**: 71% (target: \u003C95%)\n- **Request Rate**: 4,200 req\u002Fs (capacity: 10,000)\n\n## Headroom Analysis\n- **CPU**: 35% headroom → ~12 weeks until saturation\n- **Memory**: 28% headroom → ~16 weeks until saturation\n- **Disk**: 24% headroom → ~8 weeks until full\n- **Request Rate**: 5,800 req\u002Fs headroom → ~20 weeks until capacity\n\n## Priority Actions\n1. **Disk**: Implement log rotation or expand volume within 4 weeks\n2. **CPU**: Plan horizontal scaling in next quarter\n3. **Memory**: Monitor but no immediate action needed\nEOF\n```\n\n**Got:** Quantified headroom for each resource with time-to-saturation estimates.\n\n**If fail:** If headroom is already negative, you're in reactive mode. Immediate scaling needed.\n\n### Step 4: Model Growth Scenarios\n\nFactor in business projections:\n\n```python\n# Example Python script for scenario modeling\nimport pandas as pd\nimport numpy as np\n\n# Load historical data\ndf = pd.read_json('cpu_8weeks.json')\n\n# Calculate weekly growth rate\ngrowth_rate_weekly = df['value'].pct_change(periods=7).mean()\n\n# Scenario 1: Current trend\nweeks_ahead = 12\ncurrent_trend = df['value'].iloc[-1] * (1 + growth_rate_weekly) ** weeks_ahead\n\n# Scenario 2: 2x user growth (marketing campaign)\naccelerated_trend = df['value'].iloc[-1] * (1 + growth_rate_weekly * 2) ** weeks_ahead\n\n# Scenario 3: New feature launch (+30% baseline)\nfeature_launch = (df['value'].iloc[-1] * 1.30) * (1 + growth_rate_weekly) ** weeks_ahead\n\nprint(f\"Current Trend (12 weeks): {current_trend:.1%} CPU\")\nprint(f\"2x Growth Scenario: {accelerated_trend:.1%} CPU\")\nprint(f\"Feature Launch Scenario: {feature_launch:.1%} CPU\")\nprint(f\"Threshold: 80%\")\n```\n\n**Got:** Multiple scenarios showing impact of business changes on capacity.\n\n**If fail:** If scenarios exceed capacity, prioritize scaling before the event.\n\n### Step 5: Generate Scaling Recommendations\n\nCreate actionable recommendations:\n\n```markdown\n## Capacity Scaling Plan\n\n### Immediate Actions (Next 4 Weeks)\n1. **Disk Expansion** [Priority: HIGH]\n   - Current: 500GB, 71% used\n   - Projected full date: 2025-04-01 (8 weeks)\n   - Action: Expand to 1TB by 2025-03-15\n   - Cost: $50\u002Fmonth additional\n   - Justification: 5 weeks lead time needed\n\n2. **Log Rotation Policy** [Priority: MEDIUM]\n   - Current: Logs retained 90 days\n   - Action: Reduce to 30 days, archive to S3\n   - Savings: ~150GB disk space\n   - Cost: $5\u002Fmonth S3 storage\n\n### Near-Term Actions (Next Quarter)\n3. **Horizontal Scaling - API Tier** [Priority: MEDIUM]\n   - Current: 4 instances, 45% CPU\n   - Projected: 65% CPU by 2025-05-01\n   - Action: Add 2 instances (to 6 total)\n   - Cost: $400\u002Fmonth\n   - Trigger: When CPU avg exceeds 60% for 7 days\n\n4. **Database Connection Pool** [Priority: LOW]\n   - Current: 50 max connections, 40% used\n   - Projected: 55% by Q3\n   - Action: Increase to 75 in Q2\n   - Cost: None (configuration change)\n\n### Long-Term Planning (Next 6 Months)\n5. **Migration to Auto-Scaling** [Priority: MEDIUM]\n   - Current: Manual scaling\n   - Action: Implement Kubernetes HPA (Horizontal Pod Autoscaler)\n   - Timeline: Q3 2025\n   - Benefit: Automatic response to load spikes\n```\n\n**Got:** Prioritized list with costs, timelines, and trigger conditions.\n\n**If fail:** If recommendations are rejected due to cost, revisit thresholds or accept risk.\n\n### Step 6: Set Up Capacity Alerts\n\nCreate alerts for low headroom:\n\n```yaml\n# capacity_alerts.yml\ngroups:\n  - name: capacity\n    interval: 1h\n    rules:\n      - alert: CPUCapacityLow\n        expr: |\n          (0.80 - avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m]))) \u002F 0.80 \u003C 0.20\n        for: 24h\n        labels:\n          severity: warning\n        annotations:\n          summary: \"CPU headroom below 20%\"\n          description: \"Current CPU headroom: {{ $value | humanizePercentage }}. Scaling needed within 4 weeks.\"\n\n      - alert: DiskFillForecast\n        expr: |\n          predict_linear(avg(node_filesystem_free_bytes)[8w:], 4*7*24*3600) \u003C 0.10 * avg(node_filesystem_size_bytes)\n        for: 1h\n        labels:\n          severity: warning\n        annotations:\n          summary: \"Disk projected to fill within 4 weeks\"\n          description: \"Expand disk volume soon.\"\n\n      - alert: MemoryCapacityLow\n        expr: |\n          avg(node_memory_MemAvailable_bytes) \u003C 0.15 * avg(node_memory_MemTotal_bytes)\n        for: 6h\n        labels:\n          severity: warning\n        annotations:\n          summary: \"Memory headroom below 15%\"\n```\n\n**Got:** Alerts fire before saturation, giving time to scale proactively.\n\n**If fail:** Tune thresholds if alerts fire too often (alert fatigue) or too late (reactive scrambling).\n\n## Validation\n\n- [ ] Historical metrics cover at least 8 weeks\n- [ ] `predict_linear()` queries return sensible forecasts (no negative values)\n- [ ] Headroom calculated for all critical resources\n- [ ] Growth scenarios include business projections\n- [ ] Scaling recommendations have costs and timelines\n- [ ] Capacity alerts configured and tested\n- [ ] Report reviewed with engineering leadership and finance\n\n## Pitfalls\n\n- **Insufficient history**: Linear predictions need 4+ weeks of data. Less than that, forecasts are unreliable.\n- **Ignoring step changes**: Deployments, migrations, or feature launches create spikes that distort trends. Filter or annotate.\n- **Linear assumption**: Not all growth is linear. Exponential growth (viral products) needs different models.\n- **Forgetting lead time**: Cloud provisioning is fast, but procurement, budgets, and migrations take weeks. Plan early.\n- **No budget alignment**: Capacity planning without budget buy-in leads to last-minute scrambles. Involve finance early.\n\n## Related Skills\n\n- `setup-prometheus-monitoring` - collect the metrics used for capacity planning\n- `build-grafana-dashboards` - visualize forecasts and headroom\n- `optimize-cloud-costs` - balance capacity planning with cost optimization\n",{"name":5,"locale":23,"license":14,"metadata":24,"translator":31,"description":32,"allowed-tools":33,"source_commit":34,"source_locale":35,"translation_date":36},"caveman-lite",{"tags":25,"author":26,"domain":27,"version":28,"language":29,"complexity":30},"capacity-planning, forecasting, predict-linear, growth, headroom","Philipp Thoss","observability","1.0","multi","intermediate","Julius Brussee homage — caveman","Perform capacity planning using historical metrics and growth models. Use predict_linear for forecasting, identify resource constraints, calculate headroom, and recommend scaling actions before saturation. Use before seasonal traffic spikes or product launches, during quarterly capacity reviews, when resource utilization trends upward, or before budget planning cycles.\n","Read Write Edit Bash Grep Glob","82c77053","en","2026-04-19","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Fplan-capacity",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add roohe\u002Fagentic-super-skills --skill plan-capacity",{"tool":51,"command":52},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill plan-capacity",{"tool":54,"command":55},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill plan-capacity","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fplan-capacity\u002FSKILL.md",true,[],[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]