I've found a really nice workflow with Claude for generating high quality diagrams.<p>Say you want to come up with, eg, a diagram depicting clustering with k-nearest neighbors:<p>1. Ask Claude: 'please generate an SVG diagram depicting clustering in k-nearest neighbors, make it look like <details>'<p>2. Take a screenshot of the generated diagram. Paste it into your next response to ground Claude by letting it see how the code actually rendered. Also, give your:<p>- what changes you want next for next round, eg style this differently, use more colors, replace x with y, etc<p>- what you like and want to keep, or even explore further<p>3. Do this iteration several times<p>4. Once you get somewhere ~80% close to where you want, save the code into a .svg file<p>5. Open it in Inkscape, manually make edits to close the gap<p>The nice thing about this is that many illustrations are actually somewhat tree-structured - they have different parts in them, ie there are child sub-diagrams inside the whole diagram. So, you can recursively do this process again for each additional 'sub-diagram' you would like to put in the illustration, basically doing breadth-first search to build up the illustration.