cursor avatar

Statechart

Model-checked TLA+ state machines rendered as Mermaid statecharts, with shortest paths to rule-breaking states.

CCM score
58 of 100
skills.sh installs
2.1K
GitHub stars
19.4K
last updated
Nov 25, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers checking a TLA+ spec with TLC and drawing the reachable states as a Mermaid statechart with labeled arrows
  • Includes a runnable scripts/statechart launcher, a view module for state labels, step labels, phase colors, and title
  • Marks states that break a rule as breaks or mayBreak and shows the shortest path to each violation
  • Designed for product flows, protocols, and services, and for showing a bug as a path through states

Install

$ npx -y skills add cursor/plugins --skill statechart -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Statechart

The chart shows how a system moves between states, in the words of the person who reads it. That person, the reader, decides whether the behavior is right.

Run

Work in a scratch folder outside the repo. Write a TLA+ spec and its config. Then run:

<skill dir>/scripts/statechart SPEC.tla [--config FILE] [--view FILE] [--out DIR]

scripts/statechart.ts is TypeScript, so run it with a runtime that can execute TypeScript. scripts/statechart is a POSIX shell script that picks one. On native Windows, run node --disable-warning=ExperimentalWarning <skill dir>/scripts/statechart.ts with Node 22.18 to 22.x, or Node 23.6 or later.

The first run installs TLC and Java with mise and needs the network.

Write the spec

Details

Repository
github.com/cursor/plugins
First seen
Nov 25, 2026

More from cursor/plugins

All 93

Similar to Statechart