Formal code verification
Writes Kani, CBMC and Frama-C proofs to show Rust and C code cannot panic, overflow or read out of bounds.
Claude's review
9/10 Excellent working Kani CBMC Frama C examples and failure table
We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.
In detail
Formal verification skill for systems code in Rust and C. Use when proving absence of panics, overflow or out-of-bounds access, writing Kani proof harnesses or function contracts, bounded model checking C with CBMC, proving ACSL contracts with Frama-C WP, or choosing between model checking, deductive verification, fuzzing and Miri. Activates on queries about Kani, cargo kani, kani::any, CBMC, nondet, unwinding assertion, Frama-C, ACSL, WP, EVA, Verus, Creusot, ESBMC, or formal verification.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: formal-verification
description: Formal verification skill for systems code in Rust and C. Use when proving absence of panics, overflow or out-of-bounds access, writing Kani proof harnesses or function contracts, bounded model checking C with CBMC, proving ACSL contracts with Frama-C WP, or choosing between model checking, deductive verification, fuzzing and Miri. Activates on queries about Kani, cargo kani, kani::any, CBMC, nondet, unwinding assertion, Frama-C, ACSL, WP, EVA, Verus, Creusot, ESBMC, or formal verification.
---
# 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 `assert`s, 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 |
```text
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
...From mohitmishra786's repository, MIT licence.
Related skills
-
Checked
Rust best practices
Writes and reviews idiomatic, maintainable Rust code and runs a checklist before handing it back to you.
7/101 credit -
Checked
Port code to Rust
Ports C, C++, Python, Go or JavaScript code into idiomatic Rust, with tests that prove it behaves the same.
8/101 credit -
Checked
Rust code review
Reviews Rust code for idiom, errors, safety and API design, with a ranked report and a fix for every finding.
7/101 credit -
Checked
Java Debugging Guide
Finds the cause of Java bugs and failing tests, and attaches a debugger safely in Maven, Gradle, Spring or Docker.
7/101 credit -
Checked
Python games with pygame
Builds and debugs 2D pygame games with a proper loop and delta time, so they run the same on any PC.
7/101 credit -
Checked
Go Benchmarking and Profiling
Writes Go benchmarks, profiles them with pprof and proves each speedup with benchstat before you claim it.
7/101 credit