一键导入
code-standards-rust
Rust coding standards for production code. Invoke this skill always when working in Rust language.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Rust coding standards for production code. Invoke this skill always when working in Rust language.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | code-standards-rust |
| description | Rust coding standards for production code. Invoke this skill always when working in Rust language. |
? for early returns; avoid match on Result/Option for propagationif let/let else for single-pattern extraction; match for multiple armsmatch on booleans; use if/elsefilter_map, find_map) over manual loops&str > String, &[T] > Vec<T>, &Path > PathBuf for parameters.clone(); prefer borrowingArc is not cheap; do not wrap everything in Arc without a concrete shared-ownership need.as_ref() to convert &Option<T> → Option<&T>into_iter() over iter().cloned()Rc<RefCell<T>>; it is a design smell and should be used only when shared mutability is truly requiredstruct UserId(u64))pub(crate) before pubDebug always; Copy only for small value types.unwrap()/.expect() in library/production code without // SAFETY: commentResult for recoverable failures, Option for absenceanyhow/thiserror for applicationsunsafe block needs invariant documentationif let chains → early returnsVec<T> parameters where &[T] sufficesArc instead of choosing the simplest ownership modelRc<RefCell<T>> instead of fixing ownership and lifetime designunsafe without documented invariantsC# 14 coding standards. Invoke this skill always when working in C# language.
Expert guide for writing git commit messages following the Conventional Commits 1.0.0 specification.
Use `chromium --dump-dom` to inspect the fully rendered DOM after JavaScript execution. For debugging layout/scrolling issues and scraping dynamic pages.
Multi-repository codebase exploration. Research library internals, find code patterns, understand architecture, compare implementations across GitHub/npm/PyPI/crates. Use when needing deep understanding of how libraries work, finding implementations across open source, or exploring remote repository structure.
Best practices for writing clean, maintainable, and robust tests with TUnit.