rust-best-practices
Skill13 starsChanged 3 months agoApache-2.0View on GitHub
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when: (1) writing new Rust code or functions, (2) reviewing or refactoring existing Rust code, (3) deciding between borrowing vs cloning or ownership patterns, (4) implementing error handling with Result types, (5) optimizing Rust code for performance, (6) writing tests or documentation for Rust projects.
24 other projects use a version of this, 14 of them edited.
Adopted by
Most recently taken up by
- crbnos/carbonedited, first seen Oct 4, 2026
- baekenough/oh-my-customcodetheir own version, first seen Oct 3, 2026
- microsoft/scopeedited, first seen Sep 23, 2026
- meowdiocre/meowpiedited, first seen Sep 19, 2026
- massimodeluisa/rust-best-practices-skilltheir own version, first seen Sep 16, 2026
- BigtoC/my-skillstheir own version, first seen Sep 15, 2026
Used with
Projects with it also use inngest, go-best-practices and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
xfstudioSkillinngest
Inngest expert for serverless-first background jobs, event-driven workflows, and durable execution without managing queues or workers. Use when: inngest, serverless background job, event-driven workflow, step function, durable execution.
Also in 3 projects that use this
mduongvandinhSkillgo-best-practices
Also in 3 projects that use this
rohitg00Skilltypescript-advanced
Advanced TypeScript patterns including generics, conditional types, mapped types, template literals, and type guards
Also in 3 projects that use this
xfstudioSkillrust-async-patterns
Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when building async Rust applications, implementing concurrent systems, or debugging async code.
Also in 3 projects that use this
dbDev-codeSkilltauri-v2
Tauri v2+ cross-platform app development with Rust backend. Use when configuring tauri.conf.json, implementing Rust commands (#[tauri::command]), setting up IPC patterns (invoke, emit, channels), configuring permissions/capabilities, troubleshooting build issues, or deploying desktop/mobile apps. Triggers on Tauri, src-tauri, invoke, emit, capabilities.json.
Also in 3 projects that use this
VercelSkillvercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Also in 6 projects that use this
Other versions24 projects use a version of this.
Word for word · 0
None found.
Edited · 14
- crbnos/carbon★ 2.7k47% same
- apollographql/skills★ 11649% same
- idexal/idexal-skills★ 1350% same
- Harmeet10000/skills★ 747% same
- microsoft/scope★ 747% same
- elaboration-studio/agentic-hub★ 447% same
- broomva/lago★ 247% same
- meowdiocre/meowpi★ 245% same
- mskangg/oh-my-remote-ai★ 247% same
- pmbrull/claustre★ 247% same
4 more not listed
Wrote their own version · 10
- pedronauck/skills★ 633same name
- baekenough/oh-my-customcode★ 43same name
- ryo-ebata/cc-audit★ 25same name
- mduongvandinh/ai-best-practices-skills★ 18same name
- FelipeAngeli/skills★ 2same name
- BigtoC/my-skills★ 1same name
- massimodeluisa/rust-best-practices-skill★ 1same name
- medy-gribkov/arcana★ 1same name
- reformovo/skills★ 1same name
- xelandernt/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- paper-writingSkill
- research-surveySkill
- brainstormingSkill
- ci-cdSkill
- cli-sarifSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- neutralize-sd11Skill
- project-contextSkill
- receiving-code-reviewSkill
- release-publishSkill
- requesting-code-reviewSkill
- review-botsSkill
- rust-idiomsSkill
- rust-invariantsSkill
- rust-perfSkill
- rust-skillsSkill
- rust-testingSkill
- rust-workspaceSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- unsafe-sandboxSkill
- using-git-worktreesSkill
- using-superpowersSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
- yara-rulesSkill
The file
We split this skill into the rules it gives an agent
1 rule. 1 is common, 0 are distinctive, and 0 are very specific to this project.
1
Common
Most of the 23 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 25
Before reviewing, familiarize yourself with Apollo's Rust best practices.
“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Rust Best Practices
Apply these guidelines when writing or reviewing Rust code. Based on Apollo GraphQL's Rust Best Practices Handbook.
Best Practices Reference
Before reviewing, familiarize yourself with Apollo's Rust best practices. Read ALL relevant chapters in the same turn in parallel. Reference these files when providing feedback:
- Chapter 1 - Coding Styles and Idioms: Borrowing vs cloning, Copy trait, Option/Result handling, iterators, comments, when to extract a function (duplication vs. wrong abstraction)
- Chapter 2 - Clippy and Linting: Clippy configuration, important lints, workspace lint setup
- Chapter 3 - Performance Mindset: Profiling, avoiding redundant clones, stack vs heap, zero-cost abstractions
- Chapter 4 - Error Handling: Result vs panic, thiserror vs anyhow, error hierarchies
- Chapter 5 - Automated Testing: Test naming, one assertion per test, snapshot testing
- Chapter 6 - Generics and Dispatch: Static vs dynamic dispatch, trait objects
- Chapter 7 - Type State Pattern: Compile-time state safety, when to use it
- Chapter 8 - Comments vs Documentation: When to comment, doc comments, rustdoc
- [Chapter 9 - Understanding
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

