Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Tla State Machines

ASecurity

Core modeling methodology for TLA+ state machines. Use when choosing variables defining Init and Next designing actions structuring the state space or deciding abstraction level for concurrent or distributed systems. Trigger on questions about how to model a system as a state machine or how to write good actions and Next relations.

3 stars
0 votes
0 copies
1 views
Added 9/11/2026
businessgo

Security Analysis

A100/100

Scanned 9/11/2026

Install to Claude Code

$npx -y skills add DylanCkawalec/Mermate --skill tla-state-machines --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tla State Machines?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Tla State Machines
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dylanckawalec-tla-state-machines/badge)](https://www.skillsdirectory.com/skills/dylanckawalec-tla-state-machines)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: tla-state-machines
description: Core modeling methodology for TLA+ state machines. Use when choosing variables defining Init and Next designing actions structuring the state space or deciding abstraction level for concurrent or distributed systems. Trigger on questions about how to model a system as a state machine or how to write good actions and Next relations.
---

# TLA+ State Machines

## Persona Orientation

This skill operates under the professional persona and methodological standards of Leslie Lamport as established in the specification-master-agent. All decisions about variables, grain of atomicity, and state-space structure are governed by the advice in Specifying Systems, especially Chapter 7. Justify every abstraction choice in the spirit of Lamport’s own writing.

## Overview

Every TLA+ specification is a state machine. The art lies in choosing the right state representation and especially the right grain of atomicity so that the model is both faithful to the system and tractable for model checking or proof. This skill follows the methodology of Specifying Systems Chapters 1–7.

## Grain of Atomicity (The Central Decision)

The single most important modeling choice is the grain of atomicity — what system changes are represented as a single step of a behavior. 

- Coarser grain simplifies the model and reduces state space but may hide interleavings that matter.
- Finer grain reveals more concurrency errors but can make the model larger and harder to check.
- Justify the chosen grain explicitly. Prefer the coarsest grain that still exposes the properties of interest and the potential errors.
- When actions commute (no shared variables, neither enables/disables the other), coarser models are often equivalent for the properties being checked.

Always begin by writing a few sample behaviors; the natural step boundaries in those behaviors usually reveal the right grain.

## Decision Process for Variables

1. List every piece of information that must be observed to state the properties of interest.
2. Eliminate anything that can be derived from other variables or that is pure implementation detail.
3. Prefer finite domains or domains that can be bounded for TLC.
4. Represent collections as functions, sets, or sequences according to the access patterns needed by the actions.

A good variable set produces a state space whose geometry is easy to reason about.

## Init and Next

- Init must be a predicate that is true of exactly the starting states (or a nondeterministic set of them).
- Next is almost always written as a disjunction of named actions. Each action is a predicate relating the current state to the next state (using primed variables).
- Every action should have an explicit UNCHANGED clause for variables it does not modify. This prevents accidental nondeterminism and makes the model easier to read.

## Action Design Principles

- An action should correspond to a single atomic step of the system at the chosen level of abstraction.
- Guards (enabling conditions) appear as the unprimed part of the action formula.
- Prefer small orthogonal actions over large monolithic ones when concurrency is important; this exposes interleavings.
- When modeling a real implementation, study how the code decomposes operations into atomic steps and mirror that decomposition (or deliberately coarsen it with justification).

## Abstraction Geometry

Think of the reachable states under Next as a directed graph (more precisely as a set of infinite paths). The model is good when:

- the graph contains every behavior the real system can exhibit (up to stuttering)
- the graph does not contain extra behaviors that would violate the intended properties
- the graph is small enough that TLC can explore it or that inductive invariants can be found

## Practical Checklist Before Declaring a Model Complete

- Sample behaviors have been written and the grain of atomicity justified.
- TypeOK holds in Init and is preserved by every action.
- Every variable that can change appears primed in at least one action.
- No action leaves a variable unconstrained when it should be unchanged.
- The fairness conditions match the progress assumptions of the system and preserve machine closure.
- The key safety invariants are stated and appear plausible.
- Internal variables that are not part of the external interface are candidates for hiding.

When these conditions are satisfied the state machine is ready for property checking and for refinement toward an implementation.

Attribution

DylanCkawalecDylanCkawalec
View sourceMore from DylanCkawalec →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Solution Architect

Designs system architecture, component specifications, and technical integration strategy. Use when: designing solutions, system architecture, technology stack, or integration approaches.

192 votes

Akorchak:Venture Assessment

Generate a comprehensive VC investment assessment report for a company

72 votes

Just Fucking Cancel

Find and cancel unwanted subscriptions by analyzing bank transactions. Detects recurring charges, calculates annual waste, and helps you cancel with direct URLs and browser automation. Use when: 'cancel subscriptions', 'audit subscriptions', 'find recurring charges', 'what am I paying for', 'save money', 'subscription cleanup', 'stop wasting money'. Supports CSV import (Apple Card, Chase, Amex, Citi, Bank of America, Capital One, Mint, Copilot) OR Plaid API for automatic transaction pull. Out...

6511 votes

Stock Analysis

Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (create, add, remove assets), crypto analysis (Top 20 by market cap), and periodic performance reports (daily/weekly/monthly/quarterly/yearly). 8 analysis dimensions for stocks, 3 for crypto. Use for stock analysis, portfolio tracking, earnings reactions, or crypto monitoring.

6511 votes

Telegram Compose

Compose rich, readable Telegram messages using HTML formatting via direct Telegram API. Use when: (1) Sending any Telegram message beyond a simple one-line reply, (2) Creating structured messages with sections, lists, or status updates, (3) Need formatting unavailable via Clawdbot's Markdown conversion (underline, spoilers, expandable blockquotes, user mentions by ID), (4) Sending alerts, reports, summaries, or notifications to Telegram, (5) Want professional, scannable message formatting wit...

6511 votes
View all in business →