rust-blockchain-dev
Installation
SKILL.md
Rust & Blockchain Development Guidelines
This skill provides comprehensive Rust development best practices with emphasis on blockchain development patterns. It auto-activates when working on Rust files or discussing Rust/blockchain topics.
Quick Reference Checklist
When writing Rust code, always:
- ✅ Use inline string interpolation:
format!("{name}")notformat!("{}", name) - ✅ Consolidate imports at file top: All
usestatements in single group - ✅ Use checked arithmetic:
value.checked_add()notvalue + amount - ✅ Avoid
.unwrap(): Use.expect()with clear reasoning orResult<T, E> - ✅ Document all
pubitems: Add doc-comments for public APIs - ✅ Add
// SAFETY:comments: Required for allunsafeblocks - ✅ Run before commit:
cargo +nightly fmt --allandcargo clippy - ✅ Prefer obvious over clever: Write idiomatic, maintainable Rust
- ✅ Keep dependencies sorted: Alphabetize
[dependencies]in Cargo.toml - ✅ Meaningful commits: Self-contained, logical commit history