setup

setup is a command for Claude Code from punt-labs/z-spec. It costs 11 tokens per session (13,394 once invoked), scanned A, original, MIT.

A setup command for installing and checking tools used to develop Z specifications. These include fuzz for type-checking, ProB's probcli for model analysis, and Lean 4 with Lake for proving properties.

In plain words
What is it for?
Use it to check installed tools or install fuzz, probcli, Lean 4, or all three, including the required TeX files for fuzz.
Why use it?
It removes the manual work of finding, installing, and checking the separate dependencies needed by the other Z-specification commands.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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

Good fit Use it to check installed tools or install fuzz, probcli, Lean 4, or all three, including the required TeX files for fuzz.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/punt-labs/z-spec/setup
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.

Clone the repo
git clone --depth 1 https://github.com/punt-labs/z-spec

Made for: Claude Code.

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 setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/punt-labs/z-spec/setup.svg)](https://agentmods.dev/commands/punt-labs/z-spec/setup)
Your own site
<a href="https://agentmods.dev/commands/punt-labs/z-spec/setup"><img src="https://agentmods.dev/badge/commands/punt-labs/z-spec/setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 13,394 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. ✓ AI security review Sonnet 5 · 7 Sept 2026 📄 Read the review
Origin original No closer match found 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.1 $0.00011 $0.13394
Opus 5 $0.00005 $0.06697
Sonnet 5 $0.00002 $0.02679
Haiku 4.5 $0.00001 $0.01339

Measured 8d ago against content hash 00aad2e810b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

setup 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 8d 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.

plugin/commands/setup.md · 1,129 lines

How it starts

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

Setup Z Specification Tools

You are helping the user install and configure the tools needed for Z specification development.

Input

Arguments: $ARGUMENTS

Parse as:

  • check - Check what's installed and report status
  • fuzz - Install fuzz type-checker
  • probcli - Install ProB command-line interface
  • lean - Install Lean 4 theorem prover (elan + lean + lake)
  • all - Install fuzz, probcli, and lean
  • (no argument) - Same as check

Note: /z-spec:setup fuzz installs fuzz.sty and the oxsz Metafont sources into your TeX distribution's home tree (kpsewhich -var-value TEXMFHOME) once, for your user account — not per project. Neither /z-spec:check nor /z-spec:test copies TeX files anywhere; both simply read whatever kpsewhich already resolves. /z-spec:code2model is the one command that copies fuzz.sty and the Metafont sources into a project's docs/ directory; run /z-spec:cleanup to remove what it copied. /z-spec:create does not exist.

Process

1. Detect Platform

uname -s  # Darwin, Linux, etc.
uname -m  # arm64, x86_64, etc.

2. Check Current Status

Always start by checking what's already installed:

# Check fuzz. $FUZZ wins, then PATH — the order resolve_fuzz() uses. Note
# there is no conventional-path fallback for fuzz: a binary sitting outside
# PATH and unnamed by $FUZZ is a binary the engine will not find, however
# well it runs when you type its full path.
if [ -n "${FUZZ:-}" ] && [ -f "$FUZZ" ]; then
  FUZZ_BIN="$FUZZ"
else
  FUZZ_BIN="$(command -v fuzz 2>/dev/null)"
fi

if test -x "$FUZZ_BIN"; then
  echo "fuzz: $FUZZ_BIN"
  # fuzz has no -version flag: passing one lands on the 'e' in "version" and
  # prints the usage banner instead, with exit 2. -Dv is the debug flag that
  # prints the real version banner, and it needs input on stdin because fuzz
  # always reads a file — or, given none, stdin — before doing anything else.
  "$FUZZ_BIN" -Dv < /dev/null
elif test -e "$FUZZ_BIN"; then
  echo "fuzz: NOT EXECUTABLE at $FUZZ_BIN"
else
  echo "fuzz: NOT FOUND (not on PATH, and \$FUZZ does not name it)"
fi

# Check probcli, and report which version. Presence alone is not enough: a
# 1.16.x install answers every check in this section and still fails the
# coverage tier of every specification, so a bare "found" here would send the
# user off to discover that one command later with nothing pointing back.
# $PROBCLI wins, then PATH, then the conventional path — the order
# resolve_probcli() uses. Resolving any other way would make this report
# describe a binary the other commands are not going to run, which is the
# whole failure this section exists to prevent.
if [ -n "${PROBCLI:-}" ] && [ -f "$PROBCLI" ]; then
  PROBCLI_BIN="$PROBCLI"
else
  PROBCLI_BIN="$(command -v probcli 2>/dev/null || echo "$HOME/Applications/ProB/probcli")"
fi

if test -x "$PROBCLI_BIN"; then
  PROB_VER="$("$PROBCLI_BIN" -version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1)"
  echo "probcli: $PROBCLI_BIN (version ${PROB_VER:-unreadable})"
  test "$PROB_VER" = "1.15.1" || echo "  WARNING: z-spec needs 1.15.1 — see 'Choosing a version' below"
elif test -e "$PROBCLI_BIN"; then
  echo "probcli: NOT EXECUTABLE at $PROBCLI_BIN"
else
  echo "probcli: NOT FOUND"
fi

# Check fuzz.sty in the TeX path. kpsewhich prints nothing and exits nonzero
# when it finds nothing, which is silence where a status line belongs.
if FUZZ_STY="$(kpsewhich fuzz.sty 2>/dev/null)" && [ -n "$FUZZ_STY" ]; then
  echo "fuzz.sty: $FUZZ_STY"
else
  echo "fuzz.sty: NOT FOUND in the TeX path"
fi

# Check Tcl/Tk. probcli needs it on some systems and not others, so absence
# here is a note, not a verdict — the probcli line above is the real test.
if command -v wish >/dev/null 2>&1; then
  echo "tcl/tk: $(command -v wish)"
else
  echo "tcl/tk: no wish on PATH (only matters if probcli reports a missing library)"
fi

# Check the Lean toolchain (optional, for /z-spec:prove). Three states, the
# same three section 6 reports: on PATH, present under ~/.elan/bin but not on
# PATH, or absent. /z-spec:prove looks on PATH and nowhere else, so the middle
# state is a real distinction and not a formality.
for lean_tool in elan lean lake; do
  if command -v "$lean_tool" >/dev/null 2>&1; then
    echo "$lean_tool: $(command -v "$lean_tool")"
    "$lean_tool" --version
  elif [ -x ~/.elan/bin/"$lean_tool" ]; then
    echo "$lean_tool: at ~/.elan/bin but NOT on PATH — /z-spec:prove will not see it"
  else
    echo "$lean_tool: NOT FOUND (optional)"
  fi
done

Read the full file on GitHub · 1,129 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. 8d ago First seen · 1,129 lines · 11 tokens per session scan E 00aad2e810b0

Subscribe to this mod's changes

setup is a command published in the GitHub repository punt-labs/z-spec (5 stars, last pushed today), licensed MIT. It adds 11 tokens to every session and 13,394 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.