/proschi:proschi-keep-in-syncfrom Proschi
Detects architecture drift in a branch or PR by analyzing code diffs and automatically updates .proschi architecture files to match. Useful when reviewing PRs or ensuring CI keeps diagrams accurate.
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: after a code change, the repo's .proschi files describe the system as
the code now is, they pass npx proschi@latest check and test, the PR says
what changed in the architecture, and the user has a link to the updated
diagram.
Syntax: references/proschi-cheatsheet.md.
git ls-files '*.proschi' # the models (and proschi.json for OpenAPI maps)
git diff --stat origin/main...HEAD # or the PR's base branch
git diff origin/main...HEAD -- . ':(exclude)*.lock'
No .proschi files? Offer to create one (the infra-to-proschi and
code-to-usecases skills) instead of syncing.
Drift is a change in what talks to what or what the system offers. Read the diff for these signals:
| Signal in the diff | Model change |
|---|---|
New deployable: Dockerfile, compose service, k8s Deployment, Helm chart, Terraform module/resource, Lambda, new cmd/<name>/main.go or app module | new node (right [Tech], team, group) and its connections |
| New datastore / queue / bucket / cache client or resource; new topic or queue name | new node, or a new connection to an existing one |
New env var or config pointing at a host (*_URL, *_HOST, BROKERS), new HTTP/gRPC client, new SDK (stripe, twilio, openai) | new connection (and an external node if needed) |
| New route/controller/handler, RPC method, consumer, scheduled job | new usecase (or a new alt in an existing one) |
| Changed path, method, status code, request/response shape | update the steps and payloads of that use case |
| New error handling, retry, fallback, timeout | new alt scenario (-x for the failed call) |
| Work moved to a queue or background job | -> becomes ->> plus worker steps after the response |
| Removed service, dependency or endpoint | remove the node / connection / use case (and fix traffic, requirements, test lines that name it) |
| Replica counts, instance sizes, autoscaling min | xN, capacity { … size M } |
Not drift: refactors inside one service, renamed variables, tests, docs, dependency bumps with the same role. Say "no architecture change" and stop.
traffic, requirements, test and links.legend, tag the
new parts.POST /orders); otherwise start
with a verb, which decides read or write (INSERT, UPDATE, SET, PUBLISH,
SEND … write; SELECT, LOOKUP … read). Responses start with a status. Full
step rules: the code-to-usecases skill.traffic if the file has one; add the
scenarios to its mix.# GUESS: ….proschi.json), update the spec
mapping for new services.npx proschi@latest fmt <changed files>
npx proschi@latest check --strict .
npx proschi@latest test .
Then render each changed architecture and look at it (mandatory; the
cheat-sheet's Render and review checklist). A new node must not land
stranded or add crossings:
npx proschi@latest render --out /tmp/proschi-review <file>.
Fix until clean. If a requirement or test now fails because of the code
change (e.g. a new synchronous call to a slow API breaks a p99 target or a
never waits for test), that is a real finding: report it in the PR, don't
delete the check. Run npx proschi@latest analyze <file> for designs with
traffic and mention cost or p99 changes.
npx proschi@latest share-link docs/architecture.proschi
Add to the PR description (or your reply):
### Architecture
- New node `notifications` [Go] (@growth), called by `orders` over gRPC.
- New use case "Unsubscribe" (POST /unsubscribe): 200, 404.
- `orders -> email` is now async via `events` (Kafka).
Checks: proschi check ✓, proschi test 7/7 ✓ · [Open the diagram](<share link>)
If the repo has no Proschi workflow, suggest the GitHub Action. It checks and
tests every .proschi file, annotates errors on their lines, and keeps one
comment per PR with each changed diagram's tests, cost, p99 and an Open in
Proschi link:
# .github/workflows/proschi.yml
name: Proschi
on:
pull_request:
paths: ['**/*.proschi', '.github/workflows/proschi.yml']
push:
branches: [main]
paths: ['**/*.proschi']
permissions:
contents: read
pull-requests: write # the comment; leave it out (or set comment: false) for none
jobs:
proschi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: gvart/proschi/[email protected]
with:
files: docs/**/*.proschi # default **/*.proschi
Inputs: files, test (default true), openapi (node=path/spec.yaml
per line), comment, render, version. Docs:
https://proschi.app/docs/editors/#github-action. Elsewhere, two steps do
the checks: npx proschi check --format github . and
npx proschi test --format github .. The action catches broken diagrams, not
drift; drift is what this skill is for, so also suggest widening paths to
the code folders if the team wants the comment on every PR.
Diff: services/orders/src/notify.ts adds
await fetch(process.env.NOTIFY_URL + '/notify', …) in POST /orders, and
deploy/notify.yaml adds a Deployment notify (image …/notify-go, 2
replicas).
Model edits:
notify "Notification service" [Go] @growth x2 # deploy/notify.yaml
orders -> notify : HTTP # NOTIFY_URL in services/orders
# in usecase "Place order", branch "Paid", before the 201:
orders -> notify : POST /notify {"orderId": "o-1"}
notify --> orders : 202
Then fmt, check and test. If the file has a p99 "Place order"
target, compare analyze before and after: the new synchronous hop adds
the notify service's latency to checkout. The code ignores the response, so
the PR note also suggests orders ->> events : PUBLISH OrderPlaced with notify
consuming it, and a test that keeps it that way:
"Place order" never waits for notify.
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-capacity-planSize a Proschi design for its load - add `traffic`, `requirements` (p99 latency, availability, durability, failure survival, cost) and replicas, shards and capacity overrides from stated SLOs or expected load, then run `proschi analyze` and `proschi test`, explain the bottlenecks and fix them until the requirements pass. Use when the user asks whether a .proschi design scales, how many replicas or shards it needs, what it costs, what its p99 or availability is, or wants to turn traffic numbers, SLOs or a back-of-the-envelope estimate into a checked capacity plan./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.Other plugins' skills for the same job