This skill generates Arc-compatible architecture diagrams as JSON from user input, enabling quick visualization of systems in React apps.
npx playbooks add skill arach/arc --skill arc-diagrams
Make the reader understand a product, process, system, or relationship. Deliver an
editable source and a rendered visual whose labels survive the intended display
size. Arc can carry a technical illustration beyond a boxes-and-arrows inventory;
choose the representation from the explanation.
Infer the audience, destination, and one question the image must answer from the
request. Ask only when a missing fact would change the result. For example:
“Where does a request wait when all connections are busy?” is a useful brief.
“Show everything in the backend” needs a selected path or several views.
For a real system, inspect its code or supplied evidence before drawing ownership,
direction, timing, or trust boundaries. Label hypothetical examples as illustrative.
Keep measurements and scale honest; do not invent throughput, latency, or capacity.
JSON (ArcDiagramData). Read [diagram authoring](references/diagram-authoring.md).
DiagramConfig. Read [spatial illustrations](references/spatial-illustrations.md).
This is a separate format; do not send it to arc check or arc render.
separation and fine callouts. Read [panel cubes](references/panel-cubes.md).
Use ArcPanelCube or renderPanelCubeSvg; this family has its own renderer.
needs message order. Check the installed viewer API and supported syntax.
Counts, highlights, and motion must derive from the same model. A static figure
can show selected states without building an application.
Read [composition patterns](references/composition-patterns.md) when choosing a
layout or improving an illustration. It maps each pattern to a working example.
Use custom SVG/HTML framing for titles, captions, leaders, and insets when useful;
keep the technical drawing and its source editable. Photographs and freeform
pictorial art need another medium; do not force them into Arc nodes.
Use one dominant reading direction and one focal relationship. Place secondary
systems on a quieter lane. Group by ownership or function, not arbitrary proximity.
Use the same color for the same role across panels; combine color with labels,
stroke patterns, or shapes. Depth must encode a layer or containment relationship.
Aim for at most 12 nodes in a flat view. Split larger stories into regions or
chapters. Use automatic layout for dense graphs; hand placement is appropriate
when spatial arrangement carries meaning. Arc's standard node sizes arexs 80×36, s 110×48, m 160×75, l 220×90. Compute pitch from the actual node
width plus a clear connector channel, typically 60–100px. Long labels need more
room or a subtitle, not smaller type.
Give referenced connectors stable IDs. Use views for chapters and flows for
message travel. Inspect the installed schema before adding fields. Arc architecture
JSON and tiered isometric JSON have different shapes and rendering entry points.
When the user wants to watch architecture develop while agents work, use the
Hudson Kit Arc live view. First inspect the connected MCP tool list and readarc://schema/diagram for its schema. Require open_live_diagram,begin_live_diagram_work, update_live_diagram, finish_live_diagram_work, andend_live_diagram in that tool list; an installed
version number alone does not establish support. If these tools are unavailable,
explain that the connected MCP server needs a build with live support. Do not
present a static editor_handoff URL as a live connection.
open_live_diagram({diagram, title}) with a clear title. The studio base comes
from ARC_EDITOR_URL, or the tool's explicit baseUrl when needed.
liveUrl from the tool. Keep that one URL throughoutthe work; it remains attached to the returned sessionId.
begin_live_diagram_work({sessionId, summary, scope}) and retain its workId.
Scope defaults to {type: "canvas"}. Use {type: "nodes", nodeIds: ["api"]}
for existing boxes; use {type: "region", x, y, width, height} for the space
where new boxes will appear. Describe the work you are about to do honestly.
update_live_diagram({sessionId, diagram, message}). Supply the complete next
document and a concise phase message, such as “Adding the job queue” or
“Separating storage from the API”. Batch a coherent change into one revision.
Keep existing node and connector IDs stable; changing an ID means replacing
the object. Avoid repeatedly opening new views or adding artificial waits
merely to create animation.
finish_live_diagram_work({sessionId, workId, message}) when the declared work
ends. This returns the view to idle for another work cycle. Only one work item
may be active; do not overwrite it with a second begin. Updates renew its
five-minute lease. Expiry or disconnect interrupts work and makes its ID
invalid; begin a new item before resuming. Do not send artificial updates
solely to prolong the activity indicator.
end_live_diagram({sessionId, message}) with a short completion note. Save the
editable source as a normal artifact too: ordinary live views are in memory and
completed sessions expire one hour after completion. Unfinished sessions stay
available while their owning MCP connection is open, then expire one hour
after it disconnects. Ordinary live sessions disappear when the relay process ends.
The viewer receives actual MCP client name/version and a generated connection
identifier. Do not infer a model, provider, conversation ID, or task-completion
state from a client name. The working/idle indicator describes explicitly
declared diagram work; opening or updating a diagram alone leaves it idle.
Finishing work leaves the session reusable; ending the session rejects edits.
Work summaries are 1–500 characters without controls. A node scope contains
1–200 unique existing IDs of at most 200 characters each. A region uses finite
coordinates within ±100000 and positive dimensions at most 100000.
The same MCP connection owns each session; another agent connection must open
its own view unless a future tool explicitly supports shared ownership.
For local stdio use, keep the MCP process alive and open the viewer on the same
computer. A hosted HTTPS studio can require browser permission to reach the
loopback relay. For an all-local setup, run bun run dev and use its local studio
base. For a remote relay, configure its reachable HTTPS origin and deployment
authentication; see [MCP setup](https://github.com/hudsonkit/arc/blob/main/packages/mcp/README.md).
Do not claim hosted-site or published-package support until the matching build
has actually been deployed or released.
Use an Arc MCP server and Hudson Kit studio from the same release. Confirm the toolsopen_architecture_review, update_architecture_review,resume_architecture_review, and revoke_architecture_review_share are present.
A review has one lead author. The MCP endpoint requires the
deployment's bearer credential; viewer links are separate read capabilities.
open_architecture_review({diagram,title,question,repository,agent}).repository is {name,url?,revision?}. Give the user the returned liveUrl
early. Keep its sessionId and author resumeToken private; a viewer link
never grants author access.
begin_live_diagram_work before readingor changing the relevant architecture. Use the existing work lifecycle and
diagram update tools. Preserve node positions and stable IDs; the viewer
frames the full architecture automatically.
update_architecture_review as theybecome supported. Each finding has {id,title,detail,severity,nodeIds?,sources};
severity is info, low, medium, or high; sources are{path,line?,revision?,url?}. Use repository-relative paths and inspected
line numbers. Record summary, decisions, and openQuestions separately.
Provided arrays replace their previous values, so send the full intended
list. Do not present hypotheses as verified findings.
Reopen the same viewer link and verify its diagram, findings, and saved
history. The review stores its baseline and each revision before publishing.
Saved reviews do not have the ordinary live view's one-hour expiry.
resume_architecture_review with the savedsession ID and resume token. Supply agent: {harness,name?} again when the
resumed author should have caller-declared harness and name labels; omitting
it uses only the new MCP connection identity. A live owner cannot be displaced.
Interrupted work requires a new begin call. Completed reviews remain read-only
and keep their final author and history unchanged.
The studio's Save review action exports a portable JSON artifact without read
or author secrets. Source references are evidence supplied by the reviewing
agent, not independently verified by Arc. Revoking a share invalidates the old
viewer capability. Keep the server at a stable private address, or use the
supported private tunnel setup in docs/saved-reviews.md; do not expose an
unauthenticated MCP endpoint. A saved review is not a claim that the referenced
repository is unchanged or that the review has been accepted.
Before finishing a change that edits source files, run arc impacted on those
paths (bun scripts/arc-cli.ts impacted <path>... from a checkout). It scans*.arc.json and reports diagrams whose watches globs, or a node'ssource.path, claim a path you changed. Update each claimed diagram in the
same change. For a small edit, arc apply <diagram.arc.json> --ops <file>
writes one operation list and leaves the file untouched if any operation
fails. The same tools over MCP are arc_impacted and apply_diagram_file.
An empty impact report means nothing in the tree claims those files.
A valid document is not evidence of a good illustration. Complete this loop:
arc check figure.arc.jsonor MCP validate_diagram. Resolve errors first; explain intentional warnings.
In the source checkout, use bun scripts/arc-cli.ts in place of arc.
arc render figure.arc.json --out figure.svg --theme engineering --mode light
arc render figure.arc.json --out figure.png --theme engineering --mode light --scale 2
MCP equivalents are render_svg and render_png. PNG uses Chrome/Chromium;ARC_CHROME selects it. For tiered isometric or panel cube output use the
corresponding SVG renderer described in the references.
intended display width and a reduced width. For a README, check roughly
720px and 360px. Inspect the intended light/dark surfaces where relevant.
Source inspection, successful rendering, and ASCII previews do not establish
visual quality. If visual inspection is unavailable, report that limitation.
composition. Do not shrink the whole figure to hide a crowded layout. Make
one batched correction pass, render again, and confirm it. Stop after that
confirmation unless a concrete unresolved defect or user feedback requires
further work; name any remaining limitation.
For authored animation, inspect start, a meaningful transition, and end at fixedflowTime values. Use motion to explain order or causality; provide a readable
still when the destination cannot play it. GIF/MP4 need Chrome and ffmpeg.
For a panel cube, inspect progress at 0, 0.5, and 1; confirm that the faces stay
attached to their callouts. Test hover, keyboard activation, touch controls, and
reduced motion when delivering an interactive view.
When the host has a style file, render with it (arc render --style style.json,
or the MCP style argument) instead of a --theme. A style can pin panels,
such as a title plate, to the canvas corners. They are filled from the diagram'sfigure block, so give a finished figure one:
"figure": { "title": "Checkout flow", "code": "CF-01", "rev": "A", "sheet": "1 / 1" }
The code stays the same for the life of the figure; rev counts its edits.
A panel cell whose variable is missing is not drawn, so a sketch needs nofigure. See docs/themes.md for the panel format.
Return the rendered artifact, its editable source, and a short caption explaining
what the reader should notice. Include alt text for embedded images. State what
was validated and visually inspected; do not call an unviewed render approved.
Use the requested destination and format. A new illustration does not authorize
publishing a site or releasing a package.
The installed folder includes references and examples. If reading only the MCParc://skill/diagrams resource, relative files may not be exposed: retrieve them
from the matching package's skills/arc-diagrams/ folder or the repository's
[skill directory](https://github.com/hudsonkit/arc/tree/main/skills/arc-diagrams),
and check version compatibility before using a newer API.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.