/tla-workbenches:tla-checkfrom tla-workbenches
Writes executable TLA+ specs and TLC model configs from natural-language system designs, runs TLC model checking, and interprets pass/fail results with counterexamples.
Ships in tla-workbenches. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
*.tla*.cfg.tla-check/runs/<run-id>/... (logs and a JSON trace when TLC reports a counterexample)WF_/SF_), or explicitly say "none (safety-only run)".CONSTRAINT / ACTION_CONSTRAINT, list each one and the behavior it excludes.Ask for (and record) answers:
WF_/SF_)If the user doesn't specify bounds, propose minimal ones (and label them as "proposed"):
Use a consistent structure:
CONSTANTS for bounded sets (e.g., Nodes, Values).VARIABLES for state.Vars == <<...>> as a single canonical variable tuple name. Use the same casing (Vars) everywhere.TypeOK (type invariant) to keep the model honest.Init and Next (with UNCHANGED for untouched vars).Spec == Init /\\ [][Next]_Vars.Spec with explicit fairness assumptions, e.g. /\\ WF_Vars(SomeAction) or /\\ SF_Vars(SomeAction)..cfg.Prefer modeling the design over implementation details. If the design is fuzzy, model the uncertainty explicitly with nondeterminism and constraints.
Maintain a compact checklist that maps each natural-language requirement to one of:
.cfg).cfg)When reporting results, include this ledger (or a short version) so it's obvious what passed vs what was never encoded.
.cfg (Make the Model Check Run)Baseline config (edit as needed):
SPECIFICATION Spec
\* Or:
\* INIT Init
\* NEXT Next
CONSTANTS
\* Example:
\* Nodes = {n1, n2, n3}
\* Values = {v1, v2}
INVARIANT
TypeOK
\* Add safety invariants here
CHECK_DEADLOCK TRUE
Deadlock policy:
CHECK_DEADLOCK TRUE by default.If you introduce CONSTRAINT / ACTION_CONSTRAINT, call it out as a coverage tradeoff and report what behavior it removes.
Prereqs:
java on PATHjq on PATHtla2tools.jar available and pointed to by TLA2TOOLS_JAR (or pass --jar)Run (from the tla-check skill directory):
scripts/tlc_check.sh --spec path/to/Foo.tla --cfg path/to/Foo.cfg
The runner uses TLC's stable -tool messages and converts counterexample states to JSON. This keeps it compatible with released TLA+ distributions without scraping presentation-oriented console text.
This writes a run directory under the spec folder:
.tla-check/runs/<run-id>/summary.json.tla-check/runs/<run-id>/tlc.stdout.tla-check/runs/<run-id>/tlc.stderr.tla-check/runs/<run-id>/counterexample.json (only if TLC produced one)If TLC fails:
If TLC passes:
scripts/tlc_check.sh: run TLC in tool mode, capture logs, and emit summary.jsonscripts/tlc_trace_summary.sh: summarize a counterexample.json into step-by-step diffs (optional helper)references/spec_skeleton.md: minimal skeleton patterns and cfg snippetsWhat SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
npx claudepluginhub younes-io/agent-skills --plugin tla-workbenchesOther plugins' skills for the same job