skills.vishalvoidskills/vishalvoid
Creative & DesignBeginner

rust-best-practices

Rust coding guidelines drawn from Apollo GraphQL's internal handbook

Developer Setup

Setup & Installation

bash
npx skills add https://github.com/apollographql/skills --skill rust-best-practices

Overview

What This Skill Does

Rust coding guidelines drawn from Apollo GraphQL's internal handbook

Application

When to use this Skill

Documentation

Show Skills.md file

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

Borrowing & Ownership

  • Prefer &T over .clone() unless ownership transfer is required
  • Use &str over String, &[T] over Vec<T> in function parameters
  • Small Copy types (≤24 bytes) can be passed by value
  • Use Cow<'_, T> when ownership is ambiguous
Lines 1 - 25 of 76

Recommendations

Explore other random skills

All skillsMy patterns