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.
All-time #1061Trending #1519Hot #6027First seen Jan 26, 2026
Idiomatic Rust coding standards based on Apollo GraphQL's best practices handbook.
Covers nine core areas: coding styles and idioms, clippy linting, performance optimization, error handling, testing patterns, generics and dispatch, type state pattern, documentation, and pointer safety Emphasizes borrowing over cloning, Result-based error handling with thiserror/anyhow, and performance profiling with release builds Includes quick reference guidance on ownership patterns, panic avoidance, clippy configuration, test naming conventions, and compile-time state safety via type state pattern Provides specific lints to enforce (redundant_clone, large_enum_variant, needless_collect) and recommends #[expect(...)] over #[allow(...)] with justification comments
Similar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
This skill provides a comprehensive guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. It is an educational resource and contains no malicious instructions or security risks.
snykLOW
Analyzed Mar 10, 2026
No issues detected.
socketScore 0.9000 · 0 alerts
Analyzed Mar 18, 2026
license1
maintenance1
quality0.9
supply chain1
vulnerability1
0 alerts
Also in this package
Other skills from apollographql/skills · top by installs.
Files included with this skill beyond the listing page.
skill mdSKILL.md4,405 B
docsSUMMARY.md436 B
History
First seen on skills.sh
First recorded snapshot · 17,700 installs
SKILL.md
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](references/chapter_01.md): Borrowing vs cloning, Copy trait, Option/Result handling, iterators, comments, when to extract a function (duplication vs. wrong abstraction)
[Chapter 2 - Clippy and Linting](references/chapter_02.md): Clippy configuration, important lints, workspace lint setup