Draw maths diagrams with Penrose and AI
Describe mathematical objects and relationships, keep their visual rules separate and render reproducible SVG diagrams through the official Penrose toolchain.
Draw maths diagrams with Penrose and AI from relationships rather than manually positioned lines. The penrose-svg skill separates a diagram’s vocabulary, its concrete objects and its visual rules, then uses the official renderer to produce SVG. That makes the source available for later revision and repeated builds.
It suits sets, graphs and other technical relationships. The rendered image is a build artefact rather than the authoritative editable source. A tidy layout still needs checking against the intended meaning; it does not prove a mathematical claim or replace review.
What it does
- Represent disjoint or overlapping sets
- Create directed graphs for a technical explanation
- Separate relationship data from visual rules
- Retain reproducible sources beside the SVG
- Reuse a vocabulary across related diagrams
- Revise labels and spacing through source changes
Install and use
- Place the complete skill folder where your file-capable agent can discover it. Actual rendering needs Node.js and the official Penrose renderer package; project-local installation is documented for version control. Use authorised source and output paths.
- Try: “Draw disjoint subsets A and B inside C. Keep the source files and final SVG, with readable labels.” State relationships and size constraints explicitly.
- Define vocabulary in Domain, instances and relationships in Substance, and appearance in Style. A Trio file connects them; ensure its relative paths match the project layout.
- Render and inspect the actual result. Correct syntax, meaning and layout in the source, then rebuild rather than hand-editing the generated SVG.
FAQ
Source
Made by Wang Yubo. Original skill: penrose-svg, published on GitHub under the MIT licence.
View on GitHub