
Coding Guidelines
This gives Claude 50 core Rust conventions that go beyond what it already knows from training. It's meant for the non-obvious stuff: no get_ prefix on getters, when to use as_ versus to_ versus into_, why G_CONFIG for statics but no prefix for consts, and which crates have been deprecated by newer stdlib features (like OnceLock replacing lazy_static in 1.70). The tables are dense reference material, not tutorial content. Invoke this when you're doing code review, arguing about naming conventions, or wondering if there's a more idiomatic way to do something. It won't teach you Rust, but it will save you from bikeshedding and outdated patterns.
- skills.sh installs
- 4.2K
- GitHub stars
- 1.6K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add actionbook/rust-skills --skill coding-guidelines --agent claude-codeInstalls into .claude/skills of the current project.
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 |
Sponsors
Promote your product hereReach 125k+ visitors monthlyPromote your product hereReach 125k+ visitors monthly
Agent CaffeineSponsoredClose your lid, come back to finished work
SnugSponsoredThe clipboard manager for the AI eraPromote your product hereReach 125k+ visitors monthly
WaxSponsoredBlock anything with supervision, without erasing your iPhonePromote your product hereReach 125k+ visitors monthly
knobsSponsoredSee your site on any phone, any day, in any language
Details
- Repository
- github.com/actionbook/rust-skills
- Categories
- Git & Pull Requests, Code Review & Quality, Rust
- First seen
- May 16, 2026
More from actionbook/rust-skills
All 38- M10 Performance3.8K
- M07 Concurrency3.7K
- M06 Error Handling3.7K
- M01 Ownership3.6K
- M04 Zero Cost3.6K
- M05 Type Driven3.6K
- M02 Resource3.6K
- M03 Mutability3.6K
- Rust Refactor Helper3.6K
- M12 Lifecycle3.5K
- M09 Domain3.5K
- M14 Mental Model3.5K
- M11 Ecosystem3.5K
- M13 Domain Error3.5K
- Unsafe Checker3.5K
- Rust Code Navigator3.4K
- Rust Trait Explorer3.4K
- Rust Call Graph3.4K
- Rust Symbol Analyzer3.4K
- Domain Web3.4K
- Domain Cli3.4K
- Rust Learner3.3K
- Rust Skill Creator3.3K
- Rust Deps Visualizer3.2K
Recommended
More Git & Pull Requests1
generating-apexforcedotcom/sf-skillsPrimary Apex authoring skill for class generation, refactoring, and review. ALWAYS ACTIVATE when the user mentions Apex, .cls, triggers, or asks to create/refac4.2Kskills.sh installs
2
ads-budgetagricidaniel/claude-adsPlan and review paid-media budgets, bidding, pacing, marginal return, forecasts, CPA, ROAS, MER, LTV:CAC, constraints, and allocation across supported platforms4.2Kskills.sh installs
3
storekitdpearson2699/swift-ios-skillsImplement, review, or improve in-app purchases and subscriptions using StoreKit 2. Use when building paywalls with SubscriptionStoreView or ProductView, process4.2Kskills.sh installs
4
widgetkitdpearson2699/swift-ios-skillsImplement, review, or improve WidgetKit widgets and controls. Use when building Home Screen, Lock Screen, StandBy, or CarPlay widgets with timeline providers; c4.2Kskills.sh installs
5
swiftui-gesturesdpearson2699/swift-ios-skillsImplement, review, or improve SwiftUI gesture handling. Use when adding tap, long press, drag, magnify, or rotate gestures, composing gestures with simultaneous4.2Kskills.sh installs
6
eval-performancedotnet/skillsGuide for diagnosing and improving MSBuild project evaluation performance. USE FOR: builds slow before any compilation starts, high evaluation time in binlog an4.2Kskills.sh installs