check

check is a command for coding agents from punt-labs/z-spec. It costs 7 tokens per session (1,033 once invoked), scanned A, a copy of check-dev, MIT.

A command that type-checks a Z specification with fuzz, a tool that checks whether the formal notation is used consistently. It reports errors with their file locations and can produce a result file for viewing.

In plain words
What is it for?
Use it on a selected .tex specification or let it find candidates in docs. Run it when validating a Z model before rendering, animation, or model checking.
Why use it?
It catches malformed types and rules before the specification is used for further analysis. It can also warn about patterns that may pass checking but fail during animation.

Command

Part of the z-spec-dev plugin — 42 commands, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/punt-labs/z-spec/check
Clone the repo
git clone --depth 1 https://github.com/punt-labs/z-spec

Or install z-spec-dev, the plugin that ships this one along with the rest of its 42 commands, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for check

README.md
[![agentmods](https://agentmods.dev/badge/commands/punt-labs/z-spec/check.svg)](https://agentmods.dev/commands/punt-labs/z-spec/check)
Your own site
<a href="https://agentmods.dev/commands/punt-labs/z-spec/check"><img src="https://agentmods.dev/badge/commands/punt-labs/z-spec/check.svg" alt="Measured on agentmods" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,033 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00007 $0.01033
Opus 5 $0.00003 $0.00517
Sonnet 5 $0.00001 $0.00207
Haiku 4.5 $0.00001 $0.00103

Measured 4d ago against content hash 906629c904f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

check scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

92% identical to check-dev — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugin/commands/check.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Check Z Specification with Fuzz

Type-check a Z specification using the fuzz type-checker.

Input

File: $ARGUMENTS

Process

1. Locate the Specification

If a file path is provided, use it directly.

If no file specified:

  • Look in docs/ for .tex files containing Z specifications
  • Present options if multiple files exist

2. Type-check

Call mcp__plugin_z-spec_zspec__check with file set to the resolved path.

3. Report

The tool returns an object with ok (bool) and errors (list).

If the returned JSON has an error field (e.g. the binary is not installed), show that message to the user and stop — do not render the normal result.

  • ok: truefuzz: <name> OK.
  • ok: falsefuzz: <name> FAIL, then one line per error, indented two spaces: <line>:<column>: <message>.

The tool has written <stem>.fuzz.json; the show tool renders it in the Fuzz tab.

4. Animation Readiness Warnings

After a successful fuzz type-check, scan the specification for patterns that pass fuzz but cause probcli animation failures. For each pattern found, emit a warning. Only emit warnings that actually apply to the spec.

Checklist (prefix each with "Animation hint:"):

  • Unbounded \finset or \pfun: Any \finset X or X \pfun Y where X is a given set (declared with [X] syntax, not a free type declared with Type ::= ...) and there is no cardinality bound — either a direct \# variable \leq maxBound constraint or a domain subset constraint like \dom variable \subseteq boundedSet where boundedSet itself has a cardinality bound. Free types are already finite and do not need cardinality bounds. Fix: add an axdef constant and a cardinality constraint, or constrain the domain to a bounded set.

  • Cross products for records: Any \cross used to combine 3+ types (e.g., X \cross Y \cross Z) where a named schema with fields would be more appropriate. Fix: define a schema with named fields instead.

  • Bare-type quantifiers: Any \forall or \exists that quantifies over a given type directly (e.g., \forall n : NAME) instead of over a set from state (e.g., \forall n : members). Fix: scope the quantifier to the relevant state set.

Read the full file on GitHub · 81 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 81 lines · 7 tokens per session scan A 906629c904f0

Subscribe to this mod's changes

check is a command published in the GitHub repository punt-labs/z-spec (5 stars, last pushed today), licensed MIT. It adds 7 tokens to every session and 1,033 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to check-dev, differing in 4 lines, and is treated as a copy.