AgentSkillsCN

rs-review

对 Rust 代码进行正确性检查、设计原则评估以及规则合规性审核。

SKILL.md
--- frontmatter
name: rs-review
description: Review Rust code for correctness, design principles, and rule compliance.
user-invocable: true
context: fork
allowed-tools: [Read, Grep, Glob, Bash, Task]
agent: rust-code-reviewer

/rs-review

Review Rust code for rule compliance and best practices.

Usage

code
/rs-review              # Review all modified .rs files
/rs-review src/lib.rs   # Review specific file
/rs-review src/         # Review directory

What It Checks

P0 - Critical:

  • Type-driven development (newtype, invalid states, exhaustive match)
  • Over-engineering (premature abstraction, generic infection)

P1 - Important:

  • Code style (SRP, encapsulation, naming, modules)

Smells:

  • Repeated map_err → delegates to rust-error-handling-checker
  • Generic infection → delegates to rust-abstraction-builder
  • Compilation issues → delegates to rust-compile-challenger

Output

markdown
## Review: [filename]

### Critical (must fix)
- [ ] Issue → fix

### Warning (should fix)
- [ ] Issue → fix

### Suggestion
- [ ] Issue → fix

Quick Mode

For fast checks without deep analysis:

code
/rs-review --quick      # clippy + fmt only