formal-verification

formal-verification is a skill for Claude Code from fcsouza/agent-skills. It costs 183 tokens per session (2,862 once invoked), scanned A, original, MIT.

A skill for checking one important rule with a formal model checker such as TLA+, or with property-based tests when a model checker cannot run on the real code. A model checker examines every step order within a stated model and bound, rather than only selected examples.

In plain words
What is it for?
Use it to create or maintain checks for concurrency, protocols, state machines, parsers, and other behaviour where the order or range of inputs matters.
Why use it?
Ordinary tests may miss races, retries, leases, out-of-order messages, state-machine errors, parser cases, or multi-device interactions. This makes the chosen scope explicit and leaves a check that can be run again.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the fstack plugin — 4 skills shipped together

Good fit Use it to create or maintain checks for concurrency, protocols, state machines, parsers, and other behaviour where the order or range of inputs matters.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fcsouza/agent-skills/formal-verification
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 fcsouza/agent-skills --skill formal-verification
Clone the repo
git clone --depth 1 https://github.com/fcsouza/agent-skills

Made for: Claude Code.

Or install fstack, the plugin that ships this one along with the rest of its 4 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 formal-verification

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/fcsouza/agent-skills/formal-verification"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/formal-verification.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 183 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,862 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.00183 $0.02862
Opus 5.5 $0.00073 $0.01145
Sonnet 5.5 $0.00037 $0.00572
Haiku 4.5 $0.00018 $0.00286

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

Security

Grade A, and why

formal-verification 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 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (references/example-job-lease/view.ts, scripts/dot-to-mermaid.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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-verification/SKILL.md · 141 lines

How it starts

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

Formal verification

A test checks the cases someone thought to write. A formal check covers every case in a stated scope: every order of steps in a model, every input up to a bound, or every input. This skill verifies one property where that matters, and leaves a way to recheck it.

Adapted from the create-formal-verification-skill, maintain-formal-verification-skill and statechart skills in pstack v0.15.46 by Lauren Tan, https://github.com/cursor/plugins/tree/main/pstack, under the MIT licence. Modified: one skill with two modes, a chart drawn from the checker's own output instead of a bundled toolchain, and a property-based route for code no verifier runs on. Licence details: NOTICE.md.

It is one layer, not a replacement for tests. A pass covers the model or the bound, never the whole system.

Pick the mode

  • Create: no check exists for this area. Go to "Create".
  • Maintain: a project skill already runs a model checker, a prover, a verifier or property-based tests against named code, and that code changed. Go to "Maintain".

Find an existing check by what it does, not by its name. If the user asks for maintenance and none exists, say so and offer Create.

Create

1. Choose the target from the code

Answer from the codebase. Ask the user only what you cannot observe. If the user named an area or a bug, start there.

A good target is a promise the code makes, where a break harms users and tests rarely reach the breaking case. Pick the strongest such target, not the one that is easiest to verify. Write the promise and the harm in one plain sentence each before you touch a tool:

  • Promise: "A job never commits its result twice."
  • Harm: "The customer is charged twice."

2. Let the question pick the tool

Question Tool
Can events happen in a bad order? A model checker over a small model of the design. TLA+ with TLC is the default, in any language. See references/tlc.md.
Does the code behave for every input? A verifier that runs on the code itself, if one exists for the language.
No verifier runs on this language Say so. Test the real code with generated inputs. See references/property-based.md. Never test a hand copy of the function.
Must it hold at every size, where a bound is not enough? A proof, for example in Lean. Costly. Say why a bound will not do.

Read the full file on GitHub · 141 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. 11d ago First seen · 141 lines · 183 tokens per session scan A 44514668d852

Subscribe to this mod's changes

formal-verification is a skill published in the GitHub repository fcsouza/agent-skills (29 stars, last pushed today), licensed MIT. It adds 183 tokens to every session and 2,862 once invoked, about $0.0007 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-11-23.

Related

formal-verification compared with skills from other repositories

formal-verification next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
formal-verificationfcsouza/agent-skillsSkill29todayMITA183Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82ktodayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill332k5d agoMITA21Claude Code