/tlaplus:tla-create-animationsfrom tlaplus
This 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".
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.
Use this skill to create animations that visualize TLA+ specifications during model checking or trace exploration.
Note: The SVG and IOUtils modules require the Community Modules JAR (CommunityModules-deps.jar) to be on the classpath. The MCP tools handle this automatically when both tla2tools.jar and CommunityModules-deps.jar are present in the tools/ directory.
Create a .tla file (e.g., MySpecAnim.tla) that EXTENDS your spec:
---- MODULE MySpecAnim ----
EXTENDS TLC, SVG, IOUtils, MySpec
\* Visual logic - what to show
AnimView == [
frame |-> "MyAnimation",
title |-> "My Spec Animation",
width |-> 800,
height |-> 600,
elements |-> AnimElements
]
\* SVG elements
AnimElements == <<
[shape |-> "rect", x |-> 100, y |-> 100, width |-> 50, height |-> 50, fill |-> "blue"],
[shape |-> "text", x |-> 125, y |-> 125, text |-> ToString(myVariable)]
>>
\* TLC generation
AnimAlias == [
view |-> AnimView
]
\* Debugger watch
AnimWatch == AnimView
====
Use MCP tools to generate animation:
# Parse the animation spec
mcp__plugin_tlaplus_tlaplus__tlaplus_mcp_sany_parse --fileName MySpecAnim.tla
# Explore with animation
mcp__plugin_tlaplus_tlaplus__tlaplus_mcp_tlc_explore --fileName MySpecAnim.tla --cfgFile MySpec.cfg --behaviorLength 20
To save a failing check’s behavior, pass
extraOpts: ["-dumpTrace", "tlc", "/absolute/path/trace.tlc"] to
mcp__plugin_tlaplus_tlaplus__tlaplus_mcp_tlc_check; traces are not saved by default.
Keep the matching model and constants. Add ALIAS AnimAlias to a replay config,
then call mcp__plugin_tlaplus_tlaplus__tlaplus_mcp_tlc_trace with the animation module’s
absolute fileName, replay cfgFile, and the saved traceFile.
This evaluates the animation alias on the saved trace rather than sampling a
new behavior. Read tlc-alias-expressions.md from the knowledge resource for
ALIAS semantics. Check the output for parser/config/process failures before
using it as animation data.
[shape |-> "rect", x |-> 100, y |-> 100, width |-> 50, height |-> 50,
fill |-> "blue", stroke |-> "black", strokeWidth |-> 2]
[shape |-> "circle", cx |-> 200, cy |-> 200, r |-> 30,
fill |-> "red", opacity |-> 0.8]
[shape |-> "text", x |-> 150, y |-> 150, text |-> "Hello",
fontSize |-> 16, fill |-> "black", fontFamily |-> "Arial"]
[shape |-> "line", x1 |-> 0, y1 |-> 0, x2 |-> 100, y2 |-> 100,
stroke |-> "black", strokeWidth |-> 2]
[shape |-> "path", d |-> "M 10 10 L 90 90 L 10 90 Z",
fill |-> "yellow", stroke |-> "black"]
[shape |-> "g", elements |-> <<
[shape |-> "rect", ...],
[shape |-> "circle", ...]
>>]
IF condition THEN
[shape |-> "circle", cx |-> 100, cy |-> 100, r |-> 20, fill |-> "green"]
ELSE
[shape |-> "circle", cx |-> 100, cy |-> 100, r |-> 20, fill |-> "red"]
[shape |-> "rect",
x |-> position * 50, \* Position based on variable
y |-> 100,
width |-> 40,
height |-> 40]
LET Elements == {
[shape |-> "circle", cx |-> i * 60, cy |-> 200, r |-> 20, fill |-> "blue"]
: i \\in 1..Len(mySequence)
}
IN [shape |-> "g", elements |-> SetToSeq(Elements)]
g shapeToString() to show variable valuesmcp__plugin_tlaplus_tlaplus__tlaplus_mcp_sany_parse: Validate animation spec syntaxmcp__plugin_tlaplus_tlaplus__tlaplus_mcp_tlc_explore: Generate and view animationmcp__plugin_tlaplus_tlaplus__tlaplus_mcp_tlc_check: Run model checker with animation outputmcp__plugin_tlaplus_tlaplus__tlaplus_mcp_tlc_trace: Replay saved traces with an animation ALIASSee references/animation-patterns.md for complete animation examples and reusable patterns.
Animations can also be rendered directly in the terminal using built-in graphics protocols (Kitty, iTerm2) or ASCII fallback. The workflow follows a detect-then-render pattern:
mcp__plugin_tlaplus_tlaplus__tlaplus_mcp_animation_detect to query terminal capabilitiesmcp__plugin_tlaplus_tlaplus__tlaplus_mcp_animation_render with chosen protocol and animation datamcp__plugin_tlaplus_tlaplus__tlaplus_mcp_animation_frameCount to discover frames, then render each individuallyreferences/terminal-rendering.md - Complete terminal rendering reference including protocol detection, frame navigation, configuration options, troubleshooting, and detailed examplesreferences/animation-patterns.md - Common animation patterns and techniquesWhat 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-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"./tla-explorenpx claudepluginhub photoszzt/tlaplus-ai-tools --plugin tlaplus