rust-best-practices
Write, review, refactor, or optimize Rust, including ownership, errors, Tokio, traits, tests, benchmarks, Clippy, and documentation.
Skill by Pedro Nauck
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/frontal-labs-rust-best-practices
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
rust-best-practices- Description
- Write, review, refactor, or optimize Rust, including ownership, errors, Tokio, traits, tests, benchmarks, Clippy, and documentation. Excludes other languages and architecture unrelated to Rust idioms.
- License
- MIT
- Allowed tools
- Bash(cargo:*), Bash(rustc:*), Bash(rustfmt:*), Bash(clippy:*), Read, Write, Edit, Glob, Grep
- Metadata
- author: Pedro Nauck · domain: language · github: https://github.com/pedronauck · version: 2.1.0 · triggers: Rust, Cargo, ownership, borrowing, lifetimes, async Rust, tokio, zero-cost abstractions, memory safety, systems programming, traits, generics, error handling, thiserror, anyhow, clippy, rustfmt, testing, benchmarks · repository: https://github.com/pedronauck/skills · compatibility: Cargo; honor the repository edition, pinned toolchain, and minimum supported Rust version
- Instructions
- 29 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (11)
- SKILL.md
- async-and-concurrency.md · references/
- clippy-and-linting.md · references/
- coding-style.md · references/
- concurrency-sync.md · references/
- documentation.md · references/
- error-handling.md · references/
- ownership-and-pointers.md · references/
- performance.md · references/
- testing.md · references/
- traits-and-generics.md · references/
SKILL.md (first lines)
# Rust Best Practices Use the existing crate design, edition, `rust-toolchain.toml`, and `Cargo.toml` `rust-version` (MSRV). Reference examples may use newer features: confirm support before adopting them; do not upgrade the toolchain or add a crate just to follow an example. Read the reference for the Rust concern being changed. A local edit does not require every category, a new test framework, or a workspace-wide audit. | Topic | Reference | Load When | |-------|-----------|-----------| | Coding Style | `references/coding-style.md` | Naming, imports, iterators, comments, string handling, macros | | Error Handling | `references/error-handling.md` | Result, Option, ?, thiserror, anyhow, custom errors, async errors | | Ownership & Pointers | `references/ownership-and-pointers.md` | Lifetimes, borrowing, smart pointers, Pin, Cow, interior mutability | | Traits & Generics | `references/traits-and-generics.md` | Trait design, dispatch, GATs, sealed traits, type state pattern | | Async & Concurrency | `references/async-and-concurrency.md` | Tokio, channels, streams, shutdown, runtime config, async traits | | Sync Concurrency | `references/concurrency-sync.md` | Atomics, Mutex, RwLock, lock ordering, Send/Sync, memory ordering | | Testing | `references/testing.md` | Unit/integration/doc tests, snapshot, proptest, mockall, benchmarks, fuzz | | Performance | `references/performance.md` | Profiling, flamegraph, cloning, stack vs heap, iterators, allocation | | Clippy & Linting | `references/clippy-and-linting.md` | Clippy config, key lints, workspace setup, #[expect] vs #[allow] | | Documentation | `references/documentation.md` | Doc comments, rustdoc, doc lints, coverage checklist | ## Engineering floor - Borrow or transfer ownership deliberately; clone when independent ownership is needed. Prefer clear ownership over numeric size rules or avoiding every allocation. - Handle fallible operations with `Result` and preserve useful error context. Reserve panic/assertions for violated programmer invariants; validate external input with recoverable errors. - Match error types, dispatch, and dependencies to the existing public contract. `thiserror`, `anyhow`, Tokio, and third-party synchronization crates are options, not mandatory additions. - Keep lock lifetimes short, maintain lock order, and reason about cancellation, shutdown, and spawned-task ownership. Do not hold a synchronous lock across `.await`. - Treat `Send`/`Sync` bounds and atomic orderings as correctness properties. Choose weaker ordering only with a valid synchronization argument; benchmark before performance-driven rewrites. - Put behavior tests in the suite that owns the invariant. Add type-level, property, fuzz, snapshot, or benchmark tests when that contract or risk warrants them. - Run the repository's required scoped format, lint, and test commands; reuse valid evidence. Full workspace/all-feature runs and documentation coverage rules follow project policy. Check feature combinations actually supported by the crate.
From frontal-labs/sdk-rust, MIT.
More from frontal-labs/sdk-rust
- 0.577score
frontal-sdk-rust
frontal-labs
Build async Rust integrations with Frontal or change, test, and document the frontal crate.
SkillAFreshness: A★ 1Claude Code +9 - 0.576score
rust-async-api
frontal-labs
Implement safe async HTTP client behavior and structured error propagation in the Frontal Rust SDK.
SkillAFreshness: A★ 1Claude Code +9 - 0.576score
rust-serde-contract-services
frontal-labs
Add feature-gated Rust service operations and Serde types from Frontal API contracts.
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 8, 2026 (20 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 2.1.0
- License
- MIT
- Repository
- github.com/frontal-labs/sdk-rust
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from Pedro Nauck
- 0.768score
bubbletea
Pedro Nauck
Build interactive Go TUIs with Bubbletea, Elm architecture, Lipgloss, layouts, and keyboard/mouse handling.
SkillBFreshness: B★ 641Claude Code +9 - 0.768score
rust-best-practices
Pedro Nauck
Write, review, refactor, or optimize Rust, including ownership, errors, Tokio, traits, tests, benchmarks, Clippy, and documentation.
SkillBFreshness: B★ 641Claude Code +9 - 0.762score
drizzle-safe-migrations
Pedro Nauck
Plan safe Drizzle backfills, enum/check/default changes, constraint tightening, migration ordering, and rollback.
SkillBFreshness: B★ 641Claude Code +9 - 0.762score
glassmorphism
Pedro Nauck
Create or refine glass UI with accessible solid fallbacks.
SkillBFreshness: B★ 641Claude Code +9 - 0.762score
ddd-master
Pedro Nauck
Assess DDD fit; discover domains with EventStorming, define language and bounded contexts, and design aggregates, value objects, events, and repositories.
SkillBFreshness: B★ 641Claude Code +9 - 0.762score
golang-master
Pedro Nauck
Write or review production Go: errors, concurrency, context, types, generics, safety, tests, benchmarks, profiling, modernization, and module structure.
SkillBFreshness: B★ 641Claude Code +9
Cite this page
rust-best-practices skill. Agent Mart. https://agentmart.dev/skills/frontal-labs-rust-best-practices (last updated 2026-10-24)