Rust Coding
Rust coding conventions expert covering naming, formatting, comments, clippy, rustfmt, lints, code style, best practices, and idiomatic patterns.
Install
npx skills add huiali/rust-skills --skill rust-codinggit clone --depth 1 https://github.com/huiali/rust-skills.git /tmp/rust-skills
mkdir -p ~/.claude/skills
cp -r /tmp/rust-skills/.codex/skills/rust-coding ~/.claude/skills/rust-codingPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
## Naming Conventions (Rust-Specific)
| Rule | Correct | Incorrect |
|------|---------|-----------|
| No `get_` prefix for methods | `fn name(&self)` | `fn get_name(&self)` |
| Iterator methods | `iter()` / `iter_mut()` / `into_iter()` | `get_iter()` |
| Conversion naming | `as_` (cheap), `to_` (expensive), `into_` (ownership) | Mixed usage |
| `static` variables uppercase | `static CONFIG: Config` | `static config: Config` |
| `const` variables | `const BUFFER_SIZE: usize = 1024` | No restriction |
### General Naming
```rust
// Variables and functions: snake_case
let max_connections = 100;
fn process_data() { ... }
// Types and traits: CamelCase
struct UserSession;
trait Cacheable {}
// Constants: SCREAMING_SNAKE_CASE
const MAX_CONNECTIONS: usize = 100;
static CONFIG: once_cell::sync::Lazy<Config> = ...
```
## Solution Patterns
### Pattern 1: Conversion Methods
```rust
impl Buffer {
// as_ - cheap, view conversion
pub fn as_slice(&self) -> &[u8] {
&self.data
}
// to_ - expensive, allocating conversion
pub fn to_vec(&self) -> Vec<u8> {
self.data.clone()
}
// into_ - consuming, ownership transfer
pub fn into_vec(self) -> Vec<u8> {
self.data
}
}
```
### Pattern 2: Newtype PatternDetails
- Skill name
rust-coding- Repository
- huiali/rust-skills
- Path
.codex/skills/rust-coding/SKILL.md- License
- MIT
- Repo updated
- 9 February 2026
FAQ
What does the Rust Coding skill do?
Rust coding conventions expert covering naming, formatting, comments, clippy, rustfmt, lints, code style, best practices, and idiomatic patterns.
How do I install the Rust Coding skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add huiali/rust-skills --skill rust-coding. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Rust Coding popular?
It lives in huiali/rust-skills, which has 49 GitHub stars and 7 forks.
Related skills
Rust Actor
49huiali/rust-skills
Actor model expert covering message passing, state isolation, supervision trees, deadlock prevention, fault tolerance, Actix framework, and Erlang-style concurrency patterns.
Rust Anti Pattern
49huiali/rust-skills
Rust anti-patterns and common mistakes expert. Handles code review issues with clone abuse, unwrap in production, String misuse, index loops, and refactoring guidance.
Rust Async
49huiali/rust-skills
Advanced async patterns expert. Handles Stream processing, backpressure control, select/join operations, cancellation, Future trait implementation, and async runtime optimization.
Rust Concurrency
49huiali/rust-skills
Concurrency and async programming expert. Handles Send, Sync, threads, async/await, tokio, channels, Mutex, RwLock, deadlock prevention, and race condition debugging.
Rust Cache
49huiali/rust-skills
Caching and distributed storage expert covering Redis, connection pools, TTL strategies, cache patterns (Cache-Aside, Write-Through), invalidation, and performance optimization.
Rust Const
49huiali/rust-skills
Const generics and compile-time computation expert covering const fn, type-level computation, const evaluation, MaybeUninit arrays, and compile-time validation.
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.