rust-design-rules

Enforce Rust coding rules across UMRS project crates and reviews.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/jamieadams-nerd/umrs-project --skill rust-design-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-design-rules
Source: https://github.com/jamieadams-nerd/umrs-project/tree/main/.claude/skills/rust-design-rules
Command: npx skills add https://github.com/jamieadams-nerd/umrs-project --skill rust-design-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Standardize and enforce Rust coding practices across the UMRS project.

Core Features & Use Cases

  • Enforces clippy policy, citation formatting, and module documentation checks.
  • Promotes safe patterns like proper use of OnceLock and splitn, and forbids unsafe code except where explicitly allowed.
  • Provides a structured approach for reviewing Rust files, writing new crates, or applying cargo xtask commands.

Quick Start

Apply these rules to all Rust code in components/rusty-gadgets during writing, reviews, and CI checks.

Frequently Asked Questions about rust-design-rules

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

FAQPage Schema
How do I enforce a clippy policy and forbid unsafe code in Rust crates?

Enforce clippy policy and forbid unsafe code in Rust crates by applying design rules that restrict unsafe blocks at crate roots except for explicit hardware access, while running clippy checks during code reviews and CI pipelines.

What Rust coding standards should I use for module documentation checks?

Rust coding standards for module documentation checks require explicit module-level documentation with specific compliance sections, ensuring every file details its purpose and adherence to project rules before passing review.

How do I standardize Rust coding practices across a large project?

Standardize Rust coding practices across a large project by enforcing rules for clippy policies, citation formatting, system state read prohibition, and performance-aware construction patterns during code writing, reviews, and xtask commands.

Does this Rust design rule set allow FFI or system state reads?

This Rust design rule set discourages FFI and enforces a strict system state read prohibition, preventing components from directly reading global state and requiring safer alternative patterns for data access.

What are the best Rust patterns for safe initialization and string splitting?

The best Rust patterns for safe initialization and string splitting involve using OnceLock for thread-safe lazy initialization and splitn for controlled string segmentation, avoiding unsafe code while maintaining performance.