rust

Routes Rust development tasks to specialized sub-skills for ownership, errors, concurrency, and review.

3|Updated Aug 8, 2026
One-click install
npx skills add https://github.com/Jose-Polanco-Oxte/Echos-Live-Music-Visualizer --skill rust-jose-polanco-oxte
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust
Source: https://github.com/Jose-Polanco-Oxte/Echos-Live-Music-Visualizer/tree/main/.agents/skills/rust
Command: npx skills add https://github.com/Jose-Polanco-Oxte/Echos-Live-Music-Visualizer --skill rust-jose-polanco-oxte

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Rust development spans many distinct problem domains — borrow checker fights, error design, async concurrency, performance tuning, testing, and code review — and loading generic guidance for all of them wastes context. This Skill acts as a router that directs each Rust task to the exact sub-skill containing the relevant rules, error-to-fix tables, and decision guides. ## Core Features & Use Cases - Task Routing: Maps a Rust task to one of seven focused sub-skills (ownership, errors, idioms, concurrency, performance, review, testing) so only the needed guidance is loaded. - Borrow Checker & Lifetime Fixes: The ownership sub-skill provides an error-code-to-fix table (E0382, E0499, E0597, etc.) plus decision guides for &T vs &mut T vs T and Box/Rc/RefCell/Cow. - Code Review Rubric: The review sub-skill defines a severity-tiered checklist (CRITICAL/HIGH/MEDIUM), a cargo quality gate (fmt, clippy, test, audit), and an Approve/Warning/Block verdict process. - Use Case: When a Rust DSP function in src/core/ fails to compile with "cannot borrow as mutable more than once", load this Skill, get routed to rust-ownership, and apply the E0499 fix pattern directly. ## Quick Start Ask the agent to fix a Rust borrow checker error or review a Rust diff, and it will load the matching sub-skill for the task.

Frequently Asked Questions about rust

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

FAQPage Schema
How do I fix Rust borrow checker errors like E0499 or E0502?

Borrow checker errors map to specific fixes: E0499 (two mutable borrows) is fixed by shortening one borrow's scope or splitting into disjoint fields, while E0502 (shared and mutable borrow at once) is fixed by finishing reads before mutating. The rust-ownership sub-skill contains a full error-to-fix table.

Should I use thiserror or anyhow for Rust error handling?

Use thiserror with a typed error enum when writing a library, since callers need to match on failure modes. Use anyhow with one opaque error type for applications where you only report and exit. Mixing both is normal: libraries return typed errors and the app collects them into anyhow.

When should I use threads vs async in Rust?

Use OS threads or rayon for CPU-bound work like compute and parsing, since async provides no benefit there. Use tokio async for I/O-bound work with many concurrent connections. For mixed workloads, run async with spawn_blocking for the blocking or CPU-heavy parts.

What checks should pass before merging a Rust pull request?

The quality gate requires cargo fmt --check, cargo clippy --all-targets with -D warnings, and cargo test to be green, plus cargo audit and cargo deny check if installed. If CI already ran a matching check on the PR and it passed, that result can be consumed instead of re-running locally.

Why does my Rust async code fail with 'future is not Send'?

This error occurs when a non-Send value like Rc or a std MutexGuard is held across an .await point. Fix it by using Send types like Arc, dropping the value before the await, or never holding a std lock across an await.

What testing crates does this Rust skill recommend?

The testing sub-skill recommends rstest for table-driven cases and fixtures, proptest for property-based testing, mockall for mocking trait dependencies, insta for snapshots, cargo-fuzz for adversarial input, and cargo nextest with cargo llvm-cov for running and coverage.