State-diagram skill for Claude Code: project memory turns gotchas into explicit flow conditions

DJIRNMAN · reddit · 2026-11-02

The author added a state-diagram skill to MEX, an open-source project-memory tool for Claude Code and Codex, after finding Claude's textual flow explanations hard to picture. Unlike plain Mermaid output, MEX injects recorded project decisions and gotchas into the diagram with inspectable code references.

Demoed on MEX's own setup/recovery flow: code analysis covered normal pauses, retries, and saves, but a project note surfaced an awkward case — rebuilding the CLI while an old setup process still runs removes a module that process references, and Retry doesn't refresh its cached imports. That changes the recovery path: you need a fresh CLI process but can reuse prepared setup files; the diagram spells out the conditions (old process exited, build coherent, prepared files exist).

Diagrams can be requested in-conversation or explored in a local Hub with transitions, conditions, and evidence; the skill also supports TLA+/TLC checks on the modeled rules. Repo: github.com/mex-memory/mex

Related event: MEX adds state-diagram skill to help Claude Code visualize project logic(2 posts)→

Original post →

More from coding & agent

coding & agent channel →