Stats
Links
Categories
npx claudepluginhub brianwu02/tla-claude-codeTLA+ formal verification skill for Claude Code — finds concurrency bugs, race conditions, and UX flow issues
A Claude Code skill that leverages TLA+, Leslie Lamport's formal verification framework, to find concurrency bugs by checking every possible ordering of events. Works from design docs or existing code.
/tla "user clicks Pay twice fast, what if both requests go through?"
FAIL: NoDuplicateCharge
1. UserClick → request #1 in flight, setState(disabled) queued
2. UserClick → request #2 (button still enabled, setState hasn't flushed)
3. ServerAccept(#1) → charged
4. ServerAccept(#2) → DOUBLE CHARGE
Fix: guard on useRef, not useState. Refs update synchronously.
As a plugin (recommended):
/plugin marketplace add brianwu02/tla-claude-code
/plugin install tla-claude-code@tla-claude-code
Or manually:
git clone https://github.com/brianwu02/tla-claude-code.git /tmp/tla-claude-code
cd /path/to/your-project
bash /tmp/tla-claude-code/setup.sh
Requires Java 11+.
/tla "can two users book the same slot?"
PASS: NoDoubleBook — at most one user holds a given slot
FAIL: StaleAvailabilityUI — user 2 still sees "available" after user 1 books
/tla "my checkout has 11 screens, can we simplify it?"
Shortest path (returning user, saved payment): 7 steps
Longest path (guest, first time): 11 steps
Merge candidates:
- search_results + site_detail → always adjacent
- guest_info + shipping → both collect contact info
- review + confirm → review is read-only
/tla "two workers grab the same job from the queue — is our locking safe?"
PASS: NoDoubleClaim — no two workers process the same job
PASS: AllJobsDone (liveness) — every job eventually completes
FAIL: NoOrphanedClaims — window between crash and recovery
where a job is claimed but worker is dead
One prompt asks what you're working with and how thorough to be. Then:
Full details in SKILL.md.
MIT