rules-rust

Enforce Rust coding conventions for clippy compliance and ownership safety.

4|1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/NSObjects/specpowers --skill rules-rust
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rules-rust
Source: https://github.com/NSObjects/specpowers/tree/main/skills/rules-rust
Command: npx skills add https://github.com/NSObjects/specpowers --skill rules-rust

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill captures the Rust-specific best practices that override the universal coding rules so every review, design decision, and implementation honors clippy guidance and ownership safety.

Core Features & Use Cases

  • Rust-centric Naming and Formatting: Highlights clippy-backed naming conventions, formatting via rustfmt, and module layout expectations that differ from generic rules.
  • Ownership, Error Handling, and Safety: Guides teams through borrowing discipline, smart pointer usage, panic avoidance, and documented unsafe blocks that are unique to Rust.
  • Testing to Deployment: Recommends idiomatic testing approaches, dependency handling, concurrency strategies, and git workflow rules tailored for Rust crates.

Quick Start

Instruct the Skill to apply Rust coding rules to your current crate and call out any deviations from clippy-approved patterns before committing.

Frequently Asked Questions about rules-rust

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

FAQPage Schema
How do I enforce idiomatic Rust coding conventions for ownership and borrowing?

You enforce idiomatic Rust rules by applying clippy-backed conventions for ownership discipline, borrowing patterns, and smart pointer usage. This ensures memory safety and prevents poor ownership practices before committing code.

What Rust clippy violations should I check before committing a crate?

Before committing a crate, check clippy violations related to naming, formatting, panic avoidance, and undocumented unsafe blocks. Enforcing these rules catches style deviations and guards against unsafe practices early in development.

Does this approach work for reviewing Rust concurrency and error handling patterns?

Yes, this approach works for reviewing Rust concurrency and error handling by codifying rules for concurrency strategies and panic avoidance. It guides teams through borrowing discipline and smart pointer usage to satisfy project standards.

What is the best way to manage Rust dependency and testing standards in a repository?

The best way to manage Rust dependency and testing standards is to codify idiomatic testing approaches and dependency handling rules tailored for Rust crates. This ensures all modules honor clippy guidance and project-specific style expectations.

Why does my Rust code fail generic style reviews despite passing rustfmt?

Rust code fails generic style reviews because Rust-specific conventions override universal coding rules. Applying clippy-approved naming, module layout, and formatting expectations catches unique Rust deviations that generic rules miss.