/tlaplus:tla-explorefrom tlaplus
This skill generates example behavior traces from a TLA+ specification using TLC simulation. This skill should be used when the user asks to "explore states", "generate trace", "show me a behavior", "example execution", "trace exploration", "what happens when", "simulate", "run a simulation", "sample behavior", "show example states", "walk through the spec", "run an example", or wants to see how a spec executes step by step.
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.
None: SKILL.md is the whole skill.
Generate example behavior traces from your TLA+ specification using TLC simulation.
IMPORTANT: Always use the MCP tools listed above. Never fall back to running Java or TLC commands via Bash.
/tla-explore test-specs/Counter.tla
/tla-explore test-specs/Counter.tla test-specs/Counter.cfg
/tla-explore test-specs/Counter.tla --length 20
All forms work identically. See skills/shared/path-normalization.md for path normalization rules.
.cfg selection algorithm (see below)mcp__plugin_tlaplus_tlaplus__tlaplus_mcp_tlc_explore to generate a behavior traceStep 1: Normalize Spec Path
Take the spec file path provided as the argument to this skill. If it starts with @, strip the leading @.
Print Spec path: <spec_path>
Step 2: Validate File
.tlaStep 3: Parse Flags
Extract --length <N> from the argument:
LENGTH=10--length <N> present: LENGTH=<N><N> is a positive integerStep 4: Determine CFG Argument
Parse the second token from the argument (split by space, take second). If it ends with .cfg, treat it as the CFG_ARG.
Step 5: Apply CFG Selection Algorithm
Apply the CFG Selection Algorithm documented in skills/shared/cfg-selection-algorithm.md.
Step 6: Call MCP Tool
Invoke TLC trace exploration:
mcp__plugin_tlaplus_tlaplus__tlaplus_mcp_tlc_explore
--fileName "<SPEC_PATH>"
--cfgFile "<FINAL_CFG>"
--behaviorLength <LENGTH>
Step 7: Report Results
Inspect isError, exit code, and TLC output before interpreting the trace.
The tool injects -invlevel <LENGTH> to print a trace when the requested level
is reached. A violation of that generated TLCGet("level") < LENGTH invariant
is expected trace termination; describe it as a sampled behavior. TLC names this
invariant __DebuggerExpr__<number>. Confirm it is the length invariant rather
than another injected -inv expression or a configured user invariant. Never dismiss a
violation of a configured user invariant or property. If its identity is unclear,
report that uncertainty.
Report parser/config failures, timeouts, cancellation, or resource failures as incomplete exploration, preserving any partial trace without claiming success.
Print summary:
Spec path: <SPEC_PATH>
CFG used: <FINAL_CFG>
Behavior length: <LENGTH> steps
<TLC trace output>
Trace exploration complete.
If a user invariant/property violation or deadlock is found during exploration:
Violation detected during trace exploration. See counterexample above.Use /tla-debug-violations to analyze the violation.If a trace was generated and only the injected length invariant stopped exploration, or the simulation completed successfully without user violations:
Trace generated successfully. <N> states explored.Use /tla-check for exhaustive verification.Spec path: test-specs/Counter.tla
Phase 1: Spec.cfg exists
Phase 2: Using default Spec.cfg
CFG used: test-specs/Counter.cfg
Behavior length: 10 steps
State 1: <Initial state>
count = 0
State 2:
count = 1
State 3:
count = 2
...
Trace generated successfully. 10 states explored.
What SKILL.md sets; muted values are Claude Code's defaults
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".Other plugins' skills for the same job
/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