rust-engineer

Reviews and fixes Rust code for ownership, safety, and performance issues.

Updated Jul 12, 2026
One-click install
npx skills add https://github.com/sumitake/agent-collab --skill rust-engineer-sumitake
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rust-engineer
Source: https://github.com/sumitake/agent-collab/tree/main/plugins/agent-collab/skills/rust-engineer
Command: npx skills add https://github.com/sumitake/agent-collab --skill rust-engineer-sumitake

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Rust code that compiles is not automatically correct: hidden aliasing bugs behind borrow-checker workarounds, production panics from stray unwrap calls, and async tasks that never get cancelled slip through surface-level review. This Skill provides senior-level Rust analysis focused on memory safety, ownership correctness, and predictable performance. ## Core Features & Use Cases - Soundness Review: Traces ownership flow, lifetime choices, unsafe block invariants, and interior mutability patterns to find real defects rather than style issues. - Async and Concurrency Analysis: Examines cancellation safety, Pin/Unpin implications, shared mutable state, and atomic operation choices under contention. - Performance Discipline: Flags allocation churn, unnecessary clones, and hot-path copies, and recommends zero-copy alternatives where they apply. - Use Case: A diff introduces a new unsafe block and changes an async task's shutdown path. Ask for a review and receive the exact invariant the unsafe block relies on, whether the surrounding safe API upholds it, and what happens to in-flight work when the future is dropped. ## Quick Start Ask the agent to review this Rust code for soundness and explain any unsafe blocks, panic risks, and async cancellation issues it finds.

Frequently Asked Questions about rust-engineer

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

FAQPage Schema
How do I review Rust code for soundness issues?▼

Trace the ownership flow and execution path of the changed code, then verify each unsafe block's stated invariant still holds and that the surrounding safe API upholds it. Check for latent panics from unwrap, expect, indexing, or arithmetic on realistic input.

How to fix borrow checker errors without hiding real bugs?▼

Identify the root cause of the aliasing or lifetime conflict rather than applying a workaround that silences the compiler. Prefer the smallest change matching the actual sharing pattern, such as choosing the right smart pointer or adjusting lifetime annotations explicitly.

What should I check in Rust async code for cancellation safety?▼

Examine what happens to in-flight work when a future is dropped, including Pin and Unpin implications and whether shared state stays consistent. Confirm tasks are actually cancelled on shutdown rather than leaking or observing torn state.

When is it acceptable to add unsafe code in Rust?▼

Only after the safe alternative has been tried and shown insufficient, typically for a measured performance need. Every unsafe block must document the invariant it relies on, and the surrounding safe API must actually uphold that invariant.

Why does my Rust code panic in production but not in tests?▼

Latent panics come from unwrap, expect, indexing, or arithmetic that only fails on realistic input distributions not covered by tests. Typed error propagation with the question-mark operator and property tests or fuzz targets reduce this risk.