/tlaplus:tla-getting-startedfrom tlaplus
This skill provides introductory guidance for learning TLA+ and writing first specifications. It should be used when the user asks to "learn TLA+", "what is TLA+", "TLA+ tutorial", "get started with TLA+", "first TLA+ spec", "TLA+ basics", "new to TLA+", "TLA+ introduction", "how to write TLA+", "TLA+ help", "TLA+ example", "write a spec", "TLA+ spec template", "formal specification", "create a spec", "model a system", or the user mentions wanting to understand TLA+ fundamentals.
Ships in tlaplus. 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.
Introductory guidance for learning TLA+ and writing first specifications.
TLA+ is a formal specification language for designing, modeling, and verifying concurrent and distributed systems. It enables modeling system behavior, finding bugs early through exhaustive verification, and serving as precise documentation. In practice, TLA+ is used to find concurrency bugs before writing code and to verify the correctness of distributed protocols, saving significant debugging time in production systems.
TLA+ specifications describe state machines with states (variable snapshots), initial states (Init predicate), transitions (Next action), and behaviors (sequences of states).
Every TLA+ spec follows this pattern:
---- MODULE SpecName ----
EXTENDS Naturals \* Import standard modules
VARIABLES x, y \* Declare state variables
Init == x = 0 /\ y = 0 \* Initial state
Next == x' = x + 1 \* State transitions
/\ y' = y + x
Spec == Init /\ [][Next]_<<x,y>> \* Complete specification
====
Key elements: Module declaration (---- MODULE Name ---- / ====), EXTENDS for imports, VARIABLES for state, Init (no primes), Next (uses x' for next-state), Spec formula combining Init and Next.
---- MODULE Counter ----
EXTENDS Naturals
CONSTANT MaxValue
VARIABLES count
Init == count = 0
Increment == count < MaxValue /\ count' = count + 1
ReachMax == count = MaxValue /\ count' = count
Next == Increment \/ ReachMax
TypeInvariant == count \in Nat
BoundInvariant == count <= MaxValue
Spec == Init /\ [][Next]_<<count>>
====
Configuration file (Counter.cfg):
CONSTANT MaxValue = 5
SPECIFICATION Spec
INVARIANT TypeInvariant
INVARIANT BoundInvariant
/tla-parse @Counter.tla - validate syntax/tla-smoke @Counter.tla - quick 3-second check/tla-check @Counter.tla - exhaustive model checkingSuccess: TLC reports "Model checking completed. No errors." Failure: TLC shows counterexample trace violating an invariant.
MaxClients, activeConnections, AcceptConnection (not M, x, A1)x' = x + 1 not x = x + 1 in actionsx = 0 not x := 0x > 0 not x' > 0)See references/syntax-basics.md for the complete syntax reference covering operators, data types, standard modules, and common code patterns.
Working specifications in examples/: Counter.tla, Counter.cfg, SimpleLock.tla, SimpleLock.cfg
tla-model-checking skill/tla-parse - Parse and validate syntax/tla-smoke - Quick smoke test/tla-symbols - Extract symbols and suggest config/tla-check - Full model checking/tla-review - Check specs against best practicesWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
12 skills in this plugin
/tla-checkThis skill runs exhaustive model checking to verify all reachable states of a TLA+ specification using TLC. It should be used when the user asks to "check my spec", "run TLC", "verify my TLA+ spec", "find invariant violations", "exhaustive model checking", "check for bugs in my spec", "model check", "exhaustive check", "verify all states", "run model checker", "verify invariants", "check properties", "check temporal properties", "check liveness", "full check", "check all states", "check safety", or "verify properties"./tla-create-animationsThis skill guides the creation of animations that visualize TLA+ specifications during model checking or trace exploration. It should be used when the user asks to "create animation", "animate my spec", "visualize state transitions", "show me what's happening", "TLA+ animation", "trace visualization", "see state changes", "render animation in terminal", "ASCII animation", "SVG animation", or "show animation in browser"./tla-debug-violationsThis skill provides a systematic workflow to isolate and diagnose TLA+ invariant or property violations. It should be used when the user mentions "invariant violated", "TLC found a bug", "counterexample", "property failed", "violation trace", "debugging TLA+ violations", "error trace", "why did TLC fail", "fix my spec", "TLC error", "trace analysis", "deadlock found", or "lasso-shaped counterexample".npx claudepluginhub photoszzt/tlaplus-ai-tools --plugin tlaplus