# TLA+ Model Checking Helper: Specs, TLC Errors, Traces

> Reads TLA+ specs, explains TLC errors and counterexample traces state by state, and turns English requirements into invariants.

TLA+ Model Checking Helper: Specs, TLC Errors, Traces is a paid AI agent skill on Agensi by Aniket Shevade. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $3 (one-time purchase)
- Creator: [Aniket Shevade](https://www.agensi.io/creators/aniket-shevade)
- Version: 1.0
- Last updated: 2026-11-27
- Security: scan passed (2026-11-27); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/tla-model-checking-helper-specs-tlc-errors-traces
- Tags: coding, testing-debugging, formal-verification

## About this skill

You help someone who builds distributed systems and knows little TLA+. Be
concrete: show the formula, say which state or action matters, and say what to
change. Never claim TLC ran, or that a property holds, unless you actually ran
TLC and saw its output.

Reference files (read on demand, not up front):
- `references/tlc-errors.md`  TLC and SANY messages: cause and fix.
- `references/patterns.md`    idioms and worked mini-specs (2PC, mutual exclusion, refinement, PlusCal).
- `references/pitfalls.md`    modeling mistakes that make a passing run meaningless.
- `examples/`                 a correct bounded buffer and a buggy copy with the expected trace (spec and configs embedded in each folder's SOURCE.md; save the blocks as files to run TLC).

| They have | Go to |
|---|---|
| A spec (.tla), maybe a .cfg | Step 1, then 2 |
| TLC output / a trace / an error message | Step 3 (and `references/tlc-errors.md`) |
| An English requirement or design doc | Step 4, then 5 |
| "What should I check?" | Step 5 |
| Run is too slow / out of memory | Step 5 (config sizing) and pitfalls 12-13 |
| A passing run they do not trust | Step 6, `references/pitfalls.md` |

If the spec or the property is ambiguous, ask one short question rather than
guessing. Typical ambiguities: per-process vs global ("each node" vs "some
node"), "never" vs "not until", whether messages can be lost or duplicated,
whether a crashed node can recover.

## Requires

- Optional: Java 11+
- Optional: tla2tools.jar (TLC)

Runs TLC when Java and tla2tools.jar are installed; otherwise does a careful static review and says so.

## Known limitations

Does not install TLC. TLC message wording in the error catalogue is compiled from experience and tagged verbatim-ish or paraphrase, since wording varies by TLC version. Example specs were hand-checked, not machine-checked (see NOTES.md). Does not do TLAPS proofs beyond pointing to where one would start.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the TLA+ Model Checking Helper: Specs, TLC Errors, Traces skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Do I need TLC installed?

No. Without TLC it does a static review and says so plainly. When Java and tla2tools.jar are present, it runs TLC.

### Does it support PlusCal?

Yes. It reads and writes PlusCal and explains the translation to TLA+.

### Were the examples model-checked?

They were hand-checked, not machine-checked. The example specs and configs are embedded in each example's SOURCE.md, and NOTES.md lists the commands to verify them locally.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
