tla-spec

Guide writing TLA+ specifications with rules for safety and liveness.

1|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/ahrav/Gossip-rs --skill tla-spec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tla-spec
Source: https://github.com/ahrav/Gossip-rs/tree/main/.claude/skills/tla-spec
Command: npx skills add https://github.com/ahrav/Gossip-rs --skill tla-spec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides a structured, evidence-backed methodology for writing correct TLA+ specifications, ensuring rigor and reducing common errors in formal system modeling.

Core Features & Use Cases

  • Methodology Guidance: Step-by-step phases for specification, abstraction, safety, and liveness verification.
  • Evidence-Based Rules: Every recommendation is grounded in TLA+ literature and best practices.
  • Model Checking Best Practices: Guidance on TLC configuration for sound safety and liveness verification.
  • Use Case: A software architect needs to formally specify a new distributed consensus protocol. They use this Skill to ensure their TLA+ specification is correct, covers all necessary properties, and is verifiable with TLC.

Quick Start

Use the tla-spec skill to review the canonical form for a new TLA+ specification.

Frequently Asked Questions about tla-spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a correct TLA+ specification for a distributed system?

Writing a correct TLA+ specification requires following a phased methodology that covers canonical form, abstraction, safety, and liveness. This approach uses evidence-backed rules derived from TLA+ literature to reduce common formal modeling errors in distributed systems.

What are the best practices for TLA+ model checking with TLC?

TLA+ model checking best practices involve proper TLC configuration to ensure sound safety and liveness verification. This includes structuring specifications correctly and applying configuration rules grounded in industrial use to avoid verification gaps.

How do I verify liveness and safety properties in TLA+?

Verifying liveness and safety properties in TLA+ requires defining correct invariants and temporal properties within a structured specification. A phased methodology guides you through abstraction and canonical form to ensure these properties are sound and verifiable.

What are common pitfalls when specifying distributed algorithms in TLA+?

Common pitfalls when specifying distributed algorithms in TLA+ include poor abstraction choices and incomplete liveness definitions. Using an evidence-backed methodology helps avoid these errors by enforcing canonical form and rigorous model checking configuration.

What is the canonical form for a TLA+ specification?

The canonical form for a TLA+ specification is a structured template that ensures rigorous abstraction and correct property definitions. Following this form is the first phase in a methodology designed to reduce formal system modeling errors.

Do I need formal methods experience to use TLA+ for protocol specification?

Specifying protocols in TLA+ benefits from formal methods experience, but a structured methodology reduces the entry barrier. Step-by-step phases for abstraction and verification guide users through the process of modeling distributed consensus and other algorithms.