/pstack:statechartfrom pstack (adattato)
Draw what an app's user sees as a Mermaid statechart from a TLA+ model. States are gray if they work, red if still wrong, and green if fixed. Each bug TLC finds is a numbered path. Use for /statechart, "show the PM the bug", or to turn an agreed chart into a TLA+ skeleton.
Ships in pstack (adattato). Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
The chart shows what an app's user sees. A PM reads it to decide whether that behavior is right. Label each state with what is on the screen, such as "Paying". Label each step with what the user does or sees happen, such as "tap Pay" or "the charge goes through". Keep variable and action names out of labels. The scripts call this user the reader, as in readerActions and reader steps.
Run node <skill dir>/scripts/statechart.mjs --help for the commands and for how to read a chart. Work in a scratch folder outside the repo. The command writes its files next to its input.
Use from-spec when a TLA+ model exists or the code is concrete enough to model. Use from-chart when there is no model and the PM should agree on the behavior before anyone writes or changes the code.
If the code already has a TLA+ spec, start from a copy of that spec. Add the variables the user sees, and keep the spec's existing invariants. To audit the code against that spec, make the copy model what the code does, and pass the spec unchanged as --against. In a new spec, tie every variable and action to code that a reviewer can open, and take its name from that code. Make each action one indivisible step in the code.
Settled == ~ENABLED System, where System is the disjunction of the actions the user does not take. Report each broken rule as a bug. Never weaken a rule to make the chart pass.from-spec, then fill in the mapping file it writes. Put the labels in state and step, and list the user's actions in readerActions by action name. When two bugs end on the same screen through different code paths, add cause and make it name the code path. To color the states by what the PM cares about, such as "Toast shown", return that group from group. The legend names the groups, and states that break a rule still get a red border.--fixed.--png and look at every PNG. Check that each numbered path reads in order. If a label reads like code, fix state or step and run the command again.%% never line per rule, with the PM's sentence. Draw "the app closes" as an edge to the state the user sees next.from-chart. If a rule breaks, the agreed chart has a design bug. Take the bug to the PM.from-chart wrote, and run from-chart again. For each difference it prints, ask the PM whether the code is wrong or the chart needs a correction.Give the PM the PNG and the Mermaid source of each chart. Add one line per bug with the rule it breaks, its steps as the chart numbers them, whether it reproduced, and whether the open fix fixes it. Take every count you quote from summary.json. Attach stories.md and the command that regenerates everything. Say what the model leaves out.
scripts/chart-to-tla.mjs (opens in a new tab)scripts/compare-charts.mjs (opens in a new tab)scripts/lib.mjs (opens in a new tab)scripts/model/OutputFolder.cfg (opens in a new tab)scripts/model/OutputFolder.map.mjs (opens in a new tab)scripts/model/OutputFolder.tla (opens in a new tab)scripts/statechart.mjs (opens in a new tab)scripts/test/statechart.test.mjs (opens in a new tab)scripts/test/sync.mmd (opens in a new tab)scripts/test/upload.mmd (opens in a new tab)scripts/tlc-to-chart.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub dox-op/ep-skills-marketplace --plugin pstack57 skills in this plugin
/architectSketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape./arenaSpawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape./automate-meUse for "automate me", "create/update/refresh my -mode skill", "turn/capture my preferences or working style into a skill", or wanting agents to follow how the user works. Drafts or revises a personal -mode skill via the runtime's skill authoring + unslop, optionally pulling fresh evidence from recent transcripts.Other plugins' skills for the same job