dafny-verifier

Write Dafny programs with formal specifications and automated proofs.

17|2|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/rainoftime/pl-skills --skill dafny-verifier
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dafny-verifier
Source: https://github.com/rainoftime/pl-skills/tree/main/dafny-verifier
Command: npx skills add https://github.com/rainoftime/pl-skills --skill dafny-verifier

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires hoare-logic-verifier, smt-solver-interface, and includes references (resource) components.

What problem does it solve?

This Skill enables the creation of software that is mathematically proven to be correct, eliminating bugs and ensuring reliability for critical applications.

Core Features & Use Cases

  • Formal Verification: Write programs with specifications and proofs that are automatically checked.
  • Correctness Guarantees: Ensure algorithms and systems behave exactly as intended.
  • Use Case: Develop a critical financial transaction module where correctness is paramount, using Dafny to prove that no money is lost or created erroneously.

Quick Start

Use the dafny-verifier skill to write a Dafny program that proves the correctness of a sorting algorithm.

Frequently Asked Questions about dafny-verifier

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

FAQPage Schema
How do I formally verify program correctness for critical algorithms?

You can formally verify program correctness by writing code in the Dafny language, integrating formal specifications and proofs that are automatically checked to guarantee software reliability and eliminate bugs in critical applications.

What is formal verification and when do I need it for software engineering?

Formal verification is the process of using mathematical proofs to guarantee software correctness. You need formal verification for software engineering tasks requiring high assurance, such as developing critical algorithms, secure systems, and certified libraries where program termination and functional correctness are paramount.

How do I write a Dafny program to prove a sorting algorithm is correct?

To write a verified Dafny program, you define the sorting algorithm alongside formal specifications and proofs. The automated system then checks these proofs to mathematically guarantee that the algorithm behaves exactly as intended and satisfies functional correctness constraints.

Can I use automated verification for secure systems and certified libraries?

Yes, you can use automated verification for secure systems and certified libraries. By writing programs in Dafny with integrated formal specifications and proofs, you achieve high assurance of functional correctness and guaranteed program termination for critical software.

Do I need Hoare logic or SMT solvers to verify Dafny programs?

Dafny verification relies on underlying Hoare logic and SMT solver interfaces to automatically check formal specifications and proofs. You write the Dafny code with its proofs, and these dependencies handle the automated mathematical validation of functional correctness.