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/pedronauck-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
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/rust-best-practices
Tools it pre-approves 9
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Bash(cargo:*)Bash(rustc:*)Bash(rustfmt:*)Bash(clippy:*)ReadWriteEditGlobGrep
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
- Compatibility
- Cargo; honor the repository edition, pinned toolchain, and minimum supported Rust version
- 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
- 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 pedronauck/skills, MIT.
More from pedronauck/skills
- 0.805score
jev-engineering
pedronauck
Design and build use cases, POCs and production systems with TypeSafe's Jev decision model (System One): choose a design mode and a use-case archetype, build…
SkillAFreshness: A★ 641Claude Code +9 - 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.767score
qmd
tobi
Search local markdown knowledge bases, notes, docs, and wikis with QMD.
SkillBFreshness: B★ 641Claude Code +9 - 0.765score
vitest
Anthony Fu
Vitest fast unit testing framework powered by Vite with Jest-compatible API.
SkillBFreshness: B★ 641Claude Code +9 - 0.762score
qa-execution
Pedro Nauck
Run requested dogfooding through public product interfaces.
SkillBFreshness: B★ 641Claude Code +9 - 0.762score
qa-report
Pedro Nauck
Create or update living QA docs, journey/scenario plans, persona session charters, and the durable bug registry.
SkillBFreshness: B★ 641Claude Code +9 - 0.762score
react
Pedro Nauck
Build React 19 components and hooks under React Compiler: state, Effects, memoization, props/refs, Actions, use(), compiler/lint setup, and Vitest tests.
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
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 - 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
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
herdr-orchestration
Pedro Nauck
Orchestrate Claude and Codex worker TUIs from a controller agent — one worker per named herdr tab, driven over the herdr socket CLI.
SkillBFreshness: B★ 641Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 641
- Forks
- 91
- Open issues
- 0
- Last commit (this folder)
- Sep 5, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 2.1.0
- License
- MIT
- Repository
- github.com/pedronauck/skills
- 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.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
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
glassmorphism
Pedro Nauck
Create or refine glass UI with accessible solid fallbacks.
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 - 0.762score
herdr-orchestration
Pedro Nauck
Orchestrate Claude and Codex worker TUIs from a controller agent — one worker per named herdr tab, driven over the herdr socket CLI.
SkillBFreshness: B★ 641Claude Code +9
Cite this page
rust-best-practices skill. Agent Mart. https://agentmart.dev/skills/pedronauck-rust-best-practices (last updated 2026-10-24)