create-formal-verification-skill

create-formal-verification-skill is a skill for Claude Code, Cursor from backnotprop/pstack. It costs 82 tokens per session (1,225 once invoked), scanned A, a copy of create-formal-verification-skill, MIT.

A generator for a project-local skill that formally checks an important code property. Formal verification examines every case within a stated scope, such as all event orders in a model, instead of only the examples covered by ordinary tests.

In plain words
What is it for?
Use it to verify invariants, concurrency behaviour, retries, state machines, parsers, or other code where a failure would be costly.
Why use it?
Tests may miss rare races, retry sequences, parser inputs, or state transitions. This workflow chooses a high-risk, weakly tested area, selects a suitable verification tool, and leaves instructions for checking future changes.

Skill for Claude CodeCursor

Written for Claude Code and Cursor: disable-model-invocation in frontmatter, but also shipped in a Cursor plugin.

Part of the pstack plugin — 61 skills, 2 agents shipped together

Good fit Use it to verify invariants, concurrency behaviour, retries, state machines, parsers, or other code where a failure would be costly.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/backnotprop/pstack/create-formal-verification-skill
About the project

pstack is a collection of plain Agent Skills and engineering principles that guide AI-assisted software development across coding agents such as Claude Code, Codex, Pi, Cursor, and OpenCode. It is for developers who want reusable practices for tasks including testing, technical writing, debugging, review, and coordinating agent work. The catalogue entries are the project's skills, agents, and plugin.

backnotprop/pstack · 2,707 stars · on GitHub

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 backnotprop/pstack --skill create-formal-verification-skill
Clone the repo
git clone --depth 1 https://github.com/backnotprop/pstack

Made for: Claude Code, Cursor.

Or install pstack, the plugin that ships this one along with the rest of its 61 skills, 2 agents.

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 create-formal-verification-skill

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/backnotprop/pstack/create-formal-verification-skill"><img src="https://agentmods.dev/badge/skills/backnotprop/pstack/create-formal-verification-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,225 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. Third-party audits
  • Socket pass 19 Oct 2026
  • Snyk pass 19 Oct 2026
How audits are shown
Origin 95% copy Near-identical to another mod 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.00082 $0.01225
Opus 5.5 $0.00033 $0.00490
Sonnet 5.5 $0.00016 $0.00245
Haiku 4.5 $0.00008 $0.00122

Measured yesterday against content hash 5e489d938620, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create-formal-verification-skill 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 yesterday.

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.

Origin

This is a copy

95% identical to create-formal-verification-skill — 15 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/create-formal-verification-skill/SKILL.md · 44 lines

How it starts

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

Create a formal verification skill

A test checks the cases that someone thought to write. Formal verification checks every case in a stated scope: every order of steps in a model, every input up to a bound, or every input. This skill finds the part of the repo where that matters most, verifies one property of it, and leaves a project-local skill that lets the next agent check a change against that property. Write that skill for an agent who reads it cold, mid-change, and has never seen your work. The user must be able to trust the result and act on it without learning the verification language.

Choose the target from the code

Answer from the codebase, and 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 case that breaks it. Choose the strongest such target in the repo, not the one that is easiest to verify.

Let the question choose the tool

Pick the tool that answers the question at the lowest cost: a model checker, a proof assistant, an SMT-backed verifier, or another tool. Whether events can happen in a bad order usually suits a model checker over a small model of the design, and TLA+ is the default for that in any language. Whether the code itself behaves for every input, as with memory safety, overflow, or a data-structure invariant, usually suits a verifier that runs on the code. If no verifier runs on this language, say so, and test the real code with generated inputs, not a hand model of the function. A property that must hold at every size, where a bound is not enough, can need a proof. Prefer a tool that the repo's developers can install and run, and tell the user why you chose it.

What makes it good

  • True to the code. Every part of the model or proof points to code that a reviewer can open. What the verification treats as one indivisible step is one indivisible step in the code. Names come from this repo.
  • Able to fail. A check that you have never seen fail proves nothing. Show each property failing on a broken variant of the code it guards, such as a removed check or a reordered step.
  • Findings stay findings. When the current code breaks the property, report it with the counterexample in the code's terms. Do not weaken the property or the model until it passes, and do not change product code unless the user asks.
  • Honest about scope. Say what is verified, under which bounds and assumptions, and what is left out. A pass covers the model or the bound, not the whole system.
  • Readable without the tool. State the property and the harm in one plain sentence each. Tell a counterexample as a short sequence of steps in the code's words.
  • Cheap to rerun. One command, a reproducible tool version, and a run short enough that the next agent will use it on every relevant change.
  • Kept in step with the code. Record which files and functions each check covers, and the commit at which you last confirmed that the verification describes them. When the covered code changes after that commit, the next agent can see that the verification needs another look.

Read the full file on GitHub · 44 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. yesterday Changed · +2 lines 5e489d938620
  2. 5d ago First seen · 42 lines · 82 tokens per session scan A 6c934cd15a95

Subscribe to this mod's changes

create-formal-verification-skill is a skill published in the GitHub repository backnotprop/pstack (2,707 stars, last pushed yesterday), licensed MIT. It adds 82 tokens to every session and 1,225 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 95% identical to create-formal-verification-skill, differing in 15 lines, and is treated as a copy.

Related

Other skills, from other repositories

health

Audits agent config, instruction drift, hooks or MCP, and AI maintainability. Use when Claude, Codex, or Pi setup looks wrong. Not for application bugs or PR review.

tw93/Waza · 40 tokens

hunt

Finds root cause before any fix. Use when something errors, crashes, regresses, or used to work. Not for code review or new features.

tw93/Waza · 33 tokens

testing-blocks

Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request. Covers unit testing for utilities and logic, browser testing with Playwright, linting, and guidance on what to test and how.

adobe/skills · 61 tokens

qa

Read-only automated QA sweep of a deployed stardust site on AEM Edge Delivery Services — validates routing, content fidelity vs the source capture, template conformance, rendered integrity (geometry, JS errors, broken images), visual regression vs baselines, metadata/SEO/JSON-LD, link integrity, accessibility (axe)…

adobe/skills · 150 tokens

testing-dags

Complex DAG testing workflows with debugging and fixing cycles. Use for multi-step testing requests like "test this dag and fix it if it fails", "test and debug", "run the pipeline and troubleshoot issues". For simple test requests ("test dag", "run dag"), the airflow entrypoint skill handles it directly. This skill…

astronomer/agents · 77 tokens

bug-reproduction

Turn a vague bug report into a VERIFIED minimal reproduction and then a failing regression test, agent-driven end to end. Covers extracting the implicit repro from a thin report (env, build, steps, data), the reproduce-minimize-isolate-capture loop, git bisect to find the introducing commit, building a deterministic…

petrkindlmann/qa-skills · 252 tokens