formal-verification

formal-verification is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 126 tokens per session (3,492 once invoked), scanned A, original, MIT.

A guide to formally checking Rust and C code for specific safety properties instead of relying only on running tests. It covers Kani, CBMC, Frama-C, proof harnesses, and function contracts.

In plain words
What is it for?
Use it to write verification harnesses and contracts, check bounded executions, read counterexamples, and fix failed proofs in systems code.
Why use it?
It helps find or prove the absence of panics, integer overflow, invalid memory access, and other errors that ordinary tests may miss. It also helps choose between model checking and other verification methods.

Skill for Claude CodeCodex

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

Good fit Use it to write verification harnesses and contracts, check bounded executions, read counterexamples, and fix failed proofs in systems code.

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

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-verification

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/formal-verification/github.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/formal-verification)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/formal-verification"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-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/mohitmishra786/low-level-dev-skills/formal-verification"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/formal-verification.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,492 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00126 $0.03492
Opus 5.5 $0.00050 $0.01397
Sonnet 5.5 $0.00025 $0.00698
Haiku 4.5 $0.00013 $0.00349

Measured 13d ago against content hash 43c883223e91, 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 1 finding 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 13d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

cargo kani setup # downloads the pinned toolchain and CBMC (needs rustup, curl)
skills/runtimes/formal-verification/SKILL.md · 355 lines

How it starts

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

Formal Verification for Systems Code

Purpose

Guide agents through practical formal verification of Rust and C (checked with Kani 0.68, CBMC 6.6 and Frama-C 33.0): choosing a tool, writing harnesses and contracts, reading counterexamples, and fixing the common failures.

Triggers

  • "How do I prove this Rust function can't panic or overflow?"
  • "How do I write a Kani proof harness?"
  • "How do I model check C code with CBMC?"
  • "What does 'unwinding assertion' mean?"
  • "How do I prove an ACSL contract with Frama-C?"
  • "Should I use fuzzing, Miri or a model checker?"

Workflow

1. Choosing a tool

Tool Language Technique Proves
Kani Rust Bounded model checking (CBMC backend) No panics, overflow, UB in unsafe; user assert!s; function contracts
CBMC C/C++ Bounded model checking Bounds, pointer, overflow checks; user asserts, up to a loop bound
ESBMC C/C++ Bounded model checking (SMT) Similar to CBMC
Frama-C WP C Deductive (ACSL contracts → provers) Full contracts for all inputs, loops via invariants
Frama-C EVA C Abstract interpretation Absence of runtime errors, sound but may raise false alarms
Verus, Creusot Rust Deductive Full functional correctness, needs specs and invariants
What do you need?
├── Find bugs fast, any input → fuzzing (skills/runtimes/fuzzing)
├── Check one execution for UB in unsafe Rust → Miri
├── Prove a property for ALL inputs, bounded loops → Kani (Rust) / CBMC (C)
├── Prove a C contract for all inputs, unbounded loops → Frama-C WP
└── Prove a whole C program free of runtime errors → Frama-C EVA

Bounded model checkers are exhaustive up to the loop bound you give them. Code with unbounded loops needs a bound plus an unwinding assertion, or contracts and invariants.

2. Kani: proof harnesses

cargo install --locked kani-verifier
cargo kani setup              # downloads the pinned toolchain and CBMC (needs rustup, curl)
cargo kani                    # run every #[kani::proof] in the crate
cargo kani --harness ring_fifo_order

Read the full file on GitHub · 355 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. 13d ago First seen · 355 lines · 126 tokens per session scan A 43c883223e91

Subscribe to this mod's changes

formal-verification is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (310 stars, last pushed 14d ago), licensed MIT. It adds 126 tokens to every session and 3,492 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-21.

Related

formal-verification compared with skills from other repositories

formal-verification next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
formal-verificationmohitmishra786/low-level-dev-skillsSkill31014d agoMITA126Claude Code, Codex
ecommerce-marketing-strategy-buildernexscope-ai/eCommerce-SkillsSkill1.6k23d agoMITA112Claude Code, Codex
product-description-generatornexscope-ai/eCommerce-SkillsSkill1.6k23d agoMITA126Claude Code, Codex
shopify-marketingnexscope-ai/eCommerce-SkillsSkill1.6k23d agoMITA60Claude Code, Codex
tiktok-shop-cross-bordernexscope-ai/eCommerce-SkillsSkill1.6k23d agoMITA55Claude Code, Codex
ecommerce-landing-pagenexscope-ai/eCommerce-SkillsSkill1.6k23d agoMITA45Claude Code, Codex
market-gap-analysisnexscope-ai/eCommerce-SkillsSkill1.6k23d agoMITA38Claude Code, Codex