mex-statechart
Agent skill frommex-memory/mex
Explain complicated existing behavior using checked state diagrams. Use when asked for a state diagram, to diagram the previous explanation, show a bug or recovery path, compare a proposed fix or existing TLA+ spec, or derive a model from an agreed chart. Generates native Mermaid and a readable terminal fallback; optionally view and explicitly save in MEX Hub.
How to install mex-statechart
install mex-statechart
# install the mex pack with the skills CLI
npx skills add mex-memory/mex# or add only this skill to Claude Code: copy the folder
skills/mex-statechart/
# into
~/.claude/skills/mex-statechart/ (all projects)
.claude/skills/mex-statechart/ (one project)
1# MEX statechart23Make behavior easier for a human to understand. Generate only on user intent. If a diagram would obscure the explanation, use a better explanation. A prior agent answer identifies the subject; verify it independently against current code.451. Identify the bounded subject, reader, and implemented/proposed/agreed-model scope. Read current source and useful tests. Query `mex wiki query "<subject>" --limit 5 --json` before broad knowledge discovery; inspect matched terms and grounding health, then read live records. Fall back to Router-directed Markdown if unavailable. Use bounded `mex timeline --query "subject" --file known/path --limit 10 --json` only when history might matter. Verify historical applicability. Fresh Graph may locate evidence; call edges are not state transitions. Never refresh indexes on a read.62. Retain context only when it changes or explains a state, event, condition, rule, exception, recovery, or abstraction. Record the precise connection and provenance. Keep source/requirement conflicts visible. Omit irrelevant context; do not manufacture a MEX contribution.73. Read [the baseline modeling workflow](references/upstream-workflow.md) and [runtime instructions](references/toolchain.md). Preserve TLA+ and real TLC checks in normal generation. Reuse agreed rules with provenance; seek agreement only for new inferred rules or material conflicts. Never weaken a rule to get a passing result.8…
Excerpt shown under the repository's MIT license.
