formal-spec

Generate TLA+ specifications with state variables, invariants, and temporal logic conditions.

1|1|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/dtsong/claude-code-windows-setup --skill formal-spec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: formal-spec
Source: https://github.com/dtsong/claude-code-windows-setup/tree/main/skills/council/prover/formal-spec
Command: npx skills add https://github.com/dtsong/claude-code-windows-setup --skill formal-spec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of ensuring system reliability and correctness by translating informal design requirements into rigorous, verifiable formal specifications.

Core Features & Use Cases

  • Property Extraction: Identifies and formalizes safety, liveness, and security properties from system designs.
  • TLA+ Specification: Generates TLA+ modules defining state variables, initial conditions, and transition actions.
  • Model Checking Configuration: Sets up TLC model checker parameters for bounded verification.
  • Use Case: When designing a critical distributed protocol, use this Skill to formally specify its behavior and verify that no two nodes can hold a lock simultaneously (safety) and that every request eventually gets processed (liveness).

Quick Start

Use the formal-spec skill to write a TLA+ specification for a mutual exclusion protocol based on the provided design document.

Frequently Asked Questions about formal-spec

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

FAQPage Schema
How do I formalize system properties for protocol verification using TLA+?

To formalize system properties using TLA+, this Skill generates modules defining state variables, initial conditions, and transition actions. It extracts safety and liveness properties from informal design requirements to verify concurrent systems and distributed protocols.

What is the difference between safety and liveness properties in formal specification?

In formal specification, safety properties ensure nothing bad happens, like two nodes holding a lock simultaneously, while liveness properties guarantee something good eventually happens, such as every request getting processed. This Skill formalizes both within TLA+ modules for model checking.

How do I set up TLC model checker parameters for bounded verification?

To set up TLC model checker parameters for bounded verification, this Skill configures the model checking environment based on the generated TLA+ specification. It translates temporal logic conditions and state invariants into verifiable constraints for the TLC tool.

Can I use formal specification to verify concurrent system designs?

Yes, you can use formal specification to verify concurrent system designs. This Skill applies TLA+ syntax and model checking principles to define state transitions, ensuring that concurrent operations and protocol behaviors meet critical safety and liveness requirements.

Do I need to know TLA+ syntax to generate formal specifications?

Yes, understanding TLA+ syntax and model checking principles is required. This Skill uses TLA+ to define state transitions and properties, requiring foundational knowledge of temporal logic conditions, invariants, and state variables to ensure accurate system verification.

When do I need formal specification for software design instead of standard testing?

You need formal specification when designing critical distributed protocols where system reliability is paramount. It translates informal design requirements into rigorous, verifiable specifications, addressing correctness challenges that standard testing cannot fully cover.