Reviews and improves **names** in code — variables, functions, classes, modules, parameters — for clarity, intent, and consistency with language/team conventions. Triggers when asked to review names, rename things, improve code readability, clean up confusing code, or when examining code with generic/vague names like "data", "info", "manager", "temp", "util". Does NOT trigger for general code review unrelated to naming, architecture design, debugging, or performance optimization. Identifies naming anti-patterns (generic names, misleading names, type-encoding, abbreviations), suggests role-based names that reveal intent, checks consistency with project/domain vocabulary, and flags misalignment with language culture.
91
90%
Does it follow best practices?
Impact
94%
1.05xAverage score across 5 eval scenarios
Passed
No known issues
Based on Rust API Guidelines (RFC 430) and common ecosystem conventions.
| Thing | Convention | Example |
|---|---|---|
| Variable | snake_case | user_name, total_count |
| Function / method | snake_case | calculate_total(), get_user() |
| Type (struct, enum, trait) | PascalCase | CustomerOrder, HttpClient |
| Module | snake_case | order_processing/ |
| Constant | SCREAMING_SNAKE_CASE | MAX_RETRY_COUNT |
| Static | SCREAMING_SNAKE_CASE | GLOBAL_CONFIG |
| Enum variant | PascalCase | Option::Some, Result::Ok |
| Type parameter | Single uppercase or PascalCase | <T>, <E>, <TEntity> |
| Lifetime parameter | Single lowercase | 'a, 'b, 'ctx |
| Macro | snake_case | println!, vec! |
| Attribute | snake_case | #[derive(Debug)] |
| Crate | snake_case (single word preferred) | serde, tokio, reqwest |
| Feature flag | snake_case | async, serde-support |
| Constructor | new() or from_*() or with_*() | Config::new(), from_str() |
| Conversion | as_*() (borrowed), to_*() (owned), into_*() (consuming) | as_str(), to_string(), into_inner() |
get_ prefix: user.name() not user.get_name() (exception: if there's also a set_name())into_iter() (consuming), as_slice() (borrowed)Error: ValidationError, NotFoundErrorResult<T> (already in std) — don't create MyResultis_ prefix: is_empty(), is_some(), has_permission()iter(), iter_mut(), into_iter() conventions.with_*() or .set_*() returning Selfunsafe in names — unsafe blocks are already marked with unsafe keyword//! inner doc comments explaining the module's purposeDisplay, Clone, Read, Write, IntoIteratorSized, Unpin, EqPascalCase, typically single word: Send, Sync, Copywhere clause for complex bounds rather than inline| Bad | Good | Reason |
|---|---|---|
get_name() | name() | Rust idiom: getters drop get_ |
convert_to_string() | to_string() | Follow standard conversion naming |
MyStruct::new(x: i32) | MyStruct::from(x) or with_x(x) | new() takes no args by convention |
do_thing() | process_order(), send_request() | Too generic |
data / info | records, users, config | Name by role, not catch-all |
err (as Result) | Name the success variant | Match on meaningful names, not err |