rust-contract

Define design-by-contract constraints and Martin Fowler test plans for Rust projects.

1|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/lprior-repo/claude-skills --skill rust-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-contract
Source: https://github.com/lprior-repo/claude-skills/tree/main/rust-contract
Command: npx skills add https://github.com/lprior-repo/claude-skills --skill rust-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design-by-contract specifications and structured test plans for Rust projects to ensure alignment between requirements and development, without producing production code.

Core Features & Use Cases

  • Design-by-contract definitions (preconditions, postconditions, invariants) for Rust functions.
  • Martin Fowler style Given-When-Then test plans to drive specification-first testing.
  • Output artifacts contract-spec.md and martin-fowler-tests.md to guide development and verification.

Quick Start

Provide bead ID or feature description to generate contract and test plans for Rust.

Frequently Asked Questions about rust-contract

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

FAQPage Schema
How do I generate design-by-contract specifications for a Rust API?

You can generate design-by-contract specifications by providing a feature description, which produces a contract-spec.md file detailing preconditions, postconditions, and invariants for Rust functions without writing production code.

What is the best way to create Given-When-Then test plans for Rust projects?

Creating Given-When-Then test plans involves providing a feature description to generate a martin-fowler-tests.md file, applying Martin Fowler style structured tests to drive specification-first Rust development and verification.

Can I define preconditions and postconditions for Rust functions without writing implementation code?

Yes, you can define preconditions and postconditions for Rust functions without writing implementation code by generating contract-spec.md and martin-fowler-tests.md artifacts first, ensuring alignment between requirements and development.

How do Martin Fowler test plans work with design-by-contract in Rust?

Martin Fowler test plans complement design-by-contract in Rust by mapping Given-When-Then scenarios to defined preconditions and invariants, outputting martin-fowler-tests.md to align test verification with the formal API specification.

Do I need existing Rust code to generate contract specifications and test plans?

No, you do not need existing Rust code to generate contract specifications and test plans. The process applies specification-first principles, requiring only a bead ID or feature description to produce the design-by-contract and test documentation.