/tlaplus:tla-parsefrom tlaplus
This skill parses and validates TLA+ specification syntax and semantics using SANY. It should be used when the user asks to "check syntax", "validate my spec", "is my spec valid", "parse errors", "syntax errors", "SANY errors", "SANY", "parse my TLA+ file", "check my TLA+ syntax", "does my spec compile", "find errors in my spec", "is my TLA+ correct", "lint my spec", "check for errors", "why won't my spec parse", or "check my spec for errors".
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.
Validate the syntax and semantics of a TLA+ specification using the SANY parser. This catches errors before model checking.
IMPORTANT: Always use the MCP tools listed above. Never fall back to running Java or TLC commands via Bash.
Plain path:
/tla-parse test-specs/Counter.tla
/tla-parse specs/MySpec.tla
With @ prefix:
/tla-parse @test-specs/Counter.tla
/tla-parse @Counter.tla
Both forms work identically. See skills/shared/path-normalization.md for path normalization rules.
SANY (Semantic ANalYzer) performs comprehensive syntax and semantic validation:
Use /tla-parse for syntax-only validation without model checking. Note that /tla-check also catches parse errors as part of its workflow, so /tla-parse is most useful when you want to validate syntax without running the model checker. For model checking, use /tla-check or /tla-smoke.
| Error | Cause | Fix |
|---|---|---|
Unexpected token | Syntax error (typo, bracket mismatch) | Review line and check parentheses, EXTENDS clause |
Unknown operator | Reference to undefined operator or typo | Check operator name spelling; ensure it's defined |
Module not found | EXTENDS or INSTANCE references non-existent module | Verify module name and path; check for typos |
Level conflict | Mixing constants and variables incorrectly | Ensure operators have consistent levels (constant/variable) |
Type mismatch | Incompatible types in operator (e.g., set vs element) | Review operator definitions and usage |
/tla-parse @test-specs/Counter.tla
✓ Parsing successful. No errors found.
/tla-parse @specs/Bad.tla
✗ Parsing failed. See errors above.
- Line 5: Unexpected token 'VARIBLES' (did you mean 'VARIABLE'?)
/tla-parse @specs/MySpec.tla
✗ Parsing failed. See errors above.
- Line 2: Module 'Sequences' not found in EXTENDS
- Hint: Consider adding Sequences to CommunityModules or use Naturals/Integers instead
/tla-symbols to generate .cfg, then /tla-smoke for quick test/tla-parse until valid/tla-getting-started or knowledge base articles/tla-symbols - Extract symbols and generate TLC config/tla-smoke - Quick 3-second smoke test/tla-check - Full exhaustive model checking/tla-review - Comprehensive spec reviewSee these knowledge base articles for TLA+ syntax help:
resources/knowledgebase/tla-indentation.md - Proper TLA+ indentation conventionsresources/knowledgebase/tla-functions-operators.md - Defining operators and functionsresources/knowledgebase/tla-functions-records-sequences.md - Data structure syntaxresources/knowledgebase/tla-extends-instance.md - Module dependenciesThese articles are also accessible programmatically via the knowledge MCP resource.
Step 1: Validate Arguments
Check that the spec file path was provided as the argument to this skill:
Step 2: Normalize Path
Apply path normalization per skills/shared/path-normalization.md: if the argument starts with @, remove it to get the spec path. Otherwise, use the argument as-is.
Print "Spec path: <spec_path>"
Step 3: Validate File Path
Check that the file exists and ends with .tla:
.tla, print "Error: File must have .tla extension" and exitStep 4: Call MCP Tool
Invoke the SANY parser:
mcp__plugin_tlaplus_tlaplus__tlaplus_mcp_sany_parse --fileName "<spec_path>"
Step 5: Report Results
If isError is true, report the failure and its diagnostics. Java/toolchain failures
are failed parses even when no syntax error location is available. Report success
only when the tool explicitly confirms a successful parse.
If parsing succeeds:
If parsing fails:
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