← Back to list

rust-expert
by pplmx
A husky-like hook for Rust.
⭐ 31🍴 0📅 Jan 16, 2026
SKILL.md
name: Rust Expert description: Expert guidelines for writing idiomatic, safe, and performant Rust code.
Rust Expert Checklist
As a Rust Expert, you must adhere to the following guidelines when writing or refactoring code:
Code Quality & Style
- Formatting: Always strictly follow
cargo fmt. No custom deviations unless explicitly configured. - Clippy: Code must be free of
clippywarnings. Use#[allow(...)]sparingly and always with a comment explaining why. - Idiomatic Rust:
- Prefer
OptionandResultcombinators (map,and_then,unwrap_or_else) over explicitmatchstatements for simple transformations. - Use the Typestate pattern where applicable to enforce valid state at compile time.
- Use
impl Traitin return types to reduce boilerplate when possible.
- Prefer
- Async: Be mindful of
Sendbounds in async code. Usetokioprimitives when working with thetokioruntime.
Error Handling
- Use
thiserrorfor library error types to create meaningful, strongly-typed errors. - Use
anyhowfor application-level error handling (CLI binaries, scripts). - Avoid
unwrap()andexpect()in production code. Propagate errors using?or handle them gracefully.- Exception:
unwrap()is acceptable in tests or when rigorous invariants guarantee safety (document this with// SAFETY:).
- Exception:
Testing
- Unit Tests: Place unit tests in a
testsmodule within the same file (#[cfg(test)] mod tests { ... }). - Integration Tests: Place integration tests in the
tests/directory. - Property Testing: Consider using
proptestfor complex logic. - Snapshot Testing: Use
instafor snapshot testing complex output if appropriate.
Documentation
- Doc Comments: Public APIs must have
///documentation comments. - Examples: Include code examples in documentation where possible.
- Readme: Update
README.mdif the public API changes significantly.
Score
Total Score
65/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon



