formal-spec-z3-verifier

formal-spec-z3-verifier is a skill for Claude Code, Codex from roedyrustam/vibes-plug. It costs 104 tokens per session (2,567 once invoked), scanned A, original, MIT.

A guide to formally checking software rules with mathematical specifications and solver tools such as Z3, Dafny, and TLA+. Formal verification means proving that specified conditions hold across possible states and transitions.

In plain words
What is it for?
Use it to model financial ledgers, subscription states, access-control policies, and concurrent systems, then check their invariants and allowed transitions.
Why use it?
Ordinary tests check selected examples, while complex state changes or permission rules may fail in combinations that were not tested. This approach helps find violations in billing, authorization, concurrency, and isolation designs before implementation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to model financial ledgers, subscription states, access-control policies, and concurrent systems, then check their invariants and allowed transitions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/roedyrustam/vibes-plug/formal-spec-z3-verifier
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 roedyrustam/vibes-plug --skill formal-spec-z3-verifier
Clone the repo
git clone --depth 1 https://github.com/roedyrustam/vibes-plug

Made for: Claude Code, Codex.

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 formal-spec-z3-verifier

README.md
[![agentmods](https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/formal-spec-z3-verifier/github.svg)](https://agentmods.dev/skills/roedyrustam/vibes-plug/formal-spec-z3-verifier)
Your own site
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/formal-spec-z3-verifier"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/formal-spec-z3-verifier/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 formal-spec-z3-verifier

Your own site · 80×15
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/formal-spec-z3-verifier"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/formal-spec-z3-verifier.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,567 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.00104 $0.02567
Opus 5.5 $0.00042 $0.01027
Sonnet 5.5 $0.00021 $0.00513
Haiku 4.5 $0.00010 $0.00257

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

Security

Grade A, and why

formal-spec-z3-verifier 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 7d 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/formal-spec-z3-verifier/SKILL.md · 214 lines

How it starts

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

formal-spec-z3-verifier — vibes-plug Skill

English | Bahasa Indonesia


English

Orchestration & Integration

Connects and orchestrates with brainstorming, zero-to-prod-orchestrator, saas-billing, doku-payment-gateway, authentication-identity-expert, and database-orm-expert to mathematically prove software invariants, state transitions, and authorization policies using formal SMT solvers before writing production code.

Description

Production guide for applying formal methods, mathematical specifications, and SMT (Satisfiability Modulo Theories) solvers (Z3, Dafny, TLA+) to mission-critical software systems. Proves zero-invariant violation across double-entry ledger bookkeeping, billing subscription state machines, multi-tenant isolation boundaries, and cryptographic key lifecycle models.

Trigger Conditions

Activate this skill when:

  • Designing financial ledgers, wallets, or payment gateway state transition graphs.
  • Verifying complex RBAC/ABAC permission rules to guarantee that privilege escalation is mathematically impossible.
  • Modeling concurrent or distributed state machines where race conditions could cause state desynchronization.
  • Formulating formal invariant specifications prior to backend ORM and database schema generation.

Core Concepts & Patterns

1. Invariant Specification Matrix
System Domain Mathematical Invariant Solver Check
Double-Entry FinTech Ledger $\sum \text{Debits} - \sum \text{Credits} = 0 \land \forall a, \text{balance}(a) \ge 0$ Prove balance preservation across all concurrent transactions
SaaS Billing State Machine $\text{State} \in { \text{Trial}, \text{Active}, \text{PastDue}, \text{Canceled} }$ with strict monotonic transitions Prove unreachable illegal transition (e.g. Canceled $\to$ Active without Payment)
Multi-Tenant Authorization $\forall r \in \text{Resources}, \text{TenantId}(r) = \text{Session}(\text{TenantId})$ Prove satisfiability of data leakage equals $\emptyset$

Read the full file on GitHub · 214 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. 7d ago Changed 23210e39b4ca
  2. 12d ago First seen · 214 lines · 104 tokens per session scan A a21220bccb77

Subscribe to this mod's changes

formal-spec-z3-verifier is a skill published in the GitHub repository roedyrustam/vibes-plug (75 stars, last pushed 2d ago), licensed MIT. It adds 104 tokens to every session and 2,567 once invoked, about $0.0004 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-10-04.

Related

Other skills, from other repositories

test-driven-development

Drives development with tests using the red-green-refactor loop. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality. Use when asked to add tests to a function, fix a bug…

addyosmani/agent-skills · 92 tokens

browser-testing-with-devtools

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be…

addyosmani/agent-skills · 68 tokens

spec-driven-eval

Scores how completely an implementation fulfills a PRD/spec, case by case, and produces a single comparable final grade. Invoke only when explicitly named (e.g. run spec-driven-eval); do not auto-trigger. Use when benchmarking spec-driven implementations, grading acceptance criteria, evaluating whether a feature was…

tech-leads-club/agent-skills · 123 tokens

tlc-implement

Implement a work already planned: extracts a checklist, builds it, and proves every check with an independent verifier. Use when the user says "extract a checklist", "build this ticket", "implement this spec", or "tlc-implement". Do NOT use when nobody has decided what to build, or to design the work.

tech-leads-club/agent-skills · 71 tokens

tlc-spec-lean

Spec-driven feature work that freezes obligations instead of the plan: one human-reviewed plan with EARS criteria, path, entities, interface and one-way doors, then proof-backed checks, then build, then an independent Verifier. Use when the user says "tlc-spec-lean", "plan feature", "specify feature", "write the…

tech-leads-club/agent-skills · 117 tokens

playwright-skill

Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test websites, automate browser interactions…

tech-leads-club/agent-skills · 95 tokens