statechart
Skill0 starsChanged 7 days agoMITView on GitHub
Use only when the user asks for /statechart, to model-check or draw a flow, protocol, service, or state machine as a checked statechart, or to show a bug as a path through states.
50 other projects use a version of this, 39 of them edited.
Adopted by
Most recently taken up by
- Gabriel-Lafrance/Skillsword for word, first seen Nov 29, 2026
- pasevin/pstack-portable-skillsedited, first seen Nov 29, 2026
- itsmeyaw/skillsedited, first seen Nov 29, 2026
- mlschodkowski/skillsedited, first seen Nov 29, 2026
- the-inconvenience-store/skillsedited, first seen Nov 29, 2026
- MondayNotAGoodDay/skillsedited, first seen Nov 29, 2026
Used with
Projects with it also use make-bot-ui, reframe and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
eryzerzSkillmake-bot-ui
Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.
Also in 10 projects that use this
rohunvoraSkillreframe
This skill should be used when the user is stuck, obvious solutions aren't working, constraints feel impossible, or they keep circling back to bad options. Use when designs keep getting rejected or the user is solving symptoms instead of root causes.
Also in 11 projects that use this
JordanHoodSkillguardrails
Safety hooks for Claude Code that protect against destructive operations, enforce write boundaries, and gate sensitive actions. Essential when running autonomous workers with --dangerously-skip-permissions. Use when: setting up a new Claude Code environment, configuring safety for dispatch/pipeline workers, or auditing existing hook coverage.
Also in 3 projects that use this
AnasX7Skillshow-me
Help the user understand the current topic visually with concise diagrams, code-shape sketches, and focused HTML artifacts.
Also in 6 projects that use this
SentrySkilldeslop
Strip AI-generated noise from the diff before pushing — extra comments a human wouldn't write, defensive try/catch in trusted code paths, casts to any, inline imports in Python, and other style inconsistencies with the surrounding file. Use this immediately before commit so the diff stays clean.
Also in 5 projects that use this
MicrosoftSkillwriting-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
Also in 5 projects that use this
Other versions50 projects use a version of this.
Word for word · 1
- Gabriel-Lafrance/Skills★ 0100% same
Edited · 39
- Yeachan-Heo/oh-my-claude-sisyphus★ 41k14% same
- Yeachan-Heo/oh-my-claudecode★ 41k14% same
- backnotprop/pstack★ 5.4k15% same
- Dimon94/dverity★ 10715% same
- Dimon94/skills★ 10715% same
- TencentBlueKing/bk-lite★ 7715% same
- painhardcore/pstack★ 2215% same
- mariusflorescu/pstack-t3★ 1315% same
- Scino/fstack★ 1315% same
- adjohn/pstack★ 1215% same
29 more not listed
Wrote their own version · 10
- jtaroreh/agystack★ 142same name
- TheOnlyFusionCube/potetos-for-everyone★ 21same name
- creedants/pstack-t3★ 19same name
- umararshad4/honey-stack★ 6same name
- alexderz/agentic-toolbox★ 5same name
- requie/endostack★ 4same name
- fullerzz/agent-skills★ 2same name
- dip497/onmywatch★ 1same name
- upamune/skills★ 1same name
- DarthJonathan/guac-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ask-gabrielSkill
- babysit-prSkill
- councilSkill
- create-formal-verification-skillSkill
- gabriel-modeSkill
- grill-meSkill
- hillclimbSkill
- maintain-formal-verification-skillSkill
- review-loopSkill
- reviewSkill
- rulesSkill
- setup-gabriel-skillsSkill
- takeover-prSkill
- taskSkill
- test-auditSkill
- verificationSkill
- write-ticketSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 49 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Every run, before judging the model against the code it describes: code-quality.md, code-structure.md.
- Very specific: line 27
Run and read: Run the command, then read the report with reading the report: breaks and mayBreak marks, the Legend, rules not checked, and …
- Very specific: line 28
Show the result: If the command wrote chart.mmd, show it as a mermaid code block.
“Common” is measured: kept by at least 6 in 10 of the 49 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Statechart
Check a TLA+ model of a system that moves between states and draw it as a Mermaid statechart in the reader's words. The checker tries every order of steps up to a bound, marks each state that breaks a rule, and gives the shortest path to each one. The reader, the person who owns the behavior, decides whether the behavior is right.
Adapted from pstack's statechart (MIT). The chart engine in scripts/ is vendored verbatim; see provenance.
Read when
- Every run, before judging the model against the code it describes: code-quality.md, code-structure.md.
- Reading the report, rendering an image, or updating the engine: reference.md.
- Writing the hand-off: plain language.
Process
- Set up. Work in a scratch folder outside the repo. The command is
scripts/statechart SPEC.tla [--config FILE] [--view FILE] [--out DIR]from this skill's folder. It is TypeScript, so it needs Node 22.18 to 22.x, Node 23.6 or later, Bun 1.1.5 or later, or Deno 2.0 or later. The first run installs TLC and Java withmiseand needs the network; or setTLA2TOOLSto atla2tools.jarpath andJAVAto a Java 11 or later binary. - Write the spec and config. Create an adjacent
SPEC.cfgor pass a config with--config. SetINITandNEXTorSPECIFICATION, and list each agreed invariant withINVARIANT. Add variables when a rule needs them. Never weaken a rule to make it hold. WriteNextas a disjunction of named actions so TLC can name each step. Give intended terminal states a no-op action, such asDone == phase \in {"paid", "failed"} /\ UNCHANGED vars, to avoid a spurious deadlock. - Pick the chart. The judgment is yours: the words on each state and arrow, the phases and their colors, the title, and the report to the reader. Put it in a view module and pass it with
--view. The view exportsstate(vars): a string gives a flat chart (v.paid ? "Paid" : "Paying"), an array gives parent states (v.main.split(".")), and an object gives one parallel region per key ({ Playback: v.playback, Volume: v.volume }). Label each state with what the reader can see or cares about; keep variable names out of labels. A TLA+ sequence arrives as an object with keys from 1, and a set as an array. - Label the arrows. The view can export
step(action, from, to), returning the arrow label as the user sees it happen, such as "you press play" or "the connect fails". Never name the code or the TLA+ action. Two actions that end the same get the same label, so they share one arrow. End a label with its condition in brackets when a step happens only sometimes, such asyou press play [while the file loads]; in a regions chart skip brackets for conditions on other regions, since the command writes those itself. When a hidden value decides where a step goes, name the result instead, such as "the roster read fails". The view can also exportgroup(vars)for phase colors,colors, andtitle. Each function runs at most once per model state or step, so make it depend only on its arguments. - Keep it readable. Aim for about 20 arrows or fewer. Start with coarser
state()labels: one label for values that act the same, and leave out detail the reader does not need. Keep every state on a bug path and every mark. Never merge two states that break different rules. Still too busy: returnnullfromstep()for steps the reader does not need, keeping every state reachable from a start state, at least one arrow out of each state that has one in the model, and all or none of the steps behind one arrow. Say in the hand-off which steps the chart hides. A step that stays inside one label is not drawn; split the label when the reader must see it. - Run and read. Run the command, then read the report with reading the report:
breaksandmayBreakmarks, the Legend, rules not checked, and the 500-state chart budget all have fine print that changes what a result means. - Show the result. If the command wrote
chart.mmd, show it as amermaidcode block. Otherwise give the report and explain the chart limit. Render SVG on request or when the chart is too large to read as text, following render a chart. - Hand off. Give each chart and its Mermaid text to the person who must decide. Add one line per bug: the rule, the reader's sentence for that rule, and the path as the report numbers it. Say what the model leaves out, and give the command that makes the files again with a new
--outfolder. When the model describes code, replay each bug path against the real code, as a test or a live repro, one step per action. If a bug does not occur there, treat the model as wrong until you show it is not.
If a parent already owns the next step
A project-local formal verification skill may name /statechart to read its results. Return the chart, the report findings, and what the model leaves out. The parent owns any fix. This skill never edits product code and never weakens a rule to reach a pass.
Anti-patterns
- Weakening an invariant, shrinking the model, or merging states until the marks go away
- Labels that name variables, code, or TLA+ actions instead of what the reader sees
- Reporting a bug path that was never replayed against the real code it claims to describe
- Editing the vendored engine in
scripts/to change a verdict
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

