cathrynlavery/diagram-design/skills/diagram-design
Diagram Design
Creates branded diagrams and charts in 45 visual types, from architecture and sequence to Sankey and Wardley maps, as HTML, SVG or PNG, with draw.io, Mermaid and Excalidraw import.
What Diagram Design does
On the first diagram in a project, the agent checks whether the style guide still holds the shipped default colors. If it does, it pauses and asks how to brand it: from a website URL, another installed skill, a local folder or design system, pasted tokens, a saved profile, or the defaults. A finished brand can be saved as a profile in ~/.diagram-design/profiles/ for later projects.
For each diagram the agent picks a semantic pattern when behavior carries the meaning, then one of 45 visual types, and loads that type's reference file. It states the plan in one short message (type, size preset, and anything the complexity budget will force out) so the user can redirect it. Drawing follows fixed rules: at most 9 nodes and 12 arrows, one or two accent elements, right-angle connectors, labels on opaque masks and a 4px grid. Before output the agent runs a checklist and python3 scripts/self_check.py on the file. Imports from draw.io, Mermaid and Excalidraw go through extractor scripts and are redrawn rather than converted, with a report of what was merged, collapsed or dropped.
The result is one self-contained HTML file with inline SVG and embedded CSS, in a light, dark or full editorial variant. PNG and SVG export happen only when the user asks.
Install
npx skills add cathrynlavery/diagram-designRead the security check below before you run it. The repository's own instructions win if they differ.
Security check
What the skill's files do, from reading them. A flag that nobody has checked yet says "Not checked", never "No".
- Runs scripts
- Yes
- Uses the network
- No
- Installs hooks
- No
- Asks for secrets
- No
The scan read every file in the folder. It found six Python scripts (three import extractors, PNG and SVG export, and a self-check), no network requests in the skill's files, no hooks and no secrets. The repository's PRIVACY.md adds that generated diagrams load fonts from Google Fonts when a browser opens them, that PNG export renders in a headless browser which makes the same font request, and that brand onboarding fetches a website with the agent's own tools only when you ask. Saved profiles are written to ~/.diagram-design/profiles/. Before installing, read the six scripts and try the skill in a test project.
Scan details: Ships 6 script files: scripts/drawio_extract.py, scripts/excalidraw_extract.py, scripts/export_png.py, scripts/export_svg.py, scripts/mermaid_extract.py, scripts/self_check.py. Checked at commit e57eda6102a1.
Use cases
- Draw a system architecture, sequence or state machine in a company's brand.
- Redraw an existing draw.io, Mermaid or Excalidraw diagram with a cleaner layout.
- Make charts such as Sankey, Gantt, heatmap, waterfall or scatter as SVG.
- Export a diagram as PNG or SVG for slides or documents.
Limitations
- Not meant for plain-text diagrams, lists or one-shape diagrams; it points to tables or prose.
- Caps a diagram at 9 nodes and 12 arrows (faithful imports excepted); bigger subjects are split into overview and detail.
- The scripts need Python 3, and PNG export uses Playwright.
- Generated files load fonts from Google Fonts unless the link is removed.
Sources
- diagram-design skill folderRepositoryPrimarygithub.com
- cathrynlavery/diagram-designRepositoryPrimarygithub.com
- github.com/cathrynlavery/diagram-design/blob/main/skills/diagram-design/SKILL.mdRepositoryPrimary
- github.com/cathrynlavery/diagram-design/blob/main/skills/diagram-design/scripts/export_png.pyRepositoryPrimary
- github.com/cathrynlavery/diagram-design/blob/main/PRIVACY.mdRepositoryPrimary


