一键导入
rust
Rust development conventions for formatting, linting, safety comments, and completion checks. Use when writing, editing, reviewing, or testing Rust code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Rust development conventions for formatting, linting, safety comments, and completion checks. Use when writing, editing, reviewing, or testing Rust code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Search the web from the terminal using DuckDuckGo HTML and curl.md for token-efficient results. Use when current web information, docs, issues, or site-restricted search is needed.
Read this skill before making jj commits
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Jujutsu (jj) version control reference. Use when working with jj repositories, translating git workflows to jj, or when you need more information about jj commands, revsets, templates, conflicts, bookmarks, or commits.
Cache and refresh remote git repositories under ~/.cache/checkouts/<host>/<org>/<repo> so future references can reuse a local copy. Use this skill when the user points you to a remote git repository as reference or you encountered a remote git repo through other means.
基于 SOC 职业分类
| name | rust |
| description | Rust development conventions for formatting, linting, safety comments, and completion checks. Use when writing, editing, reviewing, or testing Rust code. |
Use this skill whenever working with Rust source files (*.rs) or Rust projects.
These conventions are based on https://github.com/onbjerg/dot/blob/master/amp/docs/rust-conventions.md.
Before considering any Rust work complete, always run:
cargo +nightly fmt --all
cargo clippy --workspace --all-targets
Fix any formatting issues, clippy warnings, clippy errors, and compiler errors before finishing.
If a repository has documented project-specific test or lint commands, run those as well; these Rust checks are the baseline.
unwrapWhenever adding or keeping a call to unwrap, include a nearby note explaining why it is safe.
Example:
let a: Option<usize> = Some(1usize);
// SAFETY: Guaranteed to always be `Some`.
let b: usize = a.unwrap();
Prefer avoiding unwrap when a clear error propagation or handling path is appropriate. When unwrap is intentional, the safety note should describe the invariant that guarantees it cannot panic.