rust-review
БесплатноБез исполняемых скриптовНе проверенAudits Rust code for unsafe blocks, ownership issues, and Cargo dependency risks
от athola1 976 установок в других каталогахОб этом скилле
Night Market Skill: ported from claude-night-market/pensive. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
Rust Review Workflow
Expert-level Rust code audits with focus on safety, correctness, and idiomatic patterns.
Quick Start
/rust-review
Verification: Run the command with --help flag to verify availability.
When To Use
- Reviewing Rust code changes
- Auditing unsafe blocks
- Analyzing concurrency patterns
- Dependency security review
- Performance optimization review
When NOT To Use
- General code review without Rust - use unified-review
- Performance profiling - use parseltongue:python-performance pattern
Required Progress Items
rust-review:ownership-analysisrust-review:error-handlingrust-review:concurrencyrust-review:unsafe-auditrust-review:cargo-depsrust-review:native-modelingrust-review:idiomatic-elisionrust-review:coercion-paramsrust-review:conversion-traitsrust-review:numeric-cast-safetyrust-review:mutable-static-auditrust-review:match-wildcardrust-review:transmute-auditrust-review:float-equalityrust-review:mem-forget-auditrust-review:repr-packed-auditrust-review:evidence-logrust-review:findings-verified
Progressive Loading
Load modules as needed based on review scope:
Quick Review (ownership and errors):
- See
modules/ownership-analysis.mdfor borrowing and lifetime analysis - See
modules/error-handling.mdfor Result/Option patterns
Concurrency Focus:
- See
modules/concurrency-patterns.mdfor async and sync primitives
Safety Audit:
- See
modules/unsafe-audit.mdfor unsafe block documentation - See
modules/mutable-static-audit.mdforstatic mutglobals and their thread-safe replacements - See
modules/numeric-cast-safety.mdfor truncating and precision-losingascasts - See
modules/match-wildcard.mdfor catch-all arms that defeat enum exhaustiveness - See
modules/transmute-audit.mdformem::transmute/transmute_copycalls that reinterpret bytes with no layout check - See
modules/repr-packed-audit.mdfor#[repr(packed)]layouts whose field borrows become unaligned references
Correctness Audit:
- See
modules/float-equality.mdfor==/!=against float literals - See
modules/mem-forget-audit.mdformem::forgetleaks and no-opdrop(&x)reference drops
Dependency Review:
- See
modules/cargo-dependencies.mdfor vulnerability scanning
Idiomatic Patterns:
- See
modules/builtin-preference.mdfor conversion traits and builtin preference - See
modules/native-type-modeling.mdfor enums-over-primitives, newtype, type-state, and derived ordering - See
modules/idiomatic-elision.mdfor lifetime elision, expression-oriented returns, and explicit-> ()unit returns - See
modules/coercion-params.mdfor&String/&Vec<T>/&PathBufparameters that defeat deref coercion (prefer&str/&[T]/&Path) - See
modules/conversion-traits.mdforimpl Intothat should beimpl From, and discardedtry_into().unwrap()conversion errors
Core Workflow
- Ownership Analysis: Check borrowing, lifetimes, clone patterns
- Error Handling: Verify Result/Option usage, propagation
- Concurrency: Review async patterns, sync primitives
- Unsafe Audit: Document invariants, FFI contracts
- Dependencies: Scan for vulnerabilities, updates
- Evidence Log: Record commands and findings
Rust Quality Checklist
Safety
- All unsafe blocks documented with SAFETY comments
- FFI boundaries properly wrapped
- Memory safety invariants maintained
- No
static mutglobals; shared state usesOnceLock/LazyLock, atomics, or aMutex/RwLock - No
mem::transmute/transmute_copy; bytes converted withfrom_le_bytes/from_bits/bytemuckor pointers with.cast() -
#[repr(packed)]fields copied out before borrowing (no unaligned references) - No
mem::forgetleaks (useManuallyDrop/scope) and no no-opdrop(&x)reference drops -
mlock/munlockcalls: RLIMIT verified, page-aligned, ENOMEM handled
Correctness
- Error handling complete
- Concurrency patterns sound
- Lossy
ascasts (length truncation,as u8/i8,as f32) replaced withTryFrom/From - Enum matches exhaustive; no
_ => unreachable!()/panic!/{}catch-alls - Floats compared with a tolerance, not exact
==/!=against a float literal - Tests cover critical paths
Performance
- No unnecessary allocations
- Borrowing preferred over cloning
- Async properly non-blocking
Idioms
- Standard traits implemented
- Conversion traits preferred over helper functions
- Stringly-typed values and boolean flags modeled as enums
- Domain in
Установить rust-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл rust-review?
Audits Rust code for unsafe blocks, ownership issues, and Cargo dependency risks
Как установить скилл rust-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rust-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic