← スキル一覧に戻る

rust
by kprsnt2
⭐ 0🍴 0📅 2026年1月15日
SKILL.md
name: rust description: Best practices for Rust development including ownership, error handling, and async patterns. globs: ["/*.rs", "/Cargo.toml", "**/Cargo.lock"] priority: 90 tags: ["language"]
Rust Best Practices
Ownership & Borrowing
- Prefer borrowing over ownership transfer
- Use &str for function parameters over String
- Clone only when necessary
- Use Cow for maybe-owned strings
Error Handling
- Use Result<T, E> for recoverable errors
- Use panic! only for unrecoverable errors
- Use ? operator for error propagation
- Create custom error types with thiserror
- Use anyhow for application errors
Idioms
- Use iterators over manual loops
- Prefer pattern matching with match
- Use Option for optional values
- Use derive macros for common traits
- Use clippy for linting
Performance
- Use release builds for benchmarks
- Profile before optimizing
- Consider using Box for large stack types
- Use Arc/Mutex for shared state
Async
- Use tokio or async-std runtime
- Use async/await for async code
- Avoid blocking in async context
- Use channels for async communication
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です