rust-best-practices

Installation
Summary

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
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:

Quick Reference

Related skills
Installs
9.8K
GitHub Stars
62
First Seen
Jan 26, 2026