/engineer:tlaplusfrom engineer
Model-checks real code or designs with TLA+ and TLC to verify invariants over retries, locks, async flows, and protocols. Reproduces counterexample traces as failing tests.
Ships in engineer. 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; scripts run unread.
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.
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.
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:
VARIABLES — the pieces of state that change. Keep this minimal;
every variable multiplies the state space TLC has to explore.Init — the starting state predicate.SendMsg,
Crash, Receive). Next == SendMsg \/ Receive \/ Crash \/ ...NoDataLoss, MutualExclusion). These are what TLC actually
checks — a spec without invariants can't find bugs.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.
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).bash ${CLAUDE_PLUGIN_ROOT}/skills/tlaplus/scripts/tlc.sh Spec.tla Spec.cfgModel 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.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.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.
.tla module.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."${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.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.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.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub swingerman/engineer --plugin engineer25 skills in this plugin
/arch-checkUse to check a feature's code against the charter's architecture rules — dependency layering, cycles, forbidden patterns, file naming, file size. Triggers — "/engineer.arch-check", "architecture check", "check architecture fitness", "does this follow the charter", "check layering"./atddUse to write a feature's acceptance specs and generate its test pipeline — Checkpoint 3 of the DAE pipeline. The engineer-namespace entry point into the atdd plugin's acceptance workflow. Triggers — "/engineer.atdd", "write the spec", "Checkpoint 3", "formalize the ACs as specs", "generate the test pipeline"./clarifyUse when a single DAE artifact has ambiguities to resolve. Triggers — "/engineer.clarify", "clarify this spec", "resolve ambiguities", "this is vague — tighten it"./consistency-checkUse to validate DAE artifacts for schema correctness and cross-artifact consistency. Triggers — "/engineer.consistency-check", "check consistency", "validate the artifacts", "are the specs and ACs in sync", "audit this feature"./discover-acsUse when a Ready feature needs its acceptance criteria discovered before specs are written. Triggers — "/engineer.discover-acs", "/engineer.acceptance-criteria", "discover ACs", "what must this feature do", "figure out acceptance criteria"./discussUse when exploring a feature idea before committing, or revisiting a parked one. Triggers — "/engineer.discuss", "/engineer.discuss <slug>", "I have an idea about", "should we build", "let's think about".Other plugins' skills for the same job