Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
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
  • Authors
  • 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
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Tla Model

ASecurity

Models concurrent and distributed designs in TLA+ or PlusCal and checks them with the TLC model checker. Use when asked to write, review, or debug a TLA+ spec, .tla/.cfg files, or TLC output, or to model-check or formally verify a protocol, lock, lease, consensus, replication, WAL, retry, or race condition. Do NOT use for unit or property-based tests (use test-writing) or for Lean, Coq, Dafny, or Verus proofs.

2 stars
0 votes
0 copies
0 views
Added 9/25/2026
ai-agentspythongojavabashnodegit

Security Analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned 9/25/2026

$npx -y skills add wilbeibi/wilbeibi-skills --skill tla-model --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tla Model?

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

Security grade badge for Tla Model
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wilbeibi-tla-model/badge)](https://www.skillsdirectory.com/skills/wilbeibi-tla-model)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: tla-model
description: Models concurrent and distributed designs in TLA+ or PlusCal and checks them with the TLC model checker. Use when asked to write, review, or debug a TLA+ spec, .tla/.cfg files, or TLC output, or to model-check or formally verify a protocol, lock, lease, consensus, replication, WAL, retry, or race condition. Do NOT use for unit or property-based tests (use test-writing) or for Lean, Coq, Dafny, or Verus proofs.
compatibility: uv (scripts/tlc.py runs as a uv script, Python 3.10+, no dependencies); Java 11+ and tla2tools.jar (scripts/tlc.py fetch downloads it).
---

# tla-model

The deliverable is a checked argument, not a `.tla` file: every property traces to a requirement, every action to an implementation event, and every green result survives mutation. TLC finding nothing means *no counterexample in this model at these bounds*; never call it a proof.

## Setup

```bash
scripts/tlc.py check examples/MiniLock.tla -c examples/MiniLock.cfg   # expect "result: clean", exit 0
scripts/tlc.py fetch            # if tla2tools.jar is missing; or set TLA2TOOLS_JAR
```

Missing Java: ask the user to install a JRE 11+; do not download one. `scripts/test_tlc.sh` self-tests the helper. PlusCal: run `scripts/tlc.py translate Spec.tla` before every check.

`tlc.py check` prints result, state counts, per-action coverage, the full trace, and `VACUITY:` flags. Exit 0 clean, 1 violation, 2 vacuous, 3 setup/parse error. `tlc.py mutant` applies one exact-match edit to a copy and exits 0 only when the named property catches it (`KILLED`).

A question about an existing spec or TLC output needs only `check` and the matching step below. Create files only when asked to model or verify a system. Keep that work in `spec/` beside the code: `modeling-brief.md`, `<Name>.tla`, one cfg per concern, `cex/`, `report.md`.

## Loop

1. **Brief before spec.** Fill [BRIEF-TEMPLATE.md](BRIEF-TEMPLATE.md) into `spec/modeling-brief.md`. Aim the question where bugs have lived: search `git log` and the issue tracker for fix, race, crash, deadlock, corrupt, and stale on the core files, group the hits by mechanism, and note where the code departs from the reference algorithm. Build the event→action table from the code you read, citing `file:line`, not from the paper the design resembles; a textbook Raft is not the user's Raft. List every open question and stop until the user answers. *Done:* every REQUIRED slot filled; the user has confirmed the fault model, atomicity, and exclusions.
2. **Grow the spec one layer at a time**: variables → `TypeOK` → `Init` → one named action → `Next`, then the next action. Run `check` after each layer. Give each action a comment naming its implementation event. *Done:* clean, no `VACUITY` flags, every action fired.
3. **Safety.** Add the invariants from the brief to a safety cfg with `CHECK_DEADLOCK TRUE`; turn deadlock checking off only when termination is the intended end state, and say so. Bound fault injections (crashes, drops, timeouts) with counters; leave normal operations unbounded. Run the bounds matrix from the brief, smallest first, plus one tight cfg per bug-history mechanism. A violation goes to step 6. *Done:* every brief property is enabled in at least one cfg, checked by reading the cfgs.
4. **Liveness, only after safety is clean.** Use one cfg per temporal property: TLC does not name which temporal property failed. Never use `SYMMETRY` in a liveness cfg. Each `WF`/`SF` term carries a comment naming the real mechanism behind it (FIFO queue, retransmit, lease expiry). If no mechanism exists, delete the term and report the starvation trace as a finding.
5. **Prove the properties bite.** For each invariant, delete the guard it depends on; for each liveness property, drop its fairness term:
   ```bash
   scripts/tlc.py mutant spec/Lock.tla -c spec/Safety.cfg --replace '/\ lock = None' '/\ TRUE' --expect Mutex
   ```
   `OLD` must match exactly once, so include the neighbouring text if it doesn't. A mutant that no longer parses exits 3 and proves nothing. A `SURVIVED` result means the property is too weak, redundant, or guards an unreachable action. Fix it and ask the user before changing any property's meaning. *Done:* every property has at least one `KILLED` mutant, recorded in the report.
6. **Counterexample loop.** Write each violation to `spec/cex/NNN.md` from [CEX-TEMPLATE.md](CEX-TEMPLATE.md):
   - Find the first state where things go wrong.
   - Map each step to a code event and a fault the brief allows.
   - Classify it: design, spec, property, config/bounds, mapping, or fairness/assumption.
   - REQUIRED: change exactly one of model, property, or cfg per round. Replay the trace, then rerun the whole matrix.
   - Never weaken a property, add fairness, or add a `CONSTRAINT` to turn a run green without the user's approval.
7. **Back to code.** A design-class counterexample is confirmed only when a test or fault-injection run against the implementation reproduces it and has actually been run. Otherwise report it as unconfirmed with the missing step. For high-stakes specs, add refinement or trace validation ([REFERENCE.md](REFERENCE.md#linking-spec-to-code)).
8. **Independent review.** Hand only the brief, spec, cfgs, and report to a reviewer with fresh context, such as a new session or another person. Ask them to attack it with the review checklist in [REFERENCE.md](REFERENCE.md#review-checklist). Fold the findings into step 6.

## Report (`spec/report.md`)

- Per cfg: TLC version, constants and bounds, generated/distinct states, depth, and result.
- Mutants: each property, its mutation, and KILLED/SURVIVED.
- Counterexamples: id, class, confirmed or unconfirmed, fix, and linked test or issue.
- Assumptions in force: fault model, atomicity choices, every fairness term and its mechanism, every `CONSTRAINT`.
- Not verified: behaviors outside the bounds or exclusions, and any claim that needs a parametric proof (TLAPS or an inductive invariant).

Claim only what the report shows. "No counterexample with 3 nodes, 2 values, queue ≤ 2" is the strongest sentence a green run supports.

Attribution

wilbeibiwilbeibi
View sourceSee grades on GitHubMore from wilbeibi →
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

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →