prove-dev

prove-dev is a command for Claude Code from punt-labs/z-spec. It costs 10 tokens per session (6,189 once invoked), scanned A, original, MIT.

A proof-preparation command that turns a Z specification into Lean 4 proof obligations. Lean 4 is a programming language and proof checker used to verify mathematical claims about code and systems.

In plain words
What is it for?
Use it to generate obligations for initialization, state-preserving operations, or both, with or without Mathlib.
Why use it?
It makes key correctness questions explicit, such as whether initialization creates a valid state and operations preserve that validity.

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 generate obligations for initialization, state-preserving operations, or both, with or without Mathlib.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/punt-labs/z-spec/prove-dev/github.svg)](https://agentmods.dev/commands/punt-labs/z-spec/prove-dev)
Your own site
<a href="https://agentmods.dev/commands/punt-labs/z-spec/prove-dev"><img src="https://agentmods.dev/badge/commands/punt-labs/z-spec/prove-dev/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prove-dev

Your own site · 80×15
<a href="https://agentmods.dev/commands/punt-labs/z-spec/prove-dev"><img src="https://agentmods.dev/badge/commands/punt-labs/z-spec/prove-dev.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,189 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.
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.00010 $0.06189
Opus 5.5 $0.00004 $0.02476
Sonnet 5.5 $0.00002 $0.01238
Haiku 4.5 $0.00001 $0.00619

Measured 3mo ago against content hash 7268a254ceef, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prove-dev 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 3mo 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/prove-dev.md · 875 lines

How it starts

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

/z-spec-dev:prove-dev - Generate Lean 4 Proof Obligations

Translate a Z specification into Lean 4 proof obligations that formalize the key correctness properties: initialization establishes the state invariant, and every operation preserves it.

Input

Arguments: $ARGUMENTS

Parse arguments:

  • First positional argument: Z specification file (default: search docs/*.tex)
  • --obligations=all|init|preserve - which proof obligations to generate (default: all)
  • --no-mathlib - generate standalone Lean without Mathlib dependency (simpler but fewer tactics)

Process

0. Prerequisites

Verify Lean 4 and Lake are installed:

which lean >/dev/null 2>&1 || echo "LEAN_NOT_FOUND"
which lake >/dev/null 2>&1 || echo "LAKE_NOT_FOUND"

If lean or lake not found: Stop and tell the user:

Lean 4 is not installed. Run /z-spec-dev:setup-dev lean to install the Lean 4 toolchain via elan.

Verify version compatibility:

lean --version 2>&1

The output should show Lean 4.x. If it shows Lean 3.x or an error, advise the user to update via elan update.

The Z specification should already exist and have been type-checked (via /z-spec-dev:check-dev). If the user has not done this, suggest it but do not block — the translation can still proceed from a syntactically valid spec.

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
  • If multiple found, ask user to specify

Read the specification file.

2. Parse the Specification

Scan the specification and extract the following constructs. Each subsection describes what to look for and what to record.

2a. Given Sets

Look for given set declarations in \begin{zed} blocks:

\begin{zed}
[USERID, SESSIONID]
\end{zed}

Record each name. These become opaque types in Lean.

2b. Free Types

Look for free type definitions in \begin{zed} blocks:

\begin{zed}
Status ::= pending | active | suspended | closed
\end{zed}

Read the full file on GitHub · 875 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. 3mo ago First seen · 875 lines · 10 tokens per session scan A 7268a254ceef

Subscribe to this mod's changes

prove-dev is a command published in the GitHub repository punt-labs/z-spec (5 stars, last pushed yesterday), licensed MIT. It adds 10 tokens to every session and 6,189 once invoked, about $0.0000 per session on Opus 5.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.

Related

prove-dev compared with commands from other repositories

prove-dev next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
prove-devpunt-labs/z-specCommand5yesterdayMITA10Claude Code
feedback-to-uspunt-labs/prfaqCommand262d agoMITA19Claude Code
badgepunt-labs/prfaqCommand262d agoMITA11Claude Code
importpunt-labs/prfaqCommand262d agoMITA15Claude Code
researchpunt-labs/prfaqCommand262d agoMITA12Claude Code
streamlinepunt-labs/prfaqCommand262d agoMITA18Claude Code
reviewpunt-labs/prfaqCommand262d agoMITA12Claude Code