tla-plus
Skill174 starsChanged 29 days agoApache-2.0View on GitHub
Use when writing, model checking, reviewing or repairing a TLA+ or PlusCal spec, answering whether a concurrent algorithm satisfies a property, extracting a spec from code, or formally verifying a concurrent or distributed design.
- Installs packages
3 other projects use a version of this.
Adopted by
Most recently taken up by
- slytheros/sly_skillstheir own version, first seen Nov 29, 2026
- tstapler/dotfilestheir own version, first seen Oct 10, 2026
- apache/cassandratheir own version, first seen Oct 8, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- apache/cassandra★ 10ksame name
- tstapler/dotfiles★ 8same name
- slytheros/sly_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 repository74 other files it gives its agents.
- Rules/CLAUDE.mdCLAUDE.md
- Skills/ambitious-model-use/CLAUDE.mdCLAUDE.md
- Skills/authoring-claude-md/CLAUDE.mdCLAUDE.md
- Skills/bento-slides/CLAUDE.mdCLAUDE.md
- Skills/extract-wisdom/CLAUDE.mdCLAUDE.md
- Skills/ghostty-config/CLAUDE.mdCLAUDE.md
- Skills/llm-wiki/CLAUDE.mdCLAUDE.md
- Skills/llm-wiki/examples/CLAUDE.mdCLAUDE.md
- Skills/openspec-bootstrap/CLAUDE.mdCLAUDE.md
- Skills/openspeccer/CLAUDE.mdCLAUDE.md
- Skills/rewrite-slop/CLAUDE.mdCLAUDE.md
- Skills/skill-creator-primer/CLAUDE.mdCLAUDE.md
- Skills/tla-plus/CLAUDE.mdCLAUDE.md
- Skills/yue2-music/CLAUDE.mdCLAUDE.md
- ai-changelogSkill
- ambitious-model-useSkill
- analyse-designSkill
- apply-mantel-stylesSkill
- authoring-claude-mdSkill
- backlogSkill
- bento-slidesSkill
- code-reviewSkill
- code-simplificationSkill
- creating-development-plansSkill
- critical-thinking-logical-reasoningSkill
- deeperSkill
- deferred-task-executionSkill
- demo-recorderSkill
- excalidraw-diagramsSkill
- explainSkill
- extract-wisdomSkill
- find-docsSkill
- ghostty-configSkill
- githubSkill
- golang-developmentSkill
- graphifySkill
- grill-meSkill
- guided-demoSkill
- handoffSkill
- hardware-designSkill
- herdrSkill
- home-assistantSkill
- html-design-examplesSkill
- improve-codebase-architectureSkill
- json-schema-lookupSkill
- liteparseSkill
- llm-prompting-guideSkill
- ml-llm-wikiSkill
- llm-wikiSkill
- mermaid-diagramsSkill
- openspec-bootstrapSkill
- openspeccerSkill
- pptx-to-mdSkill
- private-software-distributionSkill
- prompt-enhancerSkill
- prototypeSkill
- prototyping-logos-iconsSkill
- python-developmentSkill
- raspberry-pi-pico2Skill
- release-debriefSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
4
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
- Very specific: line 13
Run command -v tla before the first check.
- Distinctive: line 19
Create a task per step below, phrased with its completion criterion, then work them to completion.
- Distinctive: line 30
When the design is wrong, keep that cfg as the failing variant.
- Very specific: line 32
Liveness, when claimed: Add it after safety passes.
- Distinctive: line 42
Read the one that matches the task in front of you.
- Distinctive: line 75
tla-rs is a young checker: When a result carries real weight, say in the report that it has not been confirmed with TLC.
“Common” is measured: kept by at least 6 in 10 of the 3 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
A spec is trusted because of checker runs. Every claim made about a spec names the run behind it: the constants, the properties checked, the state count.
The checker is tla (tla-rs, written in Rust). This skill uses no Java tooling, so TLC, SANY, Apalache and the PlusCal translator are unavailable. Write pure TLA+.
Run command -v tla before the first check. If it is missing, ask the user whether to install it with cargo install tla-checker, and install only after they agree, because it downloads and compiles a third-party package. If they decline, write the spec and report that nothing was checked.
Workflow
To review or audit an existing spec, do steps 1 and 2, follow references/review.md in place of steps 3 to 8, then report as in step 9 with the findings in that file's format.
- Create a task per step below, phrased with its completion criterion, then work them to completion. With no task tool, keep the list in your reply.
- Scope. Read any existing
.tlaand.cfgfiles first. Then write one line for each of: the processes and their environment (network, clock, adversary); the failure model (crash, recovery, loss, duplication, reorder, Byzantine); what must never happen; what must eventually happen; the bounds of the model. Ask the user only what the code and documents cannot answer. - Sample behaviours. Before any module, write two behaviours as sequences of states: one normal run, and one containing the interleaving or failure most likely to break the design. Done when every step says which values change. The step boundaries give the grain of atomicity. Keep both in the module header comment, because step 6 replays them.
- Model in layers. Start from
assets/Template.tlaandassets/Template.cfg. Write constants, variables andTypeOK, thenInit, then one action at a time, thenNextandSpec, then the properties. Begin the.cfgwithCONSTANTSonly, and addSPECIFICATION,INVARIANTSandPROPERTYas each definition appears, because a cfg that names a missing definition fails. After each layer runpython3 scripts/tla_check.py Spec.tla --validate-onlyand fix what it reports before adding the next. - Skeleton check. Confirm all five before the first check run:
TypeOKhas one conjunct per variable, and every sentinel is excluded from its real domain by anASSUME.Initassigns every variable.Nextis a disjunction of named actions, each with a guard, an effect, andUNCHANGEDfor every other variable.- At least one invariant beyond
TypeOKstates what the system must guarantee, with a comment arguing why each action preserves it. - The module header lists the abstraction decisions and the grain of atomicity.
- Check. In the
.cfg, nameSPECIFICATIONand everyINVARIANTandPROPERTY, with the smallest constants that still exhibit the protocol. Replay both sample behaviours withpython3 scripts/tla_check.py Spec.tla --scenario FILEuntil each printsVERDICT: allowed(file format inreferences/modelling.md). Then runpython3 scripts/tla_check.py Spec.tla(--helplists the options). On a violation, read the trace as a behaviour and decide which is wrong: the model, the design or the property. Fix that one and run again. Done when a run printsVERDICT: pass.- When the design is wrong, keep that cfg as the failing variant. Put each candidate fix behind its own constant switch and check each alone before combining them. The smallest fix is the fewest switches that pass.
- Make it fail. A model that cannot fail shows nothing. Add a second
.cfg, or a constant switch, that removes a guard or enables a known attack, and run it with--expect violation --expect-property Name, naming the property you care about. Done when it printsEXPECTED violation Name: ok. A deadlock, or a different property failing, does not count. If the variant still passes, the property is too weak or the model never reaches the dangerous state. - Liveness, when claimed. Add it after safety passes. State the fairness assumption for each action that must make progress, and check the property through
PROPERTYin the cfg. The template'sFairnessandFinishesshow the shape. Delete them when no liveness is claimed. - Report. Give:
- the abstraction decisions: what the model leaves out and why
- each run: cfg, constants, properties checked, verdict, states and depth
- the scope: a pass for 3 processes is a bounded result, so say "checked for 3 processes", and name the checker and its version (
tla --version) - what was not checked: larger bounds, liveness, proofs
- for a design bug: the violating trace, restated in the system's own terms
References
Read the one that matches the task in front of you.
- Choosing variables, the grain of atomicity or action boundaries ->
references/modelling.md - A parse error, a
TypeOKidiom or a.cfgquestion ->references/syntax.md - An invariant fails or needs strengthening, or the task claims liveness ->
references/properties.md - The source of truth is existing code ->
references/code-to-spec.md - Reviewing or auditing a spec someone else wrote ->
references/review.md - Two specs at different levels of detail, or more than one module ->
references/refinement.md - The input is PlusCal ->
references/pluscal.md - An outside spec, paper or tutorial to compare against ->
references/sources.md - Agreement, leader election, replicated logs, Byzantine faults ->
references/domains/consensus.md - Message passing, queues, timeouts, failure handling ->
references/domains/distributed-programs.md - A production-scale system, or a model that feels too clean ->
references/domains/industrial.md - Adversaries, secrecy, authentication, tokens ->
references/domains/security.md - LLM agents, tool calls, orchestrators ->
references/domains/ai-agents.md - Class hierarchies, roles, capabilities, delegation ->
references/domains/agent-ontologies.md - A proof for all parameter values, or Lean 4 ->
references/domains/lean4.md
Checked examples sit under assets/examples/, and each domain reference names the ones that apply. python3 scripts/verify_examples.py re-checks all of them.
Checker gotchas
These differ from TLC, which is what most published TLA+ assumes.
- Unparsed definitions are warnings. tla-rs skips a definition it cannot parse, still prints
Validation passed, and can report a passing check.tla_check.pytreats the warning as an error, so validate and check through it. - Only the cfg is checked. A
THEOREMis parsed and skipped, as are proof steps. With no cfgINVARIANT, tla-rs guesses invariants from definition names. RECURSIVEafter another definition inside aLETdoes not parse. Declare recursive operators at module level.- Definitions are recomputed on every use. An expensive constant-level definition, such as a recursive transitive closure, can slow a check by tens of times. Write its value as a literal in the
MCmodule, substitute it with<-, and add anASSUMEthat the literal equals the definition. Seeassets/examples/ontology/. NatandIntare silently bounded to 0..100 and -100..100 unless--symbolic-integersis set.tla_check.pysets it.- Ignored cfg directives. tla-rs drops
ACTION_CONSTRAINT,ALIASandPOSTCONDITIONwith a warning and still reports a pass.tla_check.pyreturnsVERDICT: errorfor a cfg that uses one. - Unsupported syntax: infix operators spelt with new symbols such as
++(a predefined one such as\opluscan be defined),\EEand\AA, and theRealTimemodule. The full list is in the tla-rsSYNTAX_STATUS.md. - Trace arrows omit action arguments.
--[ Acquire ]-->does not say which process moved. Read the changed variables. - A timeout usually means the model is too big. Shrink the constants before raising
--timeout. - tla-rs is a young checker. When a result carries real weight, say in the report that it has not been confirmed with TLC.
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.

