coder-rust-conventions

<skill_overview> Write idiomatic, readable, and maintainable Rust

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "coder-rust-conventions" with this command: npx skills add ozerohax/assistagents/ozerohax-assistagents-coder-rust-conventions

<skill_overview> Write idiomatic, readable, and maintainable Rust

Writing new Rust code Reviewing naming and style Refactoring for idiomatic patterns Setting formatting and lint rules

Rust API Guidelines rustfmt Clippy

</skill_overview> <naming_conventions> Functions, variables, modules, files Types, traits, enums, enum variants Constants, static items Use as_* for cheap conversions Use to_* for potentially expensive conversions </naming_conventions>

Always run cargo fmt before commit Prefer trailing commas to reduce diff noise Avoid manual alignment; let rustfmt decide

<ownership_and_borrowing>

Prefer borrowing over cloning Take &str or &[T] for read-only inputs Use iterators instead of index-based loops Return owned values when caller should own data

fn find_user(name: &str, users: &[User]) -> Option<&User> { /* ... */ }

</ownership_and_borrowing> <pattern_matching>

Use exhaustive match for enums Avoid catch-all _ unless truly unreachable Use if let / while let for single-variant matches

</pattern_matching> <anti_patterns> Avoid unwrap/expect in non-test code Do not clone to silence borrow checker Avoid large mutable shared state </anti_patterns>

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

coder-csharp-aspnetcore-api

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

coder-rust-axum-api

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

coder-rust-async-concurrency

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

coder-rust-testing

No summary provided by upstream source.

Repository SourceNeeds Review