agentleFS
kryptophonikkryptophonik/SRE-Skills/skills/sre-capacity-planning/SKILL.md

sre-capacity-planning

Skill4 starsChanged 23 days agoMITView on GitHub

Use before launches or peak events, or when saturation trends up: forecast demand from metrics, compute headroom, plan load tests, set scaling triggers. Read-only queries.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.

    line 12
  2. Distinctive:

    Headroom target: default keep peak utilization ≤ 60–70% of the limit, and survive loss of one zone (N+1).

    line 23

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Capacity Planning

Safety gates (REQUIRED)

  1. Read-only diagnosis first.
  2. Propose each change with risk (low/med/high) and reversibility.
  3. Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.
  4. Act only as approved, verify, and stop and escalate if anything gets worse.

Full rules: sre-safety-gates. Read-only MCP setup: sre-safety-gates/references/mcp.md.

Workflow

  1. Pick the unit: requests/s, jobs/min, active users, storage GB.
  2. Gather 30–90 days of demand and saturation (CPU, memory, connections, queue depth, disk) per service. Use sre-observability-query-cookbook queries.
  3. Find the limit: the resource that saturates first per unit of demand (from load tests or past peaks).
  4. Forecast: growth trend + known events (launches, seasonality). Show low/expected/high.
  5. Headroom target: default keep peak utilization ≤ 60–70% of the limit, and survive loss of one zone (N+1).
  6. Plan actions: autoscaling bounds, reserved capacity, quota increases (cloud quotas take time), architecture fixes.
  7. Validate with a load test (k6, Locust) in a production-like environment.

Formulas

  • Headroom % = (limit − current peak) / limit × 100
  • Months until full = log(limit / current) / log(1 + monthly growth rate)
  • Required instances = peak demand / safe per-instance throughput × (1 + zone-loss buffer)

Read-only checks

kubectl --context <ctx> top nodes
kubectl --context <ctx> get hpa -A
aws service-quotas list-service-quotas --profile <profile> --region <region> --service-code ec2 --max-items 100
az vm list-usage --location <region> --subscription <subscription-id> -o table
gcloud compute regions describe <REGION> --project=<PROJECT_ID> --format="table(quotas.metric,quotas.limit,quotas.usage)"   # field paths: verify in your environment

Output

  • Capacity report: demand forecast, limiting resource, headroom now and at forecast peak, recommended actions with dates and owners, load-test plan

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.