/polymath-sre:capacity-planfrom polymath-sre
Turn a demand projection into a capacity plan — constrained resource, headroom date, scaling triggers, and cost; not forecasting the demand itself (demand-forecast).
Ships in polymath-sre. 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.
Read when SKILL.md points to them; scripts run unread.
A headroom plan, not a point-in-time reading. It projects demand forward and names the trigger at which you must act — before the SLO burns, not after.
Mode: analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked [TBD] or [VERIFY], never filled in.
polymath-sre:slo-design if undefined).Baseline. State current utilization of the constrained dimension and the
measurement window. Cite the metric (lean on polymath-observability:metrics-design
for the RED/USE signal if it doesn't exist yet).
Demand input. Take the demand projection from polymath-sre:demand-forecast
when one exists. Without one, use a simple stated model (linear / compounding /
step) and label the growth rate as an assumption with its evidence — run
demand-forecast when seasonality or known events matter.
Headroom — run the bundled script, never project by hand. It fits linear vs compound growth to the history (or takes a stated growth rate), finds when demand crosses the safe ceiling (margin below 100% for spikes and failover), overlays known events, and subtracts the provisioning lead time:
python3 "${POLYMATH_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/skills/capacity-plan/scripts/headroom.py" \
--history 410,430,445,460,490,512 --period month --capacity 1000 \
--ceiling 0.7 --lead-time-days 42 --as-of 2026-10-26 --event 2026-11-27:1.3
--as-of is the date of the last observation (it makes the dates
reproducible). Report the date or event, not just a percentage.
Scaling triggers. Define the leading-indicator threshold that fires action before the SLO is at risk (e.g. "scale out at 70% sustained for 10m"). Tie it to the SLO's error budget.
Cost. State the cost of the added capacity and of not adding it (SLO breach, incident). Name the cheaper-to-reverse option when growth is uncertain.
docs/capacity/<slug>.md (slug = the service name, lowercased, non-a-z0-9 runs → -), in this shape:
# Capacity plan: refund-service — DB connections
Baseline: 512 of 1,000 pooled connections at p95 (28-day window, metric `pg_pool_in_use`).
Demand: from docs/capacity/refund-service-forecast.md (or: stated model — assumption, evidence: …).
Headroom forecast (as of 2026-10-26)
History: 6 months: 410,430,445,460,490,512 (oldest first)
Fit: linear +20.14/month R² 0.986
compound +4.49%/month R² 0.991 ← chosen (higher R²)
Ceiling: 700 (70% of capacity 1000)
Now: 512 (73% of ceiling)
Trend: breach in 7.1 months → 2027-05-30
Event: 2026-11-27 ×1.3 → projected 697.0 ok (99.6% of ceiling)
Lead time: 42 days
Must act by: 2027-04-18 (first breach 2027-05-30, trend)
Scaling trigger: pool in-use ≥ 65% for 10m → add a read replica (fires before the 70% ceiling).
Cost: +1 replica ≈ [TBD: monthly cost from billing] vs. not adding: Black Friday lands at 99.6% of ceiling — one failover from SLO breach.
One-line summary: the constrained dimension and the must-act-by date.
polymath-scalability:capacity-estimation — sizes a design before it runs (QPS, storage, nodes); this skill projects a running system forward to a must-act date.What SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/chaos-experimentDesign a chaos experiment — hypothesis, blast radius, abort criteria, observation, rollback; small-radius first./demand-forecastModel capacity demand — growth (linear/compound/seasonal), translate to resource needs + headroom, and flag the lead time before a saturation breach./error-budget-policyAuthor an error-budget policy — what happens when budget is healthy, eroding, or exhausted; named consequences not vibes.Other plugins' skills for the same job
npx claudepluginhub mohammadbafkar/polymath --plugin polymath-sre