interface-design-review

Review Rust interfaces for ease of correct use and resistance to misuse.

2|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/ahrav/scratch-scanner-rs --skill interface-design-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: interface-design-review
Source: https://github.com/ahrav/scratch-scanner-rs/tree/main/.claude/skills/interface-design-review
Command: npx skills add https://github.com/ahrav/scratch-scanner-rs --skill interface-design-review

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers create Rust APIs that are intuitive, safe, and resistant to misuse, ensuring that the correct usage is the easiest path for users.

Core Features & Use Cases

  • API Usability Review: Analyzes public APIs, traits, structs, and module boundaries.
  • Enforcement Hierarchy: Guides developers to prefer compile-time safety over runtime checks.
  • Use Case: Before releasing a new library, use this Skill to review its public functions and data structures, ensuring that common mistakes are caught by the compiler or prevented by the design itself.

Quick Start

Review the public API of the scratch-scanner-rs crate for interface design issues.

Frequently Asked Questions about interface-design-review

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

FAQPage Schema
How do I review a Rust API for ease of correct use and resistance to misuse?

To review a Rust API for misuse resistance, analyze public traits, structs, and module boundaries to ensure the type system makes correct usage easy and incorrect usage hard. Prioritize compile-time safety over runtime checks and validation at boundaries.

What is the enforcement hierarchy for making Rust interfaces safe?

The enforcement hierarchy for safe Rust interfaces prioritizes making invalid states unrepresentable through the type system, then compile-time checks, runtime validation at boundaries, and finally documentation. This spectrum guides developers to prevent errors early.

How do I prevent invalid states in Rust public structs and module boundaries?

Prevent invalid states in Rust structs by enforcing invariants through the type system, making incorrect data unrepresentable. Validate data at module boundaries so callers interact only with safe, valid types, ensuring compiler resistance to misuse.

When should I use compile-time safety over runtime checks in Rust API design?

Use compile-time safety over runtime checks in Rust API design whenever the type system can enforce invariants and make invalid states unrepresentable. This approach eliminates entire classes of runtime errors and guides callers toward correct behavior.

Does this interface review tool work with existing Rust libraries and traits?

Yes, the interface review tool analyzes existing Rust libraries by examining their public APIs, traits, structs, and module boundaries. It evaluates current designs against an enforcement hierarchy to identify where type system changes can improve safety and developer experience.

What are common Rust API design issues related to developer experience and safety?

Common Rust API design issues include allowing invalid states to be representable, over-relying on runtime checks instead of type enforcement, and poorly defined module boundaries. These flaws make APIs easy to misuse and degrade developer experience.