smt-verify

smt-verify is a skill for Claude Code from kotaroyamame/formal-agent-contracts. It costs 118 tokens per session (2,508 once invoked), scanned A, original, MIT.

A verification workflow that turns VDM-SL proof obligations into SMT-LIB and checks them with the Z3 solver. VDM-SL is a formal language for describing software precisely; proof obligations are conditions that must hold for a specification to be correct.

In plain words
What is it for?
Generating proof obligations with VDMJ, translating them, declaring the needed types and constraints, and verifying the results with Z3.
Why use it?
It automates part of checking whether formal specifications satisfy the conditions generated by VDMJ and can expose counterexamples when they do not.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the formal-agent-contracts plugin — 15 skills shipped together

Good fit Generating proof obligations with VDMJ, translating them, declaring the needed types and constraints, and verifying the results with Z3.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kotaroyamame/formal-agent-contracts/smt-verify
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.

Any agent
npx skills add kotaroyamame/formal-agent-contracts --skill smt-verify
Clone the repo
git clone --depth 1 https://github.com/kotaroyamame/formal-agent-contracts

Made for: Claude Code.

Or install formal-agent-contracts, the plugin that ships this one along with the rest of its 15 skills.

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 smt-verify

README.md
[![agentmods](https://agentmods.dev/badge/skills/kotaroyamame/formal-agent-contracts/smt-verify/github.svg)](https://agentmods.dev/skills/kotaroyamame/formal-agent-contracts/smt-verify)
Your own site
<a href="https://agentmods.dev/skills/kotaroyamame/formal-agent-contracts/smt-verify"><img src="https://agentmods.dev/badge/skills/kotaroyamame/formal-agent-contracts/smt-verify/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 smt-verify

Your own site · 80×15
<a href="https://agentmods.dev/skills/kotaroyamame/formal-agent-contracts/smt-verify"><img src="https://agentmods.dev/badge/skills/kotaroyamame/formal-agent-contracts/smt-verify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,508 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.00118 $0.02508
Opus 5.5 $0.00047 $0.01003
Sonnet 5.5 $0.00024 $0.00502
Haiku 4.5 $0.00012 $0.00251

Measured 23d ago against content hash c2eb7e485251, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

smt-verify 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 23d 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.

skills/smt-verify/SKILL.md · 213 lines

How it starts

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

PO → SMT-LIB Conversion and Z3 Verification

Convert proof obligations (POs) generated by VDMJ into SMT-LIB format and verify them with Z3.

VDMJが生成した証明責務(PO)をSMT-LIB形式に変換し、Z3で自動検証する。

Prerequisites

Z3 Installation Check

command -v z3

If Z3 is unavailable, report this check as not run. Use a project virtual environment and a pinned z3-solver version when installing is in scope; do not modify the system Python environment.

Z3がない場合は未実行と報告する。導入が作業範囲に含まれる場合は、プロジェクトの仮想環境と固定versionを使う。

VDMJ Setup

Locate the VDMJ JAR using the same method as the verify-spec skill.

verify-specスキルと同じ方法でVDMJ JARを特定する。

Verification Flow

Evidence boundary

Follow verification result rules. Preserve the source PO, generated SMT file, assumptions, input hashes, tool version, command, exit status and logs. The translation rules are guidance for generated formulas, not a verified VDM-to-SMT compiler. A solver result proves or refutes the submitted formula under its assumptions; source-PO correspondence and implementation refinement require separate evidence. Never disable runtime contracts solely because a spec PO was proved.

Step 1: PO Generation

Generate POs using verify-spec. Reuse existing output only when input hashes, VDMJ version and generation options match and the original run completed without errors; otherwise regenerate.

verify-specの手順でPOを生成する。既存出力は入力ハッシュ・VDMJ版・生成条件の一致と実行成功を確認できる場合だけ再利用する。

java -jar <VDMJ_JAR> -vdmsl <files...> -p 2>&1

Step 2: Convert Each PO to SMT-LIB

For each generated PO, perform the following conversion steps.

各POについて以下の手順で変換する。

2a. Generate Type Declarations

Scan all types appearing in the PO and declare them in SMT-LIB. Follow conversion rules in references/type-mapping-rules.md.

Key mappings:

  • nat → Int + (>= x 0) constraint
  • nat1 → Int + (>= x 1) constraint
  • Record types → declare-datatypes + constructors/selectors
  • seq1 of char → String + (> (str.len s) 0) constraint
  • map K to V → uninterpreted sort + map_apply/map_dom functions
  • set of T → (Array T Bool) characteristic function representation

Read the full file on GitHub · 213 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 23d ago Changed · +7 lines c2eb7e485251
  2. 3mo ago First seen · 206 lines · 118 tokens per session scan A 875e9e298bc5

Subscribe to this mod's changes

smt-verify is a skill published in the GitHub repository kotaroyamame/formal-agent-contracts (1 stars, last pushed 18d ago), licensed MIT. It adds 118 tokens to every session and 2,508 once invoked, about $0.0005 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

smt-verify compared with skills from other repositories

smt-verify next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
smt-verifykotaroyamame/formal-agent-contractsSkill118d agoMITA118Claude Code
math-and-combinatoricssequenzia/agent-alchemySkill466mo agoMITA72Claude Code
mathodology-agent-pipelinesweetcornna/mathodologySkill35311d agoMITA24Claude Code, Codex
review-depthjszmajda/lidSkill122yesterdayMITA93Claude Code
diagrammingxobotyi/cc-foundrySkill23yesterdayMITA56Claude Code
gan-zhong-xuely8427/gan-zhong-xueSkill122d agoMITA288Claude Code
arxiv0xmariowu/AutosearchSkill5710d agoMITA0Claude Code