
Coding Guidelines
- 1.5k installs
- 1.3k repo stars
- Updated May 24, 2026
- actionbook/rust-skills
coding-guidelines is an agent skill that use when asking about rust code style or best practices. keywords: naming, formatting, comment, clippy, rustfmt, lint, code style, best practice, p.nam, g.fmt, code review, naming
About
coding-guidelines is an agent skill from actionbook/rust-skills that use when asking about rust code style or best practices. keywords: naming, formatting, comment, clippy, rustfmt, lint, code style, best practice, p.nam, g.fmt, code review, naming convention, variable. # Rust Coding Guidelines (50 Core Rules) ## Naming (Rust-Specific) | Rule | Guideline | |------|-----------| | No `get_` prefix | `fn name()` not `fn get_name()` | | Iterator convention | `iter()` / `iter_mut()` / `into_iter()` | | Conversion naming | `as_` (cheap &), `to_` (expensive), `into_` (ownership) | | Static var prefix | `G_CONFIG` for ` Developers invoke coding-guidelines during operate/infra work for cloud & infrastructure tasks. The skill documents triggers, prerequisites, and step-by-step workflows grounded in SKILL.md. Compatible with Claude Code, Cursor, and Codex agent runtimes that load marketplace skills. Review the Security Audits panel on this listing before installing in production environments.
- Rust Coding Guidelines (50 Core Rules)
- | No `get_` prefix | `fn name()` not `fn get_name()` |
- | Iterator convention | `iter()` / `iter_mut()` / `into_iter()` |
- | Conversion naming | `as_` (cheap &), `to_` (expensive), `into_` (ownership) |
- | Static var prefix | `G_CONFIG` for `static`, no prefix for `const` |
Coding Guidelines by the numbers
- 1,527 all-time installs (skills.sh)
- +53 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #263 of 1,041 Cloud & Infrastructure skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
coding-guidelines capabilities & compatibility
- Capabilities
- rust coding guidelines (50 core rules) · | no `get_` prefix | `fn name()` not `fn get_nam · | iterator convention | `iter()` / `iter_mut()` · | conversion naming | `as_` (cheap &), `to_` (ex · | static var prefix | `g_config` for `static`, n
- Use cases
- orchestration
What coding-guidelines says it does
Naming: snake_case (fn/var), CamelCase (type), SCREAMING_CASE (const)
Docs: /// for public items, //! for module docs
Claude knows Rust conventions well. These are the non-obvious Rust-specific rules.
npx skills add https://github.com/actionbook/rust-skills --skill coding-guidelinesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.5k |
|---|---|
| repo stars | ★ 1.3k |
| Security audit | 3 / 3 scanners passed |
| Last updated | May 24, 2026 |
| Repository | actionbook/rust-skills ↗ |
What it does
Use when asking about Rust code style or best practices. Keywords: naming, formatting, comment, clippy, rustfmt, lint, code style, best practice, P.NAM, G.FMT, code review, naming convention, variable
Who is it for?
Developers working on cloud & infrastructure during operate tasks.
Skip if: Tasks outside Cloud & Infrastructure scope described in SKILL.md.
When should I use this skill?
Use when asking about Rust code style or best practices. Keywords: naming, formatting, comment, clippy, rustfmt, lint, code style, best practice, P.NAM, G.FMT, code review, naming convention, variable
What you get
Completed cloud & infrastructure workflow aligned with SKILL.md steps.
- Lint remediation patterns
- Safety documentation templates
- Style-compliant Rust snippets
By the numbers
- Documents Clippy lint-to-fix mappings for 10 lints including unwrap_used, await_holding_lock, and undocumented_unsafe_bl
Files
Rust Coding Guidelines (50 Core Rules)
Naming (Rust-Specific)
| Rule | Guideline |
|---|---|
No get_ prefix | fn name() not fn get_name() |
| Iterator convention | iter() / iter_mut() / into_iter() |
| Conversion naming | as_ (cheap &), to_ (expensive), into_ (ownership) |
| Static var prefix | G_CONFIG for static, no prefix for const |
Data Types
| Rule | Guideline |
|---|---|
| Use newtypes | struct Email(String) for domain semantics |
| Prefer slice patterns | if let [first, .., last] = slice |
| Pre-allocate | Vec::with_capacity(), String::with_capacity() |
| Avoid Vec abuse | Use arrays for fixed sizes |
Strings
| Rule | Guideline |
|---|---|
| Prefer bytes | s.bytes() over s.chars() when ASCII |
Use Cow<str> | When might modify borrowed data |
Use format! | Over string concatenation with + |
| Avoid nested iteration | contains() on string is O(n*m) |
Error Handling
| Rule | Guideline |
|---|---|
Use ? propagation | Not try!() macro |
expect() over unwrap() | When value guaranteed |
| Assertions for invariants | assert! at function entry |
Memory
| Rule | Guideline |
|---|---|
| Meaningful lifetimes | 'src, 'ctx not just 'a |
try_borrow() for RefCell | Avoid panic |
| Shadowing for transformation | let x = x.parse()? |
Concurrency
| Rule | Guideline |
|---|---|
| Identify lock ordering | Prevent deadlocks |
| Atomics for primitives | Not Mutex for bool/usize |
| Choose memory order carefully | Relaxed/Acquire/Release/SeqCst |
Async
| Rule | Guideline |
|---|---|
| Sync for CPU-bound | Async is for I/O |
| Don't hold locks across await | Use scoped guards |
Macros
| Rule | Guideline |
|---|---|
| Avoid unless necessary | Prefer functions/generics |
| Follow Rust syntax | Macro input should look like Rust |
Deprecated → Better
| Deprecated | Better | Since |
|---|---|---|
lazy_static! | std::sync::OnceLock | 1.70 |
once_cell::Lazy | std::sync::LazyLock | 1.80 |
std::sync::mpsc | crossbeam::channel | - |
std::sync::Mutex | parking_lot::Mutex | - |
failure/error-chain | thiserror/anyhow | - |
try!() | ? operator | 2018 |
Quick Reference
Naming: snake_case (fn/var), CamelCase (type), SCREAMING_CASE (const)
Format: rustfmt (just use it)
Docs: /// for public items, //! for module docs
Lint: #![warn(clippy::all)]Claude knows Rust conventions well. These are the non-obvious Rust-specific rules.
Clippy Lint → Rule Mapping
| Clippy Lint | Category | Fix |
|---|---|---|
unwrap_used | Error | Use ? or expect() |
needless_clone | Perf | Use reference |
await_holding_lock | Async | Scope guard before await |
linkedlist | Perf | Use Vec/VecDeque |
wildcard_imports | Style | Explicit imports |
missing_safety_doc | Safety | Add # Safety doc |
undocumented_unsafe_blocks | Safety | Add // SAFETY: |
transmute_ptr_to_ptr | Safety | Use pointer::cast() |
large_stack_arrays | Mem | Use Vec or Box |
too_many_arguments | Design | Use struct params |
For unsafe-related lints → see unsafe-checker skill.
Complete Rules Reference
For the full 500+ rules, see:
- Source: https://rust-coding-guidelines.github.io/rust-coding-guidelines-zh/
Core rules are in ../SKILL.md.
Related skills
Forks & variants (1)
Coding Guidelines has 1 known copy in the catalog totaling 1.3k installs. They canonicalize to this original listing.
- zhanghandong - 1.3k installs
How it compares
Use coding-guidelines for everyday Clippy fixes; escalate to unsafe-checker for dedicated unsafe code audits.
FAQ
What does coding-guidelines do?
Use when asking about Rust code style or best practices. Keywords: naming, formatting, comment, clippy, rustfmt, lint, code style, best practice, P.NAM, G.FMT, code review, naming convention, variable
When should I use coding-guidelines?
During operate infra work for cloud & infrastructure.
Is coding-guidelines safe to install?
Review the Security Audits panel on this listing before production use.