Remix.run Logo
alxhslm 5 hours ago

I’ve found that Claude can make decent mermaid diagrams pretty reliably. Not sure I quite understand what problem Zindex solves

billyp-rva 4 hours ago | parent [-]

> I’ve found that Claude can make decent mermaid diagrams pretty reliably.

When doing this, do you give it a codebase and ask for a diagram, or is it more of an iterative back-and-forth where you describe the system to it.

bink-lynch an hour ago | parent | next [-]

I made a really big flowchart diagram of all of our services and how they interrelate by giving Claude Code the description of what I wanted starting at the entry point project and working its way through the entire system to the data ingestion point. I gave Claude my GitHub access token so it could look through or clone each repo it needed. I also had many of the projects already cloned in my workspace folder through years of working on the various projects.

Claude was able to determine the project, analyze the code, and infer the infrastructure. It worked through the projects as it went drawing a higher level diagram first. Then I iteratively asked for more detail around the sections I thought needed more detail.

This was just an experiment that I spent a few hours on. Months later I misplaced the mermaid markdown file so I asked Claude to reproduce the mermaid markdown from the png image so I could have it add more detail around another section that looked incorrect because it encapsulated the database and worker for one of the systems in a single box. The detail made the diagram in that area much more clear.

To me it is very good at writing/reading/reverse engineering mermaid diagrams.

easygenes 4 hours ago | parent | prev [-]

Claude tends to default to and do best with first making ASCII diagrams in markdown files, which you can then ask it to translate into Mermaid if appropriate.

Prompts like, "Please write a comprehensive report on _____ to work with _____. Include a holistic report on architecture and meaning and purpose of all involved systems. Describe the why and how of the changes in depth and include a full glossary of terms and systems. Write as a new .md in docs when you are sure there are no major gaps in your understanding. Include a report on the plan to _____."

Will be the rough shape you want to get it to dig through all the relevant code and make relevant architectural diagrams. Guide more or less towards specifics as appropriate. This has worked well since Opus 4.5.

billyp-rva 4 hours ago | parent [-]

Gotcha. So this is more for diagrams of new systems than existing ones. Our maybe a blend of new and old.

easygenes 3 hours ago | parent [-]

You could have it propose a spec or review a proposed spec to also get diagrams in a similar manner.