kani-proof

Develop and verify Kani-based formal proofs for Rust programs.

155|24|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/workersio/spec --skill kani-proof
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kani-proof
Source: https://github.com/workersio/spec/tree/main/plugins/kani-proof/skills/kani-proof
Command: npx skills add https://github.com/workersio/spec --skill kani-proof

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables rigorous, automatic verification of Rust code using Kani, delivering exhaustive proofs for properties like conservation, frame isolation, and arithmetic safety.

Core Features & Use Cases

  • Generates Kani-proof templates and references for Rust codebases using kani::proof, kani::Arbitrary, and related macros.
  • Provides guidance on invariant design, delta proofs, and multi-step proof workflows (P1–P12) to ensure robust correctness.
  • Use cases include validating cryptographic primitives, safety-critical systems, and performance-sensitive libraries to detect panics, overflows, or logic errors before deployment.

Quick Start

Create a Kani proof harness for a target Rust function and run cargo kani to verify it.

Frequently Asked Questions about kani-proof

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a formal proof harness in Rust to verify conservation properties?

To write a formal proof harness in Rust, you annotate target functions with #[kani::proof] and use kani::Arbitrary to generate inputs. This Skill guides building robust harnesses to automatically verify conservation, frame isolation, and arithmetic safety properties.

What is the best way to verify Rust code for panics and arithmetic overflows before deployment?

Verifying Rust code for panics and overflows is best achieved by running cargo kani on a generated proof harness. This Skill generates Kani-proof templates and applies multi-step proof workflows to exhaustively detect logic errors and arithmetic safety issues.

Can I use Kani model checking for safety-critical Rust libraries?

Yes, Kani model checking is suitable for safety-critical Rust libraries. This Skill applies formal verification to validate cryptographic primitives and performance-sensitive systems, ensuring robust correctness through invariant configuration and inductive delta proofs.

How do I configure invariants and perform inductive delta proofs for scalable Rust verification?

You configure invariants and perform inductive delta proofs by applying the Skill's reference templates and proof patterns. It guides you through multi-step proof workflows (P1–P12) to ensure scalable and robust verification of Rust programs.

Does Kani formal verification require specific macros for Rust functions?

Kani formal verification requires applying specific macros to your Rust functions. You integrate kani::, #[kani::proof], or #[kani::unwind] attributes into your codebase, which this Skill detects to build and verify the corresponding proof harnesses.