Not loaded · from upamune-skills
Checks TLA+ models with TLC and visualizes state transitions as Mermaid diagrams. For Lean 4 proofs, draws lemma dependencies and proof trees, flagging unproven gaps, failing steps, native code, and custom axioms.
Claude Code won't load this skill
It ships in upamune-skills at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
The chart shows how a TLA+ system moves between states or how a Lean 4 theorem is proved, in the words of the operator who must decide whether the behavior or proof is right.
scripts/statechart.ts is TypeScript, so run it with a runtime that executes TypeScript. scripts/statechart is a POSIX shell script that picks Node 22.18 to 22.x, Node 23.6 or later, Bun 1.1.5 or later, or Deno 2.0 or later. 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 CLI auto-dispatches on the first positional argument.
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]
The first TLA+ run installs TLC and Java with mise and needs the network. --tactics applies only to .lean files and exits 2 on .tla inputs.
Run against any .lean file pinned to Lean v4.34.1 (or a standalone .lean file with no lean-toolchain):
<skill dir>/scripts/statechart FILE.lean THEOREM [--view FILE] [--tactics] [--out DIR]
THEOREM accepts a full declaration name or a unique dotted suffix in FILE.lean. Unsafe declarations and non-theorem definitions exit 2.--out to a scratch folder outside the repo so generated charts stay out of your checkout. Without --out, the output goes to <short-theorem>-proof beside FILE.lean. The folder must be new or empty.--view FILE applies a plain-English view module to lemmas.mmd and proof.mmd.--tactics adds raw Lean tactic lines back inside proof.mmd boxes for Lean authors. Without it, boxes show claims, new local assumptions, invoked lemmas, and proof outcomes, while report.md keeps the full hypotheses and tactic scripts.--config applies only to TLA+ specs and exits 2 on .lean inputs.LEAN_SYSROOT, then lean and lake on PATH from the package root, then a pinned mise http:lean install for v4.34.1. Every resolved binary must report v4.34.1; any other pin or binary version exits 2.lake setup-file in place, which writes the gitignored .lake/ folder and may create lake-manifest.json if the package has none. Tests copy packages into temporary folders so the checkout stays clean.Next as a disjunction of the actions, such as YouPressPlay \/ YouPressStop. If you do not, TLC names every step Next.NoDeadlock, also when it is a correct end state. When an INVARIANT or a PROPERTY already has that name, the rule is CHECK_DEADLOCK. Add to Next an action that is true only in the end states and changes nothing, such as Done == phase \in {"paid", "failed"} /\ UNCHANGED vars, and give it a label in step().You do the work that needs judgment: the words on each state and arrow, the phases and their colors, the title, and the report to the operator. Put your work in a view module, and give it with --view.
To show the operator's words, the view exports state(vars). The value that state() returns picks the form:
export const state = (v) => (v.paid ? "Paid" : "Paying");export const state = (v) => v.main.split(".");export const state = (v) => ({ Playback: v.playback, Volume: v.volume });Label each state with what the operator can see or cares about, such as "Paying" or "Lease held, write pending". Keep variable names out of labels. In vars, a TLA+ sequence is an object with keys from 1, so v.pc[1] is pc[1]. A set is an array.
The view can also export step(action, from, to). It gets the TLC action name and the values before and after the step, and it returns the label of the arrow. Write each step label as the operator sees it happen, such as "you press play" or "the connect fails". Do not name the code or the TLA+ action. Two actions that end the same in the chart get the same label, so that they share one arrow.
When a step can occur only in some conditions, end its label with the condition in brackets, in the operator's words, such as you press play [while the file loads]. In a regions chart, the command writes the condition on the other regions on the arrow, in the words of their labels, such as [when Offline]. Your brackets replace it, and two arrows from one state can then look the same. So in a regions chart, do not write brackets for a condition on another region. When a value that no label shows decides where a step goes, name the result in the label, such as "the roster read fails".
The view can also export these:
group(vars) returns the name of a phase. Each chart state gets the color of its group. When the model states behind one chart state are in different groups, that state gets no color.colors gives each group name a color class.title is a string that the chart shows at the top.The command calls state() and group() at most once for each model state, and step() at most once for each step. The chart and the report both use those answers. Make each function depend only on its arguments.
The chart does not draw a step that stays in one label. Split a label when the operator must see such a step.
Aim for about 20 arrows or fewer, because a busier chart is hard to read. First return coarser labels from state(). Give one label to values that act the same, and leave out a detail that the operator does not need, such as a call in flight whose return changes nothing. Keep each state of a bug path, and keep each mark. When a merge changes a breaks state to mayBreak, it hides where a rule breaks. Do not merge two states that break different rules, because the operator then cannot see which rule breaks where. If the chart is still too busy, return null from step() for the steps that the operator does not need, such as a reset that every state has, or a step whose arrow repeats what other arrows show. Obey these rules when you hide steps:
breaks. When only some model states behind it break the rule, it has the class mayBreak. The Legend names the rules of each mark. When two rules break, it names both on one mark, so say in the hand-off which state breaks which rule. In a regions chart, a state gets a mark when each combination of region states that includes it can break a rule. When a combination can break a rule and none of its states has a mark, each state in that combination gets a mark.tlc.out is what TLC printed on the config as written. When the chart does not show the bug path of a rule that breaks, tlc-RULE.out is what TLC printed for the run that found it. When TLC repeats its first warning, plain TLC prints it twice, but tlc.out shows it once, because TLC leaves the second copy out of the output that this command reads. That happens only when Java runs with -XX:+UseParallelGC, since otherwise TLC's first warning is its advice to pass that flag, which it prints once.One command elaborates FILE.lean once and writes up to four files into --out:
lemmas.mmd: Angle 1 theorem dependency flowchart (flowchart TD), capped at 60 nodes. By default, each lemma leads with its docstring summary (clipped on word or clause boundaries) above its short name, and the legend notes Arrows mean uses. Solid edges cross compiler auxiliaries only. Dotted via def edges cross user definitions, opaques, or inductives. Thick edges trace shortest unproven paths.proof.mmd: Angle 2 proof tree (flowchart TD), written when the theorem has tactic steps and capped at 40 blocks. By default, boxes omit type and binder preambles, omit raw tactic scripts, translate standard Lean case tags (mp, mpr, inl, inr, zero, succ, nil, cons, true, false) into plain English, strip repeated parent prefixes like mp. from nested splits, and show claims, new local assumptions, invoked lemmas, and outcomes (Proven, Unproven gap (sorry), Failing step, Depends on unproven gap). Pass --tactics to show raw tactic lines inside boxes.report.md: Audit verdict, shortest unproven paths, full axiom list, untruncated hypotheses, goals, and tactic scripts per block, lemma statements, and Lean diagnostics scoped to the target theorem.facts.json: Versioned JSON (format: 1) written by scripts/lean/Extract.lean.--view for non-math readersFor an operator who is not a Lean author, lead with the plain-English lemmas.mmd chart and treat proof.mmd as an optional drill-down. Put plain-English titles, claim summaries, group names, and branch descriptions in a --view FILE module:
title: a string, or { lemmas?: string, proof?: string }.lemma(info): returns a plain-English string, { label, group?, hide? }, null (to hide a clean low-level plumbing lemma), or undefined.group(info): returns a plain-English subgraph title (replacing raw module names), null, or undefined.branch(info): returns a plain-English string or { label, detail? } for a proof-tree node. info carries stable id ("root", "root.0", ...), goal, newHyps, tactics, lemmas, status, caseTag, rawCaseTag, depth, isRoot, isLeaf, and times. When times > 1 folds branches with different goals, info.goal is "" and info.newHyps is empty.caseLabel(tag, info): returns a plain-English edge label for a split branch, or undefined.Soundness rules enforced by the compiler:
sorry, any node with a failing step, any custom axiom, any native computation node, or any lemma that depends on an unproven gap or axiom. Attempting to hide one exits 2.checkAxioms still agrees with Lean.collectAxioms, and notes the hidden count in both the chart legend and report.md. Say in the hand-off which supporting lemmas the view hides.0: closed proof resting on propext, Classical.choice, and Quot.sound at most.1: audit finding (sorry, failing step in the target theorem, open goal, unchecked native code such as native_decide or Lean.ofReduceBool, or a custom axiom).2: invalid arguments, bad --view export or soundness violation, unsupported Lean pin, module-header file, missing or ambiguous theorem, or a hard invariant failure (checkAxioms or checkTree).130 or 143: SIGINT or SIGTERM stopped the run, killed the worker process group, and wrote nothing.Because tactic extraction elaborates package code, Lean charts explain proofs and do not replace a standalone build or axiom verification gate.
Show chart.mmd (for TLA+) or lemmas.mmd (leading for non-math readers) and proof.mmd (for Lean 4) to the operator as mermaid code blocks. For TLA+, the chart has a budget of 500 states, counted by TLC on the config as written. Above that, the chart draws only the paths to the rules that break, and when no rule breaks, the command writes no chart.mmd. It still checks each rule, and the report gives the state count and each bug path. To see the whole graph, make the model smaller.
Render charts with Pele. When the operator asks for an image, or a chart is too large to read as text, follow references/render.md. Do not use a different renderer unless the operator asks for it.
Give each chart and its Mermaid text to the operator who must decide. For TLA+, add one line for each bug: the rule, the operator's sentence for that rule, and the path as the report numbers it. Say what the model leaves out. For Lean 4, lead with the plain-English lemma chart, include proof.mmd as an optional drill-down, list each unproven path and exit verdict from report.md, and note any supporting lemmas hidden by --view. Give the command that makes the files again, with a new --out folder.
When a TLA+ model describes code, replay each bug path against the real code, as a test or a live repro, one step for each action. If a bug does not occur, treat the model as wrong until you show that it is not.
references/render.md (opens in a new tab)scripts/backends/cfg.ts (opens in a new tab)scripts/backends/mermaid.ts (opens in a new tab)scripts/backends/plain-text.ts (opens in a new tab)scripts/backends/report.ts (opens in a new tab)scripts/frontends/config.ts (opens in a new tab)scripts/frontends/dot.ts (opens in a new tab)scripts/frontends/marks.ts (opens in a new tab)scripts/frontends/messages.ts (opens in a new tab)scripts/frontends/spec.ts (opens in a new tab)scripts/frontends/trace.ts (opens in a new tab)scripts/frontends/value.ts (opens in a new tab)scripts/frontends/verdict.ts (opens in a new tab)scripts/frontends/view.ts (opens in a new tab)scripts/ir.ts (opens in a new tab)scripts/janitor.ts (opens in a new tab)scripts/kill.ts (opens in a new tab)scripts/lean/Extract.lean (opens in a new tab)scripts/lean/backends/lemma-chart.ts (opens in a new tab)scripts/lean/backends/mermaid.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tla+, lean4, formal-verification, model-checking, proof-visualization, mermaid
npx claudepluginhub upamune/skills --plugin upamune-skills107 skills in this plugin
/animateBuild an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations./animation-vocabularyReverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one./apple-designApple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces./archifyCreate validated architecture, workflow, sequence, data-flow, lifecycle/state, ERD, class, tree, timeline, and waterfall diagrams as explorable standalone HTML with dark/light themes, motion and image/SVG/WebM export. Accept requirements or Mermaid; inspect repository evidence for code-backed diagrams. Use when visualizing systems, API calls, pipelines, schemas, histories, timings, or everyday steps, parts, relationships and states. Also turn an answer into a one-page explainer, with the conclusion first, structured panels, native diagrams and charts, when the user asks for a page, an explainer or an answer to share (做成一页, 用页面讲), or proactively when the user's rules opt in with an [archify explainer: ...] line. Not for dashboards./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.5 plugins ship this exact skill · first indexed Nov 29, 2026
Other plugins' skills for the same job