Agent skill

Tlaplus

by swingerman in swingerman/engineer

A skill your agent uses to model-check real code or a design with TLA+ and TLC.

MITAuto-check passedTesting & QA

Install Tlaplus

skills CLI
$ npx skills add swingerman/engineer --skill tlaplus -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install swingerman/engineer tlaplus --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/swingerman/engineer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineer/skills/tlaplus .claude/skills/tlaplus && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tlaplus
GitHub stars
154
Token cost
~1.8k tokens
SKILL.md length
977 words
Files
2 (incl. scripts)
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses to model-check real code or a design with TLA+ and TLC.

  • Works in 5 steps: VARIABLES — the pieces of state that… → Init — the starting state predicate. → Actions — one predicate per state… → …
  • Model-check real code
  • SKILL.md covers Setup check, Translating an informal design…, Workflow and Verifying real code ("use TLA+…, plus 1 more section
  • Runs Shell scripts from its folder; calls java and bash

What it does

Tlaplus is an agent skill from swingerman/engineer. Use to model-check real code or a design with TLA+ and TLC. Model retries, locks, async flows, protocols or state machines as written, check invariants over every interleaving, and reproduce any counterexample trace as a failing test. Dispatched by /engineer.harden for concurrency- and ordering-shaped risks; also usable directly, including to spec a design before building it. Triggers — "/engineer.tlaplus", "use TLA+ to verify X", "model-check X for races/deadlocks", "write a TLA+ spec for this protocol".

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/tlc.sh`).

It sits in Testing & QA, covering Failing and flaky tests. The repository describes itself as: Disciplined Agentic Engineering — a methodology kit for Claude Code: acceptance-test-first specs, explicit checkpoints, and autonomy you can actually leave running. The engineer… The licence is MIT.

When your agent uses it

  • Model-check real code
  • A design with TLA+ and TLC
  • — /engineer.tlaplus
  • Use TLA+ to verify X

Example prompts

  • “/engineer.tlaplus”
  • “use TLA+ to verify X”
  • “model-check X for races/deadlocks”
  • “/tlaplus”

Requirements

  • A Bash shell

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. VARIABLES — the pieces of state that change. Keep this minimal;
  2. Init — the starting state predicate.
  3. Actions — one predicate per state transition (e.g. SendMsg,
  4. Invariants — the safety properties that must hold in every reachable
  5. (Optional) Temporal properties — liveness, e.g. EventuallyDelivered,

What it can do on your machine

Read from SKILL.md and the folder at commit 32947eb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • java
    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tlaplus loads about 1.8k tokens when it runs. Until then it costs about 130 tokens; SKILL.md has 977 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~130
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from swingerman/engineer at commit 32947eb, republished under its MIT licence (© swingerman). 977 words, ~1,759 tokens.

Download SKILL.mdSave it as .claude/skills/tlaplus/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
tlaplus
description
Use to model-check real code or a design with TLA+ and TLC. Model retries, locks, async flows, protocols or state machines as written, check invariants over every interleaving, and reproduce any counterexample trace as a failing test. Dispatched by /engineer.harden for concurrency- and ordering-shaped risks; also usable directly, including to spec a design before building it. Triggers — "/engineer.tlaplus", "use TLA+ to verify X", "model-check X for races/deadlocks", "write a TLA+ spec for this protocol".

TLA+

TLA+ earns its keep by finding the counterexample you didn't think of. Don't write a spec and declare victory without actually running TLC — an uncompiled/unchecked spec is just prose with extra syntax.

Setup check

java -version (TLC needs a JVM 11+; if it's missing, tell the user rather than installing one). The model checker jar (tla2tools.jar, pinned to v1.7.4) auto-downloads on first run via ${CLAUDE_PLUGIN_ROOT}/skills/tlaplus/scripts/tlc.sh, no separate install step needed.

Translating an informal design into TLA+

When the user describes a protocol/state machine in plain language, structure the spec around these pieces — this is the actual translation work, not boilerplate:

  1. VARIABLES — the pieces of state that change. Keep this minimal; every variable multiplies the state space TLC has to explore.
  2. Init — the starting state predicate.
  3. Actions — one predicate per state transition (e.g. SendMsg, Crash, Receive). Next == SendMsg \/ Receive \/ Crash \/ ...
  4. Invariants — the safety properties that must hold in every reachable state (e.g. NoDataLoss, MutualExclusion). These are what TLC actually checks — a spec without invariants can't find bugs.
  5. (Optional) Temporal properties — liveness, e.g. EventuallyDelivered, checked separately from safety invariants and much more expensive.

Ask the user what actually must never happen (safety) before modeling — that answer is the invariant, and it's the one thing you can't infer from the protocol description alone.

Workflow

  1. Write Spec.tla (the spec/module) and Spec.cfg (which invariants to check, CONSTANTS values, and state-space bounds like a max number of processes — TLC exhaustively explores states, so unbounded constants mean it never finishes).
  2. Run: bash ${CLAUDE_PLUGIN_ROOT}/skills/tlaplus/scripts/tlc.sh Spec.tla Spec.cfg
  3. Read the output precisely. TLC either says the invariant holds (Model checking completed. No error has been found.) or prints a counterexample trace — the exact sequence of states that breaks the invariant. That trace is the whole value of doing this: don't summarize it away, show the state-by-state trace so the actual bug is visible.
  4. Fix the spec (or realize the invariant was wrong) and rerun. A "violation" is sometimes the invariant being stated too strongly — check which one is actually wrong before patching either.
  5. If TLC times out or the state space is too large, narrow Spec.cfg constants (fewer processes/values) first — that's usually cheaper than restructuring the spec, and still finds most bugs since TLA+ bugs are rarely scale-dependent.

Verifying real code ("use TLA+ to verify X")

This is a different job from writing a spec from scratch: the goal is finding real concurrency/protocol bugs in real code and getting them fixed. The .tla files are scaffolding, not the deliverable — nobody merges them, they merge the PRs the counterexamples led to. TLA+'s specific strength here is interleavings: races, missed locks, out-of-order delivery, retry/timeout interactions — the class of bug that's nearly impossible to hit with a unit test because it depends on when two things happen relative to each other. Reach for TLA+ over Lean when the suspected bug is about concurrent/ interleaved behavior; reach for Lean when it's about a pure functional transformation or an unbounded data invariant. Structure the work as a todo list and post progress as you go — this runs long.

  1. Split the target into independent state machines, same as for a from-scratch spec — read the real source and model each orthogonal subsystem (retry logic, session lifecycle, a message queue, a lock protocol) as its own small .tla module.
  2. Model from the code as written, not as intended. States, actions, and guards must mirror the actual implementation including its bugs, or every check is vacuous. Cite the file/line each action is based on.
  3. State the invariants a reviewer would actually care about (mutual exclusion, no lost message, bounded retries, no state stuck unreachable) and check them with TLC. TLC's exhaustive search over the bounded state space in Spec.cfg is doing the same job proof search does in Lean, but it's automatic — you don't have to find the counterexample yourself, TLC does, which is exactly why this is a good fit for "does this race exist."
  4. Review each model independently against the real code before trusting its results. A clean TLC run on a wrong model proves nothing about the real system.
  5. When TLC reports a violation, don't report the abstract trace as the finding — reproduce it against the real code. Translate the state-by-state trace into a concrete interleaving/input sequence and confirm it against the actual implementation (a test, a script forcing the interleaving, or a careful read of the code path). If it doesn't reproduce, the model diverged from reality — fix the model, not the code.
  6. For every confirmed bug, pin it with a test that fails before the fix and passes after. State it in those terms: the test is what proves the bug was real and the fix works. Opening a PR is an external write. Propose the draft PR and wait for the human's OK (${CLAUDE_PLUGIN_ROOT}/references/handoff-dispatch.md). When /engineer.harden dispatched you, don't propose one: return the verdict and the reproduction, and harden pins and fixes on the feature branch.
  7. Track what's still open ("held up: X") rather than silently dropping an invariant you couldn't get TLC to finish checking.
  8. Flag model/reality disagreement as provisional. If a model's violations keep failing to reproduce, or a model that should model a real race never turns one up, the model is probably still wrong — say so before shipping PRs off it.
  9. Know the limit of a "no error found" run: TLC checked every state reachable within Spec.cfg's bounds, not the system for all scales. That supports "we found no counterexample up to N processes," not "this is proven correct" — say the former, not the latter, in the final report.
Show full SKILL.md (37 more words)Show less

Self-check

The runnable check is the TLC run itself — report the actual TLC verdict ("no error found" vs. a specific counterexample), not "the spec looks correct." A spec that was never run through TLC hasn't been verified.

© swingerman, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in engineer/skills/tlaplus of swingerman/engineer.

  • SKILL.md
  • scripts/tlc.sh

Open the folder on GitHubat commit 32947eb

Compare with similar skills

Tlaplus next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tlaplus compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tlaplus this skillswingerman/engineer154—~1.8kAutomated safety check: PassMIT
Dx Devops Test Failures Analyzeforcedotcom/sf-skills1.1k—~1.4kAutomated safety check: PassApache-2.0
Regex Buildermohitagw15856/pm-claude-skills1.4k—~704Automated safety check: PassMIT
Swig Testswig/swig6.3k—~2.3kAutomated safety check: PassCustom licence
Dynamo Jira TicketDynamoDS/Dynamo2k—~1.1kAutomated safety check: PassApache-2.0
Fix Ready PRsfastrepl/anarlog9.4k—~1.4kAutomated safety check: PassMIT

Similar skills

  • Dx Devops Test Failures Analyze

    forcedotcom/sf-skills

    Analyzes DevOps Center test failures and Code Analyzer violations in plain language — failure category, offending file/class/method/line, rule violated, fix direction, and prioritized improvement…

    1.1k GitHub stars~1.4k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Regex Builder

    mohitagw15856/pm-claude-skills

    Build a regular expression from a plain-English description, or explain an existing one.

    1.4k GitHub stars~704 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Swig Test

    swig/swig

    Run SWIG test suite for specific languages. An agent skill from swig/swig.

    6.3k GitHub stars~2.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Dynamo Jira Ticket

    DynamoDS/Dynamo

    Create structured Jira tickets for Dynamo from bug reports, failing tests, or feature requests.

    2k GitHub stars~1.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Fix Ready PRs

    fastrepl/anarlog

    Inspect every open non-draft PR for CI failures and unresolved Cursor Bugbot findings, then fix them on the existing PR branches.

    9.4k GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Trx Analysis

    microsoft/vstest

    Official

    Parse and analyze Visual Studio TRX test result files. An agent skill from microsoft/vstest.

    969 GitHub stars~1.8k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from swingerman/engineer

All 27 skills in this repo
  • Crap Analyzer

    swingerman/engineer

    A skill your agent uses to produce a risk-based refactor + test plan for recently-changed code on a diff/branch/PR by computing CRAP (complexity × untested) on changed methods.

    154 GitHub stars~1.2k tokensUpdated 14 days ago
    Auto-check passed
  • Atdd Mutate

    swingerman/engineer

    A skill your agent uses to add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW, mutation testing verifies the tests actually catch bugs.

    154 GitHub stars~2.7k tokensUpdated 14 days ago
    Auto-check passed
  • Fix

    swingerman/engineer

    A skill your agent uses to drive a bug fix from first report through close, with a "why didn't we catch it?" loop at the end.

    154 GitHub stars~3k tokensUpdated 14 days ago
    Auto-check passed
  • Atdd

    swingerman/engineer

    A skill your agent uses to drive feature work through the Acceptance Test Driven Development workflow — Given/When/Then specs before code, a project-specific test pipeline, and two parallel test…

    154 GitHub stars~2.8k tokensUpdated 14 days ago
    Auto-check passed
  • Harden

    swingerman/engineer

    Use after a feature passes Light Verify (CP7), to prove the tests actually catch bugs and, where the code warrants it, to formally check its invariants — Checkpoint 8.

    154 GitHub stars~1.8k tokensUpdated 14 days ago
    Auto-check passed
  • Next

    swingerman/engineer

    Use at the start of a work session, or any time the question is "what should I pick up now" across the whole project.

    154 GitHub stars~3k tokensUpdated 14 days ago
    Auto-check passed

Questions about Tlaplus

What does Tlaplus do?

A skill your agent uses to model-check real code or a design with TLA+ and TLC. Tlaplus is an agent skill from swingerman/engineer. Use to model-check real code or a design with TLA+ and TLC.

When should I use Tlaplus?

Tlaplus fits situations like: model-check real code; A design with TLA+ and TLC; — /engineer.tlaplus; use TLA+ to verify X.

How do I install Tlaplus in Claude Code?

Run `npx skills add swingerman/engineer --skill tlaplus -a claude-code`. Or copy the skill folder (engineer/skills/tlaplus in swingerman/engineer) into .claude/skills/tlaplus in your project. Claude Code loads it when a task matches its description.

How do I install Tlaplus in Codex?

Run `npx skills add swingerman/engineer --skill tlaplus -a codex`. Or copy the skill folder (engineer/skills/tlaplus in swingerman/engineer) into .agents/skills/tlaplus in your project. Codex loads it when a task matches its description.

Can I use Tlaplus in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add swingerman/engineer --skill tlaplus -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tlaplus, .gemini/skills/tlaplus, .github/skills/tlaplus and .opencode/skills/tlaplus in your project.

What does Tlaplus need to run?

Going by SKILL.md and its folder, Tlaplus needs a shell for the scripts in its folder and the command-line tools its instructions call (java and bash). Our summary lists: A Bash shell.

Does Tlaplus access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Tlaplus safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Tlaplus use?

Tlaplus is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tlaplus use?

About 1.8k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tlaplus?

Skills that share tags, products or a category with Tlaplus: Dx Devops Test Failures Analyze (forcedotcom/sf-skills, 1.1k stars), Regex Builder (mohitagw15856/pm-claude-skills, 1.4k stars), Swig Test (swig/swig, 6.3k stars) and Dynamo Jira Ticket (DynamoDS/Dynamo, 2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tlaplus?

swingerman (a GitHub user) maintains it in swingerman/engineer, which has 154 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on September 23, 2026.

Source: swingerman/engineer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.