/arcgram:arcgramfrom arcgram
Generates interactive node-and-edge diagrams as standalone HTML files. Use for system maps, dependency graphs, topologies, workflows, and architectural diagrams.
Ships in arcgram. 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.
None: SKILL.md is the whole skill.
For any AI agent — Arcgram is agent-neutral, not a Claude-only skill. The block above is ordinary YAML frontmatter: Claude's skill system reads
name/descriptionto auto-trigger it, and any other agent (GPT · Gemini · Cline · Continue.dev · Cursor · Aider · local) just reads the plain-markdown body — no rejection, no Claude dependency. This is the v2 skill — enginetemplate-v2.html, fields inschema.md, per-platform install inUSAGE.md.
Arcgram is a human↔AI collaboration substrate: the AI externalizes its reasoning as a typed node-and-edge graph the human audits and adjusts, converging on ground truth that survives across turns, sessions, and agents. The AI draws, the human audits. (Full positioning: README.md.)
Three guards keep the drawing honest — internalize them before you build:
Reach for Arcgram when the structure of a thing — or of your reasoning about it — gets hard to hold in plain text:
Charts (use a chart tool) · sequence diagrams (use a sequence-diagram tool) · mind maps · auto-layout graphs with hundreds of nodes (this skill assumes deliberate manual placement).
| File | Purpose |
|---|---|
template-v2.html | Renderer engine + DATA SECTION. Copy it, fill the data near the top, re-open in a browser. One self-contained file — theme inlined. |
schema.md | Full field reference — the single source for every node / edge / band / column field. Read it; don't author a schema from memory. |
layout-tips.md | Positioning + edge-routing heuristics. |
examples/ | Worked diagrams (system map · H bands · decision diamonds · workflow) — open one first. |
skills/checkpoint/, reconcile/, validate/ | Headless validators — see step 7. |
extensions/ | Optional overlays for a rendered flow — notably arcgram-bugmarks.js, the Audit defect-review UI. See § Audit. |
themes/ | base.css + default.css — reference palette for forking. Optional at runtime: an export inlines the active theme, so the exported diagram needs no themes folder. |
new-flow.mjs | Scaffold a blank flow into output/: node new-flow.mjs my-flow. |
output/ | Default home for the flows you generate. Yours — not part of the release, not leak-scanned, not shipped. |
Pin the layout before you draw — later edits build on it. There are two decisions, and the agent should derive a recommendation from the flow's logic and help the user confirm it rather than leave them to guess:
COLUMNS (vertical) or BANDS (horizontal). No (one causal/branching chain) → free DAG: leave COLUMNS/BANDS empty, each node's role on its cat.kind:'diamond') — an overlay on any shape, not a separate option. See schema.md § Decision diamond.| shape ↓ · decisions → | plain | + diamonds |
|---|---|---|
| parallel categories · vertical | V — COLUMNS | V + thinking |
| parallel categories · horizontal | H — BANDS | H + thinking |
| no categories (logic chain) | free DAG | free thinking-flow |
Orientation (V vs H) applies only when grouped and is the user's preference — so the agent proposes shape + decisions and asks the user the reading direction (default V): top→bottom story (lifecycles, pipelines) → COLUMNS; left→right stages/tracks → BANDS (layout-tips.md §10b). If the platform has a selection UI (AskUserQuestion), use it; otherwise ask inline and wait. ⚠ Never force a no-category chain into COLUMNS/BANDS — the tags float off their nodes. Keep the same mode on later edits unless the user asks to switch.
Hard gate — read before you draw. Before you place a single node, read
schema.md(every field) andlayout-tips.md(routing + positioning), and open one file inexamples/. Authoring from memory of how generic diagram tools look — skipping these reads — is the single biggest cause of broken graphs: drifted field names, all-to-all edge meshes, and wires routed straight through nodes. Skipping the reads is the bug, not a shortcut.Decide Audit up front. Ask the user whether they want an Audit defect review of the finished flow (§ Audit). Settle it before you draw — never auto-annotate defects with icons.
Group nodes by category, decide reading direction, mark the critical connections. Draw only the edges that exist in the real structure — never wire every node in one group to every node in the next (a mesh). If a band-to-band connection comes out all-to-all, a structural element is missing (usually a convergence node — many inputs feed one decision); see layout-tips.md §10b. Logic-check the draft (step 7, pre-draw) before you place anything.
schema.md for every field, layout-tips.md for positioning — read them instead of inlining a schema from memory. schema.md is gated against the engine (schema-xref), so any drift is caught.
Pin the shape before drawing (§ Choose the layout first). The engine sizes nodes from their labels — you don't set w/h except on diamonds. Plan spacing per schema.md § Sizing rules of thumb + layout-tips.md §3.
Scaffold a copy into output/ — node new-flow.mjs my-flow → output/my-flow.html — (or copy template-v2.html by hand). Then in the DATA SECTION set <title>, the title lines, and fill nodes[], edges[], and optionally BANDS[], COLUMNS{} / HCOLUMNS[], CANVASES[], STATUS_LEGEND{}. Minimal shape (full fields: schema.md § Node / § Edge):
// node — required: id, label, cat, type, desc, x, y
{ id:'FEED', label:'Feeding', cat:'CORE LOOP', type:'core',
role:'action', desc:'Tap to feed.\nRestores hunger.', x:220, y:120 }
// edge — required: f, t, fromPt, toPt
{ f:'FEED', t:'FOOD', fromPt:'bot', toPt:'top', route:'vhv', style:'solid' }
Declare node ownership on both sides — a node's band/free (plus column/colFree in H) and the band/column members[] must agree (gated A27/A28). The engine does the rest: bands auto-fit, lanes auto-grow, loose entry nodes wrap in a LIFECYCLE band. (schema.md § Node ownership · § Column ownership · § Auto LIFECYCLE band · § Canvas filter.)
Add only what the flow needs; every field is defined in schema.md, every heuristic in layout-tips.md:
§ Adding a custom type.vhv/hvh/3leg per edge; pick fromPt/toPt so lines exit/enter clean (arrowhead points at toPt): § Routers + layout-tips.md §6, §9.crit: § Edge styling decision matrix.crit:true + lbl:'🔑N +verb', 3–7 per 30 edges: layout-tips.md §8.kind:'diamond' + branch:'Y'/'N': § Decision diamond.status (+ STATUS_LEGEND) and flag (a lightweight per-node "look here" note): § Status dot · § Audit marker. For a real defect review — bugs, logic holes, geometry defects like a wire through a node — use the Audit extension, not flag icons (§ Audit).template-v2.html via the host's HTML tool (e.g. mcp__visualize__show_widget). Pan/zoom/hover native — best for iteration.<svg>…</svg> block directly in your reply, using arcgram conventions (bands as rects, nodes border+dark bg, vhv/hvh/3leg edges, pills, crit red). Don't switch to a different diagram tool — the chat-native SVG routes around the failed tool.template-v2.html with your data to a file the user opens. Always available with filesystem access; use for handoff.skills/<tool>/)The diagram is a spec — check it, don't eyeball the render.
Pre-draw (as soon as nodes/edges exist) — Checkpoint catches dangling edges, orphans, a diamond missing a branch, duplicate ids:
node skills/checkpoint/checkpoint.mjs your.html
Post-draw — Validate runs Checkpoint always, and Reconcile too when you pass matching code (a no-code run reports INCOMPLETE, never a silent pass):
node skills/validate/validate.mjs your.html [code-file ...]
The engine also self-checks on render (stamps self-check ran … | N findings into the subtitle); the CLI is the enforce-by-construction version.
Extract the inline JS and syntax-check before opening — catches typos that silently blank the canvas:
awk '/<script>/{flag=1;next}/<\/script>/{flag=0}flag' your.html > /tmp/x.js && node --check /tmp/x.js
Open in browser. Confirm.
flag icons)Audit is a defect-review overlay for a drawn flow: a pulsing ring + a short reason tag on each marked node or edge, plus an "Audit" findings list. It self-hides when there are no marks, so a clean flow looks identical with or without it.
Ask first, mark only when asked. Offer the user an Audit pass and settle it up front — do not auto-annotate defects.
Use the extension — not the flag field. The Audit UI is extensions/arcgram-bugmarks.js. The per-node flag field draws a small icon but is not the Audit overlay — it must never stand in for a defect review. Load the extension after the engine (inline the <script> for a self-contained file), then call ArcgramBugs.set([...]):
<script src="extensions/arcgram-bugmarks.js"></script>
<script>
ArcgramBugs.set([
{ id:'BUG-260911-ag-01', level:'high', type:'logic', anchor:{ node:'NODE_ID' },
reason:'no failure branch', desc:'a declined payment dead-ends here — the path assumes success',
evidence:'scanner: 1 outgoing edge (success), 0 failure branch' },
{ id:'BUG-260911-ag-02', level:'medium', type:'logic', anchor:{ edge:{ f:'A', t:'B' } },
reason:'unstated precondition', desc:'…', evidence:'doc: the spec requires a confirmed session here' }
]);
</script>
level is severity — how bad it is, not where it came from: high = the flow is wrong and someone will hit it, medium = a real concern worth a decision, low = an advisory. (The checkpoint skill's severity field is a different measurement that happens to share the word — never map one onto the other.) Where a mark came from goes in evidence, prefixed scanner: / doc: / derived:.
Mark reasoning, not geometry: use type:'logic'. Geometry is gated, not annotated — the gate bundle checks it and the engine fixes it. Anchor each mark to a node:'ID' or an edge:{ f, t }, give it an id shaped BUG-<yymmdd>-<agent>-<seq>, and ground it with evidence. Full API, the closure fields, and the id rules: extensions/README.md.
Closed marks on the flow — an authored per-map default. Resolved rings are hidden by default (the header then says "N closed hidden"); a map whose closure evidence is part of the story declares <!--BUGMARK:SHOW-COMPLETED--> before the extension's script region and its closed rings show from the first load. Settle it with the user like the Audit pass itself. Stamp semantics + the unknown-stamp allow-list: extensions/README.md § Per-map stamps.
Non-negotiables. Adjust everything else freely; these hold on every diagram.
END OF DATA SECTION is the engine, off-limits. AND the agent proposes; the human holds final write-authority — draft and adjust the diagram data freely, but do not commit it as final shared ground truth without the human's confirmation.schema.md, never from memory of what generic diagram tools look like. Read this body + schema.md before generating; name fields, don't invent them.schema.md owns every field; README.md owns the positioning. Point to them — don't restate a field definition or re-argue the job inside this file.NOTICE stay intact when you redistribute (Apache §4(d)); an unbranded / no-attribution build needs the commercial license (WATERMARK-AND-COMMERCIAL-TERMS.md).Apache-2.0. Attribution rules → § Hard rules (the canonical copy); full terms, trademark, and the unbranded commercial build → LICENSE · NOTICE · WATERMARK-AND-COMMERCIAL-TERMS.md.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jovesun-lab/arcgram --plugin arcgram4 skills in this plugin
/checkpointValidate an Arcgram diagram as a logic spec: is the flow well-formed and coherent? Reads node/edge structure (id/f/t/kind/role/type), never geometry. Typed findings - dangling edge, orphan node, missing branch, disconnected island, duplicate id, missing schema, plus optional coherence (every action traces to a goal). Marks, never blocks. Run after authoring or editing a diagram. Agent-neutral. Sibling to Reconcile (Checkpoint = structure; Reconcile = values)./reconcileCheck that an Arcgram diagram's @spec values still match the code that implements it. Reads each node's desc "@spec key=value" line, finds the same-named code constant (hold_ms matches HOLD_MS or holdMs), diffs the literals. Typed findings: drift, missing constant, non-literal, ambiguous. Reads only the @spec line + named constants, never geometry; marks, never blocks. Run after editing a diagram or its code. Agent-neutral. Sibling to Checkpoint (Checkpoint = structure; Reconcile = values)./validateRun both Arcgram self-checks in one call. A thin wrapper over Checkpoint (structure) and Reconcile (values): validate(diagram,{code}) runs Checkpoint always and Reconcile when code is supplied, then merges into one source-tagged result in the same {findings,summary,attestation,clean} contract. clean = checkpoint.clean && reconcile.clean. Adds no new check; marks, never blocks. Run after authoring or editing a diagram and its code. Agent-neutral. The single door over its two siblings.Other plugins' skills for the same job