rust-best-practices

Review Rust code against Apollo GraphQL best practices with handbook references.

3|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/aramirez087/TuitBot --skill rust-best-practices-aramirez087
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-best-practices
Source: https://github.com/aramirez087/TuitBot/tree/main/.agents/skills/rust-best-practices
Command: npx skills add https://github.com/aramirez087/TuitBot --skill rust-best-practices-aramirez087

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill keeps Rust authors and reviewers aligned with Apollo GraphQL's best practices, preventing non-idiomatic borrowing, cloning, error handling, and performance decisions before they reach production.

Core Features & Use Cases

  • Reference-driven guidance on borrowing vs cloning, Clippy lint compliance, performance profiling, Result-based error handling, testing, generics, type state, documentation, and pointer usage, all drawn from Apollo's handbook.
  • Lint-ready routines that emphasize running cargo clippy with strict settings, addressing redundant_clone, needless_collect, large_enum_variant, and other high-impact warnings.
  • Real-world scenario: review a feature branch by comparing its Rust functions against the handbook chapters and cite specific sections when recommending safer ownership, error propagation, or benchmarking approaches.

Quick Start

Ask the skill to review the Rust function for borrowing, Result error handling, Clippy compliance, and performance so the changes match Apollo's handbook.

Frequently Asked Questions about rust-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review Rust code for borrowing versus cloning best practices?

Rust code review for borrowing versus cloning requires comparing functions against specific handbook sections to recommend safer ownership and prevent non-idiomatic cloning decisions before production.

What's the best way to enforce Clippy lint compliance in a Rust project?

Clippy lint compliance is enforced by running cargo clippy with strict settings to catch high-impact warnings like redundant_clone, needless_collect, and large_enum_variant during code review.

How do I handle Result-based error handling in idiomatic Rust?

Result-based error handling in Rust is reviewed by checking error propagation logic against handbook chapters, ensuring the code uses idiomatic Result patterns rather than panicking or ignoring errors.

Can I use this to review Rust generics and type state patterns?

Yes, Rust generics and type state patterns are reviewed by applying reference-driven guidance drawn from Apollo's handbook to ensure type safety and idiomatic implementation.

Do I need a specific Rust version to run clippy and check performance tuning?

Yes, checking clippy compliance and performance tuning requires Rust 1.70 or higher, Cargo, and precise references to the Apollo handbook chapters before giving feedback.

When should I optimize pointer modeling and performance profiling in Rust?

Pointer modeling and performance profiling are reviewed when evaluating Rust functions, comparing benchmarking approaches and pointer usage against handbook guidelines to prevent performance bottlenecks.