spec-iterate

Translate natural language algorithm descriptions into formal Dafny specifications with verification support.

5|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/nicholls-inc/claude-code-marketplace --skill spec-iterate
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: spec-iterate
Source: https://github.com/nicholls-inc/claude-code-marketplace/tree/main/crosscheck/skills/spec-iterate
Command: npx skills add https://github.com/nicholls-inc/claude-code-marketplace --skill spec-iterate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users translate natural language descriptions into formal Dafny specifications, ensuring correctness and clarity before implementation.

Core Features & Use Cases

  • Draft Dafny Specifications: Converts user-provided descriptions into formal method signatures with preconditions, postconditions, and invariants.
  • Verification Assistance: Supports iterative verification and refinement by integrating with the Dafny verifier to ensure specifications are logically consistent.
  • Use Case: For example, when a user describes a sorting algorithm, this Skill generates a Dafny method specifying the sorting properties and verifies its correctness automatically.

Quick Start

Describe your algorithm or function to the AI, and request a formal Dafny specification for it.

Frequently Asked Questions about spec-iterate

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

FAQPage Schema
How do I generate Dafny specifications from natural language algorithm descriptions?▼

You can generate Dafny specifications from natural language by providing an algorithm description to the AI, which translates it into formal method signatures with preconditions, postconditions, and invariants for verification.

What is formal verification in Dafny and how does it handle invariants?▼

Formal verification in Dafny ensures algorithm correctness by checking logical consistency through method specifications, handling preconditions, postconditions, and loop invariants to verify termination conditions and correctness properties.

Can I use natural language to define preconditions and postconditions for Dafny methods?▼

Yes, you can use natural language to define Dafny method preconditions and postconditions, allowing the AI to draft formal specifications while ensuring correctness properties and logical consistency before implementation.

Does this approach support iterative verification and refinement of Dafny specifications?▼

Yes, this approach supports iterative verification and refinement by integrating with the Dafny verifier, allowing you to automatically verify correctness properties and logically refine specifications until they are consistent.

What's the best way to document sorting algorithm correctness properties using Dafny?▼

The best way to document sorting algorithm correctness is translating the algorithm description into a formal Dafny specification, generating a method with sorting properties that the verifier checks automatically for logical consistency.