rust-coding

Enforce Rust best practices for style, API design, and maintainability.

44|7|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/huiali/rust-skills --skill rust-coding
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-coding
Source: https://github.com/huiali/rust-skills/tree/main/.codex/skills/rust-coding
Command: npx skills add https://github.com/huiali/rust-skills --skill rust-coding

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers write idiomatic, maintainable, and high-quality Rust code by enforcing best practices in naming, formatting, error handling, and API design.

Core Features & Use Cases

  • Idiomatic Code: Learn and apply Rust-specific naming conventions (snake_case, CamelCase, SCREAMING_SNAKE_CASE) and conversion method patterns (as_, to_, into_).
  • Code Quality: Integrate clippy and rustfmt for linting and formatting checks, ensuring consistency and catching potential issues early.
  • API Design: Understand principles for ergonomic APIs, such as accepting &str and slices, and using newtypes for domain semantics.
  • Use Case: When writing a new Rust module, use this Skill to ensure your function and type names are clear, your code is formatted correctly, and common pitfalls like unnecessary clone() calls are avoided.

Quick Start

Use the rust-coding skill to review a Rust code snippet for idiomatic conventions and potential issues.

Frequently Asked Questions about rust-coding

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

FAQPage Schema
How do I write idiomatic Rust code for naming conventions and API design?

Idiomatic Rust code follows specific naming conventions like snake_case for variables and CamelCase for types, while ergonomic API design involves accepting string slices and using newtypes for domain semantics to ensure maintainability.

How do I use clippy and rustfmt to enforce Rust coding standards?

Use clippy for linting to catch common mistakes like unnecessary clone() calls, and use rustfmt for formatting checks to ensure consistent code style across your Rust modules and improve overall readability.

What is the best way to handle error handling patterns in Rust production code?

The best way to handle error patterns in Rust production code is to apply idiomatic constructs that ensure readable and maintainable results, avoiding common pitfalls during module development and API design.

When do I need to use as_, to_, and into_ conversion methods in Rust?

You need to use as_, to_, and into_ conversion methods in Rust when applying idiomatic naming conventions for type transformations, ensuring your function APIs remain clear and predictable.

Can I use this approach to review a Rust code snippet for common pitfalls?

Yes, you can review a Rust code snippet to identify potential issues, verify that function and type names are clear, and ensure the code is formatted correctly according to production-ready best practices.