quint-co/quint/quint-lang
Claude Code and agent skill by quint-co/quint
- community
Checking that the SKILL.md file is still in the repository.
Quint language and CLI reference — the expert on Quint syntax, operators, types, `basicSpells`, the toolchain (typecheck/run/test/verify), and how to read simulation and counterexample output. Use when writing or debugging Quint (`.qnt`) files, fixing a typecheck/parse error, looking up an operator or idiom, analyzing an invariant violation or counterexample trace, or optimizing state-space exploration. For building a new model end-to-end from some source (including translating TLA+, or modeling code/requirements/an idea), use quint-modeling instead — it consults this reference for syntax as needed.
Install
npx vskill@latest install quint-co/quint/quint-langSKILL.md
Quint Language Reference
Quint is an executable specification language for complex systems, developed by Informal Systems. It compiles to TLA+ and supports simulation and model checking.
Module structure
Modules can import others:
Types
| Type | Description | Example | ||
|---|---|---|---|---|
int | Integers | -1, 0, 42 | ||
bool | Booleans | true, false | ||
str | Strings | "hello" | ||
Set[T] | Finite set | Set(1, 2, 3) | ||
List[T] | Ordered sequence | List(1, 2, 3) | ||
K -> V | Key-value map (type is K -> V, not Map[K, V]) | value: Map("a" -> 1) | ||
(T1, T2) | Tuple | (1, "x") | ||
{ f: T, g: U } | Record | { x: 1, ok: true } | ||
| `T \ | U` | Sum (variant) | (use type alias) |
Type aliases:
Definitions
const vs pure val: const is a module parameter bound at instantiation (import A(N = 3)); pure val is a fixed expression computed once. def vs val: def takes arguments; val does not.
State variables
State variables can only be read in val definitions and actions; they cannot be read in pure def.
Actions
Actions describe state transitions. They return bool — true if the action fires.
Key rules:
- Every
varmust be assigned in every action (usex' = xto leave unchanged). all { ... }— all sub-expressions must hold (conjunction). Guards are plain boolean expressions insideall { }.any { ... }— at least one must hold (disjunction); the REPL picks non-deterministically.
Non-determinism
Set operators
List operators
Map operators
Records
Records group related fields into a named type. They are the primary tool for modelling structured state in Quint.
Type aliases for records
Creating and accessing
Updating (immutable — returns a new record)
Records as state — when to group variables
TLA+ specs typically flatten all state into independent top-level variables. Quint's type system lets you group them. When fields describe one cohesive local state, make a record type and use a single state variable of that type.
Group into a record when:
- They represent the local state of a single actor (e.g. one node's phase + log + vote)
- They are always passed together as function arguments
- An invariant relates multiple fields of the same conceptual entity
Keep flat when:
- The variables represent distinct concerns that change independently
- The component is simple and grouping adds no clarity
- The variables are intentionally in different ownership/lifecycle domains
Example: preferred grouped local state vs. anti-pattern
Preferred (cohesive local state):
Avoid for cohesive local state:
For N actors, use a map of grouped records:
Nested records
Records in sets (messages, events)
Sum types
Sum types (variants) represent a value that can be one of several distinct cases.
Each variant has a named constructor and carries one payload. A constructor takes exactly one argument — wrap multiple fields in a record (as above) or a tuple.
Construct a value by calling the constructor:
Pattern-match with match, binding the payload:
Use _ to ignore the payload when you only care which variant it is:
Use sum types when a message, event, or state can take structurally different forms — not just different values of the same type.
Enum types
Enum types are a special case of sum types where each case has no additional data.
Variable grouping — decision guide
Before writing var declarations, answer these questions for each candidate group:
| Question | Group → record if... | Keep flat if... | |
|---|---|---|---|
| Do these vars always change together? | Yes, in most actions | No, they're independent | |
| Do they describe the same entity? | Same node / same message / same round | Different concerns | |
| Is there one instance or N instances? | Either one or N (group if cohesive; for N use Id -> RecordType) | Flat only when concerns are truly independent | |
| Do invariants relate them? | Invariant spans multiple fields of one entity | Invariant uses vars independently |
Boolean operators
and { } and or { } are the same operators as all { } and any { } in actions — use whichever reads more naturally in context.
Invariants and temporal properties
Assume
An assume states a premise about constants, but it is not enforced — a violated assume is silently ignored by quint typecheck, quint run, and quint verify (none of them flags it). It is documentation, not a checked constraint. To actually check a condition on constants, write a run test that asserts it (it executes and fails when the condition is false):
Run it with quint test; the test fails (reporting which conjunct broke) if a constant assignment violates the condition.
Conditional and let
REPL usage
Prefer CLI commands (quint typecheck, quint run, quint test, quint verify) for all validation and execution tasks. Open the REPL (quint or quint -r spec.qnt::ModuleName) only when you need expression-level interaction the CLI does not provide.
Type inspection:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/quint-lang/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/quint-co/quint/quint-lang)