← Back to Skills Marketplace
charlie-morrison

Capacity Planner

by charlie-morrison · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
30
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install capacity-planner
Description
Forecast infrastructure capacity needs using historical metrics, growth projections, and cost modeling. Identify bottlenecks before they cause outages and ri...
README (SKILL.md)

Capacity Planner

Forecast when your infrastructure will hit limits. Analyze historical metrics (CPU, memory, disk, network, database connections), project growth curves, identify approaching bottlenecks, and recommend right-sizing — so you scale proactively instead of reactively.

Use when: "when will we run out of space", "capacity forecast", "right-size our instances", "are we over-provisioned", "plan for traffic growth", "infrastructure scaling plan", "when do we need to upgrade", or before budget planning.

Commands

1. forecast — Project Resource Exhaustion

Step 1: Collect Historical Metrics

# Prometheus — CPU utilization over last 30 days
curl -s "$PROMETHEUS_URL/api/v1/query_range" \
  --data-urlencode 'query=avg(rate(node_cpu_seconds_total{mode!="idle"}[5m])) by (instance)' \
  --data-urlencode "start=$(date -d '30 days ago' +%s)" \
  --data-urlencode "end=$(date +%s)" \
  --data-urlencode 'step=1h' | python3 -c "
import json, sys
data = json.load(sys.stdin)
for result in data['data']['result']:
    instance = result['metric']['instance']
    values = [float(v[1]) for v in result['values']]
    avg = sum(values) / len(values)
    peak = max(values)
    trend = (values[-1] - values[0]) / len(values)  # slope per hour
    print(f'{instance}: avg={avg:.1%} peak={peak:.1%} trend={trend:+.4%}/hr')
"

# Disk usage over time
df -h / /data /var 2>/dev/null
# Historical disk growth (if monitoring available)
curl -s "$PROMETHEUS_URL/api/v1/query_range" \
  --data-urlencode 'query=node_filesystem_avail_bytes{mountpoint="/"}' \
  --data-urlencode "start=$(date -d '30 days ago' +%s)" \
  --data-urlencode "end=$(date +%s)" \
  --data-urlencode 'step=1d'

# Memory usage
free -h
# Database connections
curl -s "$PROMETHEUS_URL/api/v1/query" \
  --data-urlencode 'query=pg_stat_activity_count / pg_settings_max_connections'

If Prometheus unavailable, use CloudWatch, Datadog, or system tools:

# Last 30 days of CloudWatch CPU
aws cloudwatch get-metric-statistics --namespace AWS/EC2 \
  --metric-name CPUUtilization --statistics Average Maximum \
  --dimensions Name=InstanceId,Value=i-0abc123 \
  --start-time $(date -d '30 days ago' -u +%Y-%m-%dT%H:%M:%SZ) \
  --end-time $(date -u +%Y-%m-%dT%H:%M:%SZ) --period 86400

Step 2: Fit Growth Model

For each resource, determine growth pattern:

  • Linear: constant rate of increase (disk filling at 2GB/day)
  • Exponential: accelerating growth (user base doubling quarterly)
  • Seasonal: cyclical patterns (weekend dips, end-of-month spikes)
  • Flat: no growth (stable, well-bounded workload)

Calculate days until exhaustion:

days_remaining = (capacity - current_usage) / daily_growth_rate

For exponential: use doubling time to project.

Step 3: Generate Forecast Report

# Capacity Forecast Report — [date]

## Critical (exhaustion \x3C 30 days)
| Resource | Current | Capacity | Growth/day | Exhaustion | Action |
|----------|---------|----------|------------|------------|--------|
| Disk (/) | 45 GB | 50 GB | 180 MB/day | ~28 days | Expand volume or add cleanup cron |
| DB connections | 85/100 | 100 | +2/week | ~5 weeks | Increase max_connections or add pgbouncer |

## Warning (exhaustion 30-90 days)
| Resource | Current | Capacity | Growth/day | Exhaustion |
|----------|---------|----------|------------|------------|
| Memory | 12/16 GB | 16 GB | 50 MB/day | ~82 days |

## Healthy (>90 days or no growth)
- CPU: avg 35%, peak 72%, flat trend — no action needed
- Network: avg 200 Mbps of 1 Gbps — no concern

## Over-Provisioned (wasting money)
| Resource | Used | Provisioned | Utilization | Savings |
|----------|------|-------------|-------------|---------|
| worker-pool-3 | 2 vCPU avg | 8 vCPU | 25% | Downsize to 4 vCPU, save ~$150/mo |
| Redis cluster | 512 MB | 8 GB | 6% | Downsize to 2 GB, save ~$80/mo |

2. rightsize — Recommend Instance Sizes

Given current utilization and growth projections:

  • Map workload to optimal instance family (compute, memory, storage-optimized)
  • Factor in reserved instance / savings plan pricing
  • Account for headroom (recommend 60-70% target utilization, not 95%)
  • Compare across cloud providers if multi-cloud

3. cost-model — Project Infrastructure Costs

Given the capacity forecast:

  • Calculate current monthly spend
  • Project spend at 3, 6, 12 months based on growth
  • Identify the biggest cost drivers
  • Suggest cost optimization levers (spot instances, reserved pricing, auto-scaling, compression, archival)

4. bottleneck — Identify Scaling Bottlenecks

Analyze the system for the component that will fail first under load:

  • Database (connections, IOPS, lock contention)
  • Application (CPU-bound, memory-bound, thread pool exhaustion)
  • Network (bandwidth, DNS resolution, TLS handshake overhead)
  • External dependencies (rate limits, API quotas, third-party SLAs)

Rank bottlenecks by "time to impact" and recommend mitigation order.

Usage Guidance
This skill's instructions need access to monitoring endpoints and possibly cloud credentials, but the package metadata doesn't declare those requirements and the source/homepage is missing. Before installing: 1) Ask the maintainer to document required env vars (PROMETHEUS_URL, any Datadog keys, and explicit AWS credential needs) and provide a source repo or homepage for review. 2) Only grant minimal read-only IAM permissions (CloudWatch read-only metrics, restricted to necessary namespaces/regions) and avoid long-lived root/owner keys. 3) Ensure PROMETHEUS_URL points to an internal, private endpoint and confirm whether TLS/auth is required. 4) Run the skill in a restricted/staging environment first so it cannot access sensitive production files or broad account scopes. 5) Consider disabling autonomous invocation or restricting when the skill can run until you verify it. If you cannot verify the source or cannot limit credentials, treat this as higher risk and avoid installing.
Capability Analysis
Type: OpenClaw Skill Name: capacity-planner Version: 1.0.0 The capacity-planner skill is designed to forecast infrastructure resource exhaustion using metrics from Prometheus and AWS CloudWatch. It utilizes standard system commands (curl, df, free, aws-cli) and inline Python scripts to process JSON data for trend analysis. The logic is transparent, lacks obfuscation, and aligns perfectly with the stated purpose of capacity planning without any indicators of malicious intent or data exfiltration.
Capability Assessment
Purpose & Capability
The name and description match the SKILL.md content: collecting metrics (Prometheus/CloudWatch/Datadog), fitting growth models, producing forecasts and cost models. Those actions legitimately require access to monitoring endpoints and possibly cloud billing/metric APIs. However, the skill's metadata declares no required env vars or primary credential even though the instructions explicitly reference $PROMETHEUS_URL and show using the AWS CLI and third‑party monitoring services. The missing declaration of these inputs and the lack of provenance (no homepage/source) are unexplained.
Instruction Scope
SKILL.md tells the agent to run local system commands (df, free) and to call external monitoring APIs (curl $PROMETHEUS_URL, aws cloudwatch, Datadog/CloudWatch fallback). The instructions reference environment variables and credentials that are not declared (PROMETHEUS_URL, AWS credentials, Datadog keys). These steps can access local system state (disk, memory) and cloud account metrics; combined with autonomous invocation this increases risk of unintended data access or disclosure. The doc does not limit where Prometheus_URL should point (internal vs public) or constrain required IAM scopes.
Install Mechanism
Instruction-only skill with no install spec and no code files. That reduces supply-chain risk because nothing is downloaded or written by the install process.
Credentials
Metadata lists no required environment variables or credentials, but instructions plainly require at least PROMETHEUS_URL and access to cloud monitoring APIs (AWS CLI calls which will use AWS credentials from env or ~/.aws). The skill also mentions Datadog and CloudWatch as alternatives. The absence of declared env requirements is disproportionate and opaque; providing broad credentials without clear, declared needs increases risk.
Persistence & Privilege
The skill is not marked always:true and is user-invocable only. It does not request permanent presence or changes to other skills. Note: the skill allows autonomous model invocation (platform default); when combined with the above credential-access concerns this increases the blast radius, but autonomous invocation on its own is not flagged.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install capacity-planner
  3. After installation, invoke the skill by name or use /capacity-planner
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of the Capacity Planner skill. - Forecast infrastructure capacity needs using historical metrics, growth projections, and cost modeling. - Identify resource bottlenecks and forecast when limits will be reached. - Recommend right-sizing of compute resources to avoid over-provisioning. - Provide commands for capacity forecasting, instance recommendations, cost projection, and bottleneck analysis.
Metadata
Slug capacity-planner
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Capacity Planner?

Forecast infrastructure capacity needs using historical metrics, growth projections, and cost modeling. Identify bottlenecks before they cause outages and ri... It is an AI Agent Skill for Claude Code / OpenClaw, with 30 downloads so far.

How do I install Capacity Planner?

Run "/install capacity-planner" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Capacity Planner free?

Yes, Capacity Planner is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Capacity Planner support?

Capacity Planner is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Capacity Planner?

It is built and maintained by charlie-morrison (@charlie-morrison); the current version is v1.0.0.

💬 Comments