Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

statechart

Skill by michael-denyer

Checks a TLA+ model of a system that moves between states and draws it as a Mermaid statechart. The report gives the shortest path to each state that breaks a rule. Built for product flows, protocols and services.

  • Score 94
  • 5.2k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install statechart

Built from the published package, never by AI.

git clone --depth 1 https://github.com/michael-denyer/pstack-claude /tmp/pstack-claude && mkdir -p ~/.claude/skills && cp -r /tmp/pstack-claude/plugins/pstack/skills/statechart ~/.claude/skills/statechart

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install statechart in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The statechart skill checks a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service. It runs TLC on the model and draws the result as a Mermaid statechart. A state that breaks a rule is marked in the chart, and the report gives the shortest path to each such state.

The assistant writes the spec and an optional view module. The view sets the state labels, arrow labels, phase colors and title. The first run installs TLC and Java with mise and needs the network. It is meant for people who must decide whether a behavior is right, and for showing a bug as a path through states.

Written from the project's SKILL.md and checked against it.

What it can do

  • /statechart commandInvoked with /statechart or to show a bug as a path through states.
  • TLC model checkChecks each rule written as an INVARIANT in a TLA+ spec and reports the shortest path to a breaking state.
  • Mermaid statechartDraws the model as a Mermaid chart, with breaking states marked in the chart.
  • View moduleLets the assistant set reader-facing state labels, arrow labels, phase colors and a title.
  • Bug path reportLists each rule that breaks, its shortest path and the files TLC printed.
  • Chart renderingRenders charts with Pele when the user asks for an image or the chart is too large to read as text.

What you need

  • Java and TLC, installed by mise on the first run
  • Network access for the first run
  • Node.js 22.18 to 22.x or 23.6 or later, for native Windows
  • A runtime that can execute TypeScript

Try asking

  • /statechart check this checkout flow for states that break a rule
  • Write a TLA+ model of this login protocol and draw it as a statechart
  • Show this payment bug as a path through states

Good to know

  • Above 500 states, the chart draws only the paths to the rules that break.
  • After the first break, each TLC run stops at 100,000 distinct states.
  • States past a CONSTRAINT are not explored or checked for deadlock.
  • Rules that are not checked are listed in the report and not marked in the chart.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: plugins/pstack/skills/statechart/SKILL.md, plugins/pstack/skills/statechart/scripts/backends/cfg.ts, plugins/pstack/skills/statechart/scripts/backends/mermaid.ts, plugins/pstack/skills/statechart/scripts/backends/plain-text.ts, plugins/pstack/skills/statechart/scripts/backends/report.ts, plugins/pstack/skills/statechart/scripts/frontends/config.ts, plugins/pstack/skills/statechart/scripts/frontends/dot.ts, plugins/pstack/skills/statechart/scripts/frontends/marks.ts, plugins/pstack/skills/statechart/scripts/frontends/messages.ts. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md9 KB
  • references/render.md4 KB
  • scripts/backends/cfg.ts1 KB
  • scripts/backends/mermaid.ts9 KB
  • scripts/backends/plain-text.ts2 KB
Show all 412 files
  • scripts/backends/report.ts7 KB
  • scripts/bun.lock555 B
  • scripts/frontends/config.ts11 KB
  • scripts/frontends/dot.ts3 KB
  • scripts/frontends/marks.ts3 KB
  • scripts/frontends/messages.ts2 KB
  • scripts/frontends/spec.ts4 KB
  • scripts/frontends/trace.ts988 B
  • scripts/frontends/value.ts5 KB
  • scripts/frontends/verdict.ts2 KB
  • scripts/frontends/view.ts4 KB
  • scripts/ir.ts15 KB
  • scripts/janitor.ts549 B
  • scripts/kill.ts440 B
  • scripts/package.json233 B
  • scripts/passes/annotate.ts4 KB
  • scripts/passes/label.ts8 KB
  • scripts/passes/lift.ts3 KB
  • scripts/passes/loop-check.ts2 KB
  • scripts/passes/paths.ts2 KB
  • scripts/passes/reach.ts4 KB
  • scripts/passes/region-check.ts3 KB
  • scripts/passes/regions.ts9 KB
  • scripts/pipeline.ts3 KB
  • scripts/run.ts19 KB

And 382 more files on GitHub.

Alternatives to statechart

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

statechart: common questions

What does the statechart skill produce?

It produces a Mermaid statechart of the model and a report. The report gives the shortest path to each state that breaks a rule.

Can it show a bug as a path through states?

Yes. The chart shows the states after a bug, and the report lists the path TLC found to each state that breaks a rule.

Does it need a model of the real system?

You must write a TLA+ spec of the system. The skill advises replaying each bug path against the real code when the model describes code.

How do I install statechart?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is statechart free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is statechart safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to statechart?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

statechart Install

Add to stack

Loading.