← 返回
未分类 中文

Nm Pensive Rust Review

Rust code audit: unsafe blocks, ownership patterns, and Cargo dependency security scanning
审计 Rust 代码中的不安全代码块、所有权问题和 Cargo 依赖风险
athola athola 来源
未分类 clawhub v1.9.12 3 版本 100000 Key: 无需
★ 0
Stars
📥 404
下载
💾 1
安装
3
版本
#latest

概述

> Night Market Skill — ported from claude-night-market/pensive. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

Table of Contents

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 TodoWrite Items

  1. rust-review:ownership-analysis
  2. rust-review:error-handling
  3. rust-review:concurrency
  4. rust-review:unsafe-audit
  5. rust-review:cargo-deps
  6. rust-review:evidence-log

Progressive Loading

Load modules as needed based on review scope:

Quick Review (ownership and errors):

  • See modules/ownership-analysis.md for borrowing and lifetime analysis
  • See modules/error-handling.md for Result/Option patterns

Concurrency Focus:

  • See modules/concurrency-patterns.md for async and sync primitives

Safety Audit:

  • See modules/unsafe-audit.md for unsafe block documentation

Dependency Review:

  • See modules/cargo-dependencies.md for vulnerability scanning

Idiomatic Patterns:

  • See modules/builtin-preference.md for conversion traits and builtin preference

Core Workflow

  1. Ownership Analysis: Check borrowing, lifetimes, clone patterns
  2. Error Handling: Verify Result/Option usage, propagation
  3. Concurrency: Review async patterns, sync primitives
  4. Unsafe Audit: Document invariants, FFI contracts
  5. Dependencies: Scan for vulnerabilities, updates
  6. 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
  • [ ] mlock/munlock calls: RLIMIT verified, page-aligned,

ENOMEM handled

Correctness

  • [ ] Error handling complete
  • [ ] Concurrency patterns sound
  • [ ] 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
  • [ ] Error types well-designed
  • [ ] Documentation complete

Output Format

## Summary
Rust audit findings

## Ownership Analysis
[borrowing and lifetime issues]

## Error Handling
[error patterns and issues]

## Concurrency
[async and sync patterns]

## Unsafe Audit
### [U1] file:line
- Invariants: [documented]
- Risk: [assessment]
- Recommendation: [action]

## Dependencies
[cargo audit results]

## Recommendation
Approve / Approve with actions / Block

Verification: Run the command with --help flag to verify availability.

Exit Criteria

  • All unsafe blocks audited
  • Concurrency patterns verified
  • Dependencies scanned
  • Evidence logged
  • Action items assigned

版本历史

共 3 个版本

  • v1.9.12 当前
    2026-06-19 20:02 安全 安全
  • v1.0.2
    2026-05-09 16:45 安全 安全
  • v1.0.1
    2026-05-07 19:16 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 181,691
business-ops

Nm Attune Project Planning

athola
将规格说明转化为分阶段、依赖排序的实施计划,用于规格完成后、执行前。
★ 0 📥 716
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,587