/proschi:proschi-capacity-planfrom Proschi
Sizes a Proschi design for load by adding traffic, requirements (p99 latency, availability, durability, cost), replicas, shards, and capacity overrides. Runs proschi analyze and test, explains bottlenecks, and fixes until requirements pass.
Ships in Proschi. 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.
Goal: the .proschi file carries the load it must handle and the targets it
must meet, its replicas/shards/capacity are sized so npx proschi@latest test
passes with headroom, and the user gets a short explanation of what limits
the design, what it costs, and a share link.
Syntax: references/proschi-cheatsheet.md.
The traffic, requirements, capacity and test blocks, the simulation
defaults and how latency and availability are computed:
references/proschi-simulation.md.
Needs a design with use cases. If it has none, write them first (the
code-to-usecases skill): traffic is per use case and scenario.
Ask for, or find in docs, tickets, dashboards and SLO files:
When a number is missing, assume a round one, say so in a comment
(# ASSUMPTION: 3x peak over 40 rps average) and list it in your answer.
Reference figures (throughput per node, latency, cloud costs):
https://proschi.app/docs/numbers/. Rules of thumb: a service node does
1k–10k rps; Redis ~100k ops/s; a Postgres primary 10k–50k simple reads and
1k–10k writes/s; one Kafka partition ~10 MB/s; keep nodes 50–70% busy.
traffic {
"Get product" 3k rps mix "Cache hit" 90%, "Cache miss" 9%, "Not found" 1%
"Place order" 50 rps mix "Paid" 95%, "Invalid" 3%, "Payment failed" 2%
}
requirements {
p99 "Get product" < 100ms
p99 "Place order" < 1s
availability "Get product" >= 99.9%
durable "Place order"
survive any node failure
cost <= 3000 usd/month
}
mix are the alt names (A › B when nested); shares add to 100%.npx proschi@latest test design.proschi
npx proschi@latest analyze design.proschi
analyze prints per node: reads and writes as load/capacity and
utilisation, latency, availability, cost; then p50–p99.9 per use case and
scenario, single points of failure and warnings. test prints each failure
with a hint naming the lever. Apply the smallest change that fixes it, rerun,
repeat:
| Symptom | Lever |
|---|---|
X is saturated / utilisation > 70% on a service | more replicas on its declaration: api "API" [Go] x4 |
| Relational DB writes saturated | capacity { db shards 4 } (replicas only add reads) |
| DB reads hot, high p99 on reads | a cache in front (add a cache hit/miss alt and mix), or read replicas x3 |
| p99 dominated by a slow external or long chain | move work after the response with ->> (queue + worker), par { } for independent calls, a timeout capacity { pay timeout 300ms } |
| Availability below target | x2+ on the weakest node named in the hint, or a fallback scenario that calls it with -x and still succeeds |
survive any node failure fails | x2 on single-instance nodes; enough replicas that losing one stays under 100% |
| Cost over budget | fewer replicas where utilisation is low, size S, cheaper techs; check egress (~size steps to clients from storage → a CDN) |
| A hint says the default numbers are wrong for this tech | capacity { node 5k rps latency 3ms cost 250 usd/month } from real benchmarks or prices, with a comment citing where they came from |
Prefer topology changes (replicas, cache, async) over capacity overrides;
override only with a source for the number. Keep fmt and check clean.
A new node (a cache, a queue and its worker) goes next to its tier in the
file, with edges from the caller; then render and review the diagram
(mandatory, the cheat-sheet's Render and review checklist):
npx proschi@latest render --out /tmp/proschi-review design.proschi.
npx proschi@latest fmt design.proschi
npx proschi@latest check design.proschi
npx proschi@latest test design.proschi
npx proschi@latest share-link design.proschi
Tell the user, briefly: the assumptions; the bottleneck you found and the
change that fixed it, with before/after numbers from analyze (utilisation,
p99, availability, cost); what still fails and why; and the link (open the
Results tab, or turn on Overlay: load, to see the load on the diagram).
Remind them the simulation is analytical and right to an order of magnitude,
not a benchmark: https://proschi.app/docs/model/.
Before: one replica of everything, 3k rps on Get product. test reports:
✗ p99 of Get product < 100 ms: api is saturated (3k rps of 2k rps, 153%)
→ Add replicas to api (Node.js): x3 keeps it under 70%, ...
✗ survive any node failure: Losing nginx (nginx) breaks "Get product" (and 8 more)
Change: api … x4 (3 to stay under 70%, one more to survive losing one),
x2 on nginx, worker, db, cache and rabbit. After: p99 of Get product
≈ 41 ms, survival passes, cost $2,200/month. One failure remains:
availability >= 99.9% for "Place order" (99.89%), because Stripe's 99.9%
sits on its synchronous path; the honest answers are a lower target for that use case or
taking the charge off the request path, which is a product decision to
raise with the user, not to hide.
title "Catalogue"
user "Customer" [Browser]
api "Shop API" [Node.js] x4
cache "Cache" [Redis] x2
db "Shop DB" [PostgreSQL] x2
user -> api
api -> cache
api -> db
usecase "Get product" {
user -> api : GET /products/{id}
api -> cache : LOOKUP product:{id}
alt "Cache hit" {
api --> user : 200 {"id": "p-1"}
} alt "Cache miss" {
api -> db : SELECT product
api -> cache : SET product:{id}
api --> user : 200 {"id": "p-1"}
}
}
traffic {
"Get product" 3k rps mix "Cache hit" 90%, "Cache miss" 10%
}
requirements {
p99 "Get product" < 100ms
availability >= 99.9%
survive any node failure
cost <= 3000 usd/month
}
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gvart/proschi --plugin proschi7 skills in this plugin
/code-to-usecasesRead application code and write Proschi `usecase` blocks (request flows with responses, async messages, parallel calls and alt failure scenarios) that pass `proschi check` and `proschi test`. Use when the user wants sequence diagrams, request flows or use cases of their endpoints, consumers or jobs in Proschi; when a .proschi architecture exists but has no use cases; or when they point at HTTP routes, controllers, gRPC services, message handlers or an OpenAPI spec and ask how a request flows through the system. Works for any language (Spring/Kotlin, Express/NestJS, FastAPI/Django, Go, Rails and others)./image-to-proschiTurn an image of an architecture diagram (a screenshot, PNG, JPG or PDF export from draw.io, Lucidchart, Miro, Excalidraw, Visio or a whiteboard photo) into a Proschi (.proschi) model that keeps the source's components, groups, arrows, legend and reading order, passes `proschi check` and renders cleanly. Use when the user shares or points at a picture of a system diagram and asks to convert, recreate, redraw, digitise or "make this diagram as code" in Proschi./infra-to-proschiTurn an existing architecture description into a Proschi (.proschi) model that renders, simulates and passes `proschi check`. Use when the user asks to diagram, model, visualise or "convert to Proschi" their system from what already exists - prose or wiki docs, a README architecture section, Mermaid diagrams, Terraform, CloudFormation, CDK, Pulumi, Kubernetes manifests, Helm charts or docker-compose files - or asks for an architecture diagram as code of the current repository./proschi-design-reviewReview an existing Proschi (.proschi) system design like a senior engineer in a design review - run `proschi check`, `test` and `analyze`, then find single points of failure, saturated or oversized nodes, missing failure scenarios, synchronous calls that should be async, data and consistency risks, cost waste and gaps between the diagram and its requirements, and propose concrete edits (and apply them when asked). Use when the user asks to review, critique, sanity-check or improve a .proschi design, asks "will this hold up?", or wants feedback on a system design interview answer written in Proschi./proschi-hld-docProduce a high-level design (HLD) document from a Proschi (.proschi) file with `proschi render --format hld-md` or `hld-html` (overview, requirements, capacity estimates, components, data model, APIs, scenarios, decisions, risks, with diagrams), after enriching the model with the summary, descriptions, entities and decisions the document is built from. Use when the user asks for a design doc, HLD, architecture document, RFC appendix or design review handout for a system described in Proschi, or wants the diagrams exported as SVG, Markdown or HTML for a wiki or docs site./proschi-keep-in-syncKeep a repository's Proschi (.proschi) architecture files in sync with its code - detect architecture drift in a branch, diff or pull request (a new service, datastore, queue or external API; a new dependency between services; a new or changed endpoint, consumer or status code) and update the nodes, connections, use cases and tests to match, then validate with `proschi check` and `proschi test`. Use when reviewing or preparing a PR in a repo that contains .proschi files, when the user asks whether the diagrams are still accurate, or wants CI that keeps them honest (the gvart/proschi GitHub Action).Other plugins' skills for the same job