/graphally:graphallyfrom graphally
Draws diagrams, infographics, and slides as SVG/PNG from HTML and CSS. Supports architecture diagrams with Azure/AWS icons, BPMN, sequence diagrams, org charts, Terraform diagrams, and more. Activated when the user wants something shown visually.
Ships in graphally. 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; scripts run unread.
A diagram is a small web page: HTML holds the components and their nesting, CSS sets the layout, a JSON list declares the connections, and a drawing script adds any mark a box can't hold. graphally lays the page out in a browser, routes the connections around the boxes, and writes an SVG. Never write coordinates, and never hand-write SVG.
A canvas, not a catalogue. Whatever a web page can lay out, graphally draws: a pyramid cut from grid cells, rings, a track with stations, isometric slabs, a map, a building with floors. No figure needs to be supported first. The references teach techniques to combine and stretch; none of them lists the figures allowed.
Make the most beautiful, original figure you can for the brief: the one a leading information designer would be proud to put in front of its readers. Form, metaphor, layout, colour, typography, density and emphasis are yours to choose; be bold and inventive. Three things stay fixed:
Everything else in this skill and its references is advice: break any of it when the figure is better for it. Look at the full-size PNG and iterate until you are proud of it. A plain figure in the theme's building blocks is drawn only when the user asks for one (plain, standard, strict, minimal).
Every figure is designed. A topology for a design document, a BPMN process, a runbook's sequence, an org chart, a slide: each takes the method below in full and a look of its own, built for its content and its reader (references/design.md, The look); a page of its own adds references/infographics.md.
Design each figure for its reader before writing any HTML, by one method for every figure (a network for a README, a BPMN process, a slide). Write it in a few lines, in your reply or a comment in the file:
shape=, clip-path, the
drawing script.What a figure must hold, the research behind it and the checklist before handing over: references/design.md. Read it before designing any figure. The look is the design's own choice; a notation's rules, and what its figure is free to design, are at the top of references/process.md and references/sequence.md; slides, printed pages and posts add references/infographics.md.
A request to make a figure better, clearer or more advanced asks for a new hero, built for this content with whatever techniques it needs.
Copy this checklist and work through it; render as often as the figure needs.
Try it rather than think it through. A render takes a second or two; working out in your
head how a grid, a clip-path, a route or a typeface will look takes far longer, and the guess
is often wrong. When a question can be answered by rendering, render: write the smallest file
that answers it (try.html beside the diagram: one grid, one shape, two boxes and a line),
look, decide, and delete it. Write each version of the figure quickly and let the render show
what to change. Keep the thinking for what no render answers: who reads the figure, what it must
make obvious, which form shows that. Designers who iterate through more prototypes reach better
designs than those who plan longer (Dow et al., Creativity & Cognition, 2009).
- [ ] 1. Design: the point, three candidate heroes and the one chosen, the numbers, the rest, the build
- [ ] 2. Read design.md (and a notation's standard, infographics.md for a page of its own, documents.md for a proposal); look up techniques in the others as needed
- [ ] 3. Write diagram.html
- [ ] 4. Render: node ${CLAUDE_SKILL_DIR}/scripts/graphally.mjs render diagram.html --png
- [ ] 5. Fix every reported problem; render again until it prints ok
- [ ] 6. Look at diagram.png: the form shows the point before the labels are read; rework until it does
- [ ] 7. Render once more with --png1x --themes: check the full size and the dark copy
- [ ] 8. Hand over diagram.svg and diagram.html; a PNG to share is rendered with --png2x
design.md and, for a notation, its standard (the rules at the
top of process.md or sequence.md); for a page of its own (a slide, a poster, a
one-pager), infographics.md; for a figure in a proposal or a solution design,
documents.md. Every other reference is a lookup: search it for the
technique, class, shape or call you need rather than reading it whole. Everything the format offers is in these
references and the format in brief below: the engine's code in scripts/ never needs
reading.design.md, The look).
The examples and the building blocks show techniques; a figure takes nothing from them
unchanged unless the user asked for a plain one. Ids name what the
connections and the script refer to; text is what the reader sees.diagram.svg (the deliverable) and diagram.png (a
half-size preview: enough to read every label and judge the form, at a quarter of the
tokens), then prints ok or one line per problem. Overlaps and overflows are the
problems' job, not the picture's; --png1x gives a full-size look when one is needed.
${CLAUDE_SKILL_DIR} is this skill's directory: Claude Code fills it in; elsewhere,
use the path of the folder that holds this file.ok means nothing collides, not that the figure works. Read it as its reader
would, labels last: the form alone shows the point from step 1. Then go through
design.md's list (Before you hand it over): one element draws the eye first, numbers
that compare are to scale, every colour is in the key, nothing is invented. When the form
misses the point, change the form; improve it until it would stand among the best figures
of a design-led showcase.--png1x --themes once at the
end, to see the full size and the dark copy..html (a doctype and a <script>
that loads graphally's viewer), so the file itself shows the diagram when opened in a
browser, with nothing installed. Keep the header; anyone can edit the text and reload.
Where a font's licence keeps it out of the SVG (embed-fonts="no"), readers outside get
the PNG rendered with --png2x.Changing an existing diagram: edit its .html in place, then render. The render reads
the previous SVG, so what you did not change stays where it was. Keep nudge, out and
in: they are the user's corrections. --recompute lays everything out afresh. A request
to rethink a diagram (clearer, simpler, self-explanatory, more than boxes and arrows) is a
new design: start again at step 1, and render with --recompute.
Two examples of the format at work, not looks to copy. A topology: the system's parts in
groups, as figure items (an icon over a name), joined by labelled lines.
<diagram width=1200 title="Library catalogue" subtitle="Production, North Europe">
<div class="grid grid-cols-4 items-center justify-between gap-x-24">
<div class=figure id=reader><icon name=browser></icon>Reader<small>web browser</small></div>
<div class=figure id=fd><icon name="front door"></icon>Front Door<small>CDN</small></div>
<div class="group items-center gap-12"><h4>Application</h4>
<div class=figure id=api><icon name="app service"></icon>Catalogue API<small>App Service</small></div>
<div class=figure id=indexer><icon name=functions></icon>Indexer<small>Functions</small></div>
</div>
<div class="group items-center gap-12"><h4>Data</h4>
<div class=figure id=db><icon name=sql></icon>Catalogue DB<small>Azure SQL</small></div>
<div class=figure id=covers><icon name=storage></icon>Cover images<small>Storage</small></div>
</div>
</div>
<script type="application/json">
[
["reader", "fd", "HTTPS"],
["fd", "api"],
["api", "db", "reads"],
["api", "covers", "links"],
{ "from": "covers", "to": "indexer", "label": "new upload", "dashed": true }
]
</script>
</diagram>
A figure designed for its point, "two stations hold most of the delay". The track is the application's path, so no lines join the stations; the red stops and their notes carry the point.
<diagram width=1200 title="Passport renewal: where applications wait">
<style>
.line { display: grid; grid-template-columns: repeat(5, 1fr); justify-items: center; row-gap: 16px; }
.figure { width: 150px; }
.track { grid-row: 2; grid-column: 1 / -1; justify-self: stretch; height: 36px; background: var(--icon-soft); clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 50%, calc(100% - 28px) 100%, 0 100%); }
.stop { grid-row: 2; align-self: center; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--woad); color: var(--card); font-weight: 700; }
.stop.slow { background: var(--rust); }
.stall { grid-row: 3; width: 200px; font-size: 12px; line-height: 16px; color: var(--muted); }
.stall b { display: block; font-size: 15px; color: var(--rust); }
</style>
<div class=line>
<div class=figure><icon name=browser></icon>Applied<small>online form</small></div>
<div class=figure><icon name=shield></icon>Photo checked<small>by an officer</small></div>
<div class=figure><icon name=database></icon>Identity confirmed<small>records office</small></div>
<div class=figure><icon name=building></icon>Printed<small>print centre</small></div>
<div class=figure><icon name=mail></icon>Delivered<small>post</small></div>
<i class=track></i>
<b class="stop col-[1]">1</b><b class="stop slow col-[2]">2</b><b class="stop col-[3]">3</b><b class="stop slow col-[4]">4</b><b class="stop col-[5]">5</b>
<div class="stall col-[2]"><b>3 days</b>photos wait for an officer to look at them</div>
<div class="stall col-[4]"><b>1 week</b>printing waits for the weekly batch</div>
</div>
<script type="graphally">
// A dashed leader from each slow station down to what holds it up.
const stalls = all('.stall');
all('.slow').forEach((s, i) => draw.moveTo(s.bottom).lineTo(pt(s.center.x, stalls[i].y)).style({ color: 'rust', dashed: true }));
</script>
</diagram>
<diagram>: width in pixels (default 1200; the height follows the content),
title, subtitle, icons=aws (AWS wins names both clouds share), theme=dark,
background (a colour, or none), fonts and embed-fonts=no (below), icon-sets (below).grid,
grid-cols-3, flex, flex-col, justify-between, items-center, gap-6, p-4,
mt-10, col-span-2, w-40, text-center, font-semibold, rounded-lg, border-dashed.
Brackets take any value or property: w-[130px], grid-cols-[160px_1fr],
[grid-area:edge]. Colours are the theme's tokens (bg-wash, text-muted,
border-woad); text sizes follow the diagram's scale (text-base is 13px).figure (an icon over its name and a <small> line, with no
frame: the item of a topology; external mutes it, accent colours it), node (the
same in a framed card), group with an <h4> title (plain, dashed, external,
vnet, subnet, region; badges of badge icons in the title, or at a figure's icon), tile (an icon over
its name in a small frame), band (a strip of shared services), key with swatch (a
legend), card, box, pill, tag, banner; disabled on any of them greys a
part that is there but does not run, icon and lines included. These class names are taken, and so are
the sequence helper's (seq, msg, num, guard, lifeline, activation, frag-…):
name your own differently."flow": true on a connection moves gaps and a dot along it; data-step="1",
"2"… make elements appear in order, once; animate(target, keyframes, options) in the
drawing script moves an element or a drawn mark, as element.animate does. The still figure stays complete: PNGs, print
and reduced motion show it. Move only what carries the point.position: absolute from a relative parent, so centring counts only the boxes and
lines run straight; leave them room.shape="cylinder" on any element draws it as that shape: diamond,
hexagon, chevron, semicircle, document, cloud, BPMN task, start, end,
gateway exclusive, event timer and more. clip-path: polygon(…) cuts any other
straight-edged shape.<icon name="app service">: Azure and AWS services by loose names, a generic
set (user, database), Phosphor line icons for any other idea (ph:rocket-launch), and a
company's own set from a folder or a sprite (icon-sets="acme: ../brand/icons" on
<diagram>, then acme:shield). An unknown name is reported with the nearest names.
references/icons.md has the names, weights, colours and own sets.fonts="IBM Plex Sans:400,600" on <diagram> with :root { font-family: 'IBM Plex Sans', sans-serif } sets the whole figure, title included; an @font-face rule in the <style> loads a
font file of your own (a licensed brand font, the path relative to the diagram). Both are
measured for layout and embedded in the SVG. references/fonts.md has
choosing, loading and licences.<script type="application/json">, a list of ["from", "to", "label"]
or objects with dashed, out/in (the sides), both, via, color. A list in to
or from draws one bundle with a shared trunk.<script type="graphally"> runs after layout with every element's
box, for marks no box gives (tracks, rings, leaders, brackets, slabs): the drawn line, line,
track and area (one long line through points, each passed level, upright, at an angle or
straight on, turning in rounded right angles, smooth curves or straight, swelling with a width
per point, marking and labelling itself; area closes and fills it behind the page), arrow,
connect (radius softens its corners; route: 'direct' draws it as the drawn line through
its via points), curve, depend, draw.moveTo(…).lineTo(…),
draw.arc, gate, text, icon, shape. Drawn lines and text are checked like routed ones.<script type="graphally" before> calls schedule() and timeline()
(plans) or sequence() (sequence diagrams) before layout.--ink, --muted, --line, --rule (light separators), --wire (lines), --woad (blue), --rust
(red), --teal, --green, --purple, --amber; grounds --bg, --card, --wash,
--icon-soft, --vnet, --note, and lane tints --lane-a to --lane-d. Each has a dark
value, so a figure built from them follows the dark theme. A colour worked out from tokens
(color-mix(in srgb, var(--woad) 30%, var(--card)), in page CSS or in the script) follows it
too: the render reads it in both themes. A colour with opacity (rgb(31 99 182 / 12%))
follows, but darkens on the dark ground, so a light-to-strong run of tints flattens there; a
mix of two tokens keeps its contrast. Hex colours stay as written.--themes writes diagram-dark.svg beside the light one; --dark draws
dark only.The whole format, with every class, shape, option and call: references/format.md.
| Problem | Fix |
|---|---|
unknown-id | a connection names an id that does not exist: the suggestion is the closest |
unknown-icon, unknown-shape, unknown-utility | use the suggested name, or a theme colour for a colour class |
label-crowded | widen the gap the line runs through, or shorten the label |
override-ignored … by=x | the side named in out/in is blocked by x: choose another side |
short-end | an arrowhead sits on a bend right before its box: give the line more room there |
lines-overlap | two lines share a stretch: give one other sides (out/in) or via points |
unroutable | the line has no way through: widen a gap, or give it via points |
page-overflow | the content is wider than width: widen width, or narrow the columns |
text-overlap | two texts collide (quoted in texts): give one more room, or move one |
warning: flow-missing | a BPMN step no sequence flow reaches or leaves: add the flow it names |
line-through-text, text-cut, marker-overlap | a line through a title, a label past the page's edge, a label under a task's marker: move it clear (format.md, Problems) |
warning: class-taken | a class of yours shares a building block's name, and the block's look stays under your rule: set what it names, or rename your class |
warning: font-missing | a Google family or an @font-face file could not be loaded: check the name on fonts.google.com, or the file's path; the text falls back |
warning: box-overflow | a box or text sticks out of the drawn box holding it: widen the holder or narrow what is inside. A warning, so the render passes: leave it when it is meant |
label-ambiguous | a label sits between its line and another nearly as close, so it may read as the other's: give its line a level run with room above it, or move the lines apart |
mark-near-end | a mark on a line leaves the arrowhead next to it too little line: move the item further from the mark |
warning: detour | a title stands in a line's straight way between two lined-up items, so the line goes round it: move the title as the hint says |
warning: off-centre | two connected items nearly share a column or row, so the line meets one off its centre or steps: line up their centres as the hint says |
warning: text-small | a page shows the figure at most 880px wide, and its labels would shrink below 9px: set the --text-size it names, or narrow the figure; a slide or a print shown at full size can leave it |
script-error | the message and line say what failed in a script |
design.md is read before designing, and with it a notation's standard, infographics.md
for a page of its own and documents.md for a proposal; the rest are lookups for techniques,
searched when the build needs one.
| Techniques | Reference |
|---|---|
| Designing any figure: what it holds (point, hero, numbers, the rest), what the reader needs, the hand-over list | references/design.md |
| Slides, printed pages and posts: the page's standard (headline, ground, type), formats, sizes, numbers drawn to scale | references/infographics.md |
| Fonts: choosing type, Google fonts, a company's licensed font files, licences and embedding | references/fonts.md |
| Icons: choosing a set, cloud services, line icons, a company's own icon set | references/icons.md |
| Zones (internet, cloud estate, on-premises) and the crossings between them, containers in containers (VNets, subnets), peering and private links | references/network.md |
| Hierarchies and org charts: levels named, how much sits under each node, branches by colour; the grid and buses underneath | references/hierarchy.md |
| BPMN: the standard, lanes, events and gateways, and what is designed within it | references/process.md |
| UML sequence standard and what is designed within it; participants, messages, fragments | references/sequence.md |
| Dates as grid columns: bars, milestones, dependencies | references/plan.md |
| Rows lined up across stages (subgrid), phases, gates on boundaries, matrices | references/charts.md |
Shapes cut with clip-path, placing by angle and distance, geometry drawn around the layout | references/documents.md |
| Drafting a diagram of a Terraform repository from the code | references/terraform.md |
| The whole format: every class, shape, option and call | references/format.md |
scripts/graphally.mjs render <file.html>... [--png | --png1x | --png2x] [--themes | --dark] [--frames ms,ms] [--out dir] [--recompute]: compiles every <diagram> in the file to SVG;
--png adds a half-size preview, --png1x a full-size one, --png2x a sharp PNG to
publish (each written as <name>.png, in place of the last one), --themes a dark copy,
--frames a PNG of a moving figure at each time (<name>-600ms.png), --recompute ignores the previous layout. Several
files render in one call, in parallel; render them together rather than one by one.scripts/edit.mjs <file.html> --move id dx,dy | --connect from to [label] | --line 'a->b' json | --unline 'a->b' | --edits json | --lines:
patches moves, connections, text, structure and CSS and keeps the rest of the file as written.scripts/tf2graphally.mjs <terraform dir> [--out file.html] [--title "…"]: drafts a
diagram of a Terraform configuration.scripts/fetch-icons.mjs [azure] [aws] [--force]: downloads the icon packs; the first
render does it by itself.They need only Node.js and an installed Chrome, Chromium or Edge. If the render prints
graphally needs Chrome, Chromium or Edge, run npx playwright install chromium once, or
set CHROMIUM_PATH to a browser executable. Offline, diagrams render without vendor icons
and say how to fetch them later.
graphally · Copyright (c) 2026 Kamil Wilczyński (kwilcz) · https://github.com/kwilcz/graphally · Apache License 2.0 (LICENSE.txt, NOTICE.txt).
LICENSE.txt (opens in a new tab)NOTICE.txt (opens in a new tab)README.md (opens in a new tab)assets/icon-sources/azure.txt (opens in a new tab)assets/theme.css (opens in a new tab)package.json (opens in a new tab)references/charts.md (opens in a new tab)references/design.md (opens in a new tab)references/documents.md (opens in a new tab)references/fonts.md (opens in a new tab)references/format.md (opens in a new tab)references/hierarchy.md (opens in a new tab)references/icons.md (opens in a new tab)references/infographics.md (opens in a new tab)references/network.md (opens in a new tab)references/plan.md (opens in a new tab)references/process.md (opens in a new tab)references/sequence.md (opens in a new tab)references/terraform.md (opens in a new tab)scripts/edit.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub kwilcz/graphally --plugin graphally10 skills in this plugin
/architecture-diagramDraws software and cloud architecture diagrams with graphally and the official Azure and AWS icons - services, networks (VNets, subnets, private endpoints, peering), trust boundaries and the flows between them, from a description or from the code. Use for an architecture diagram, a solution design figure or a network picture./bpmnDraws BPMN process diagrams with graphally - pools and lanes, tasks, events, gateways and message flows, as SVG and PNG. Use for a BPMN diagram, a business process model, or a process map with each role in its lane./diagramDraws any diagram or visual explanation with graphally, choosing the form that shows its point - a topology, a flow, a timeline, a hierarchy, a comparison, or a figure invented for the content, as SVG and PNG. Use when the user wants something drawn or explained visually and none of the other graphally skills fits - a concept, the states of a thing, a comparison, an idea.Other plugins' skills for the same job