Tlaplus Add Variable

Add a new variable to an existing TLA+ specification without changing its semantics. Ensures the variable is declared, initialized, and added to all UNCHANGED statements. Use when the user asks to add, introduce, or declare a new variable in a TLA+ spec, or mentions UNCHANGED statements.

49 stars 1 forksOther

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add tlaplus/AgentSkills --skill tlaplus-add-variable
Manual install
git clone --depth 1 https://github.com/tlaplus/AgentSkills.git /tmp/AgentSkills
mkdir -p ~/.claude/skills
cp -r /tmp/AgentSkills/skills/tlaplus-add-variable ~/.claude/skills/tlaplus-add-variable

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Add Variable to TLA+ Specification

Add a new variable to a TLA+ specification while preserving semantics. The new variable must appear in all necessary locations so the specification remains valid and its behavior is unchanged.

## Required Locations for New Variables

When adding a variable `newVar` to a TLA+ specification, update these locations:

1. **VARIABLE declaration block** - Add the variable name
2. **Init** - Initialize the variable
3. **All UNCHANGED statements** - Add variable to every UNCHANGED that doesn't modify it
4. **vars tuple** - Add to the tuple used in temporal formulas (if exists)
5. **TypeOk** (optional) - Add type constraint if TypeOk invariant exists

## Workflow

### Step 1: Analyze the Specification

Read the TLA+ file and identify:
- All existing variables in the VARIABLE block
- The Init predicate
- All actions and their UNCHANGED statements
- The `vars` tuple or similardefinition (usually near Next or Spec)
- TypeOk invariant if present

### Step 2: Add Variable Declaration

Add the new variable to the VARIABLE block. Preserve formatting:

```tla
VARIABLE
    existingVar1,
    existingVar2,
    newVar  \* Add with comment explaining purpose
```

### Step 3: Initialize in Init

Add initialization. Match the style of existing initializations:

```tla
Init ==
    /\ existingVar1 = ...
    /\ existingVar2 = ...
    /\ newVar = <initial_value>
```

### Step 4: Update All UNCHANGED Statements
Read the full skill on GitHub

Details

Skill name
tlaplus-add-variable
Path
skills/tlaplus-add-variable/SKILL.md
License
MIT
Repo updated
4 February 2026

FAQ

What does the Tlaplus Add Variable skill do?

Add a new variable to an existing TLA+ specification without changing its semantics. Ensures the variable is declared, initialized, and added to all UNCHANGED statements. Use when the user asks to add, introduce, or declare a new variable in a TLA+ spec, or mentions UNCHANGED statements.

How do I install the Tlaplus Add Variable skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add tlaplus/AgentSkills --skill tlaplus-add-variable. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Tlaplus Add Variable popular?

It lives in tlaplus/AgentSkills, which has 49 GitHub stars and 1 forks.

Related skills

Tlaplus From Source

49

tlaplus/AgentSkills

Generate a high-level TLA+ model from source code (C, C++, Rust, etc.). Analyzes code to understand its purpose, creates abstractions, writes TLA+ specification, and proposes invariants and properties. Use when the user wants to model source code in TLA+, create a formal specification from implementation, or verify concurrent/distributed algorithms.

Software Development

Tlaplus Split Action

49

tlaplus/AgentSkills

Split a TLA+ action into two sequential actions by introducing a new program counter (pc) state. Handles pc variable updates, UNCHANGED statements, TypeOk predicates, and follows naming conventions with renumbering. Use when the user asks to split, divide, or break an action into two parts, or wants to add an intermediate step to an action sequence.

Software Development

Transparent Cutout Cleanup

49

0xheycat/isometric-game-skills

Use when removing backgrounds from generated sprites to get clean alpha edges with no halo, fringe, or leftover background pixels.

OtherIn 1 list

Tilemap Data Format

49

0xheycat/isometric-game-skills

Use when designing the map data format (layers, tiles, objects, metadata) so maps are editable, versionable, and engine-agnostic.

OtherIn 1 list

Bcm

43

NVIDIA/AI-Factory-Operations-Agent

Inspect Base Command Manager (BCM) inventory and health evidence, and make explicitly requested changes when Base Command Manager edit mode is enabled.

Other18

Tile Picking Interaction

49

0xheycat/isometric-game-skills

Use when converting a mouse/touch position into the correct isometric tile for selection, highlighting, and placement.

OtherIn 1 list

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.