用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill rust命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | rust |
| description | Use when the project uses Rust for systems programming, CLI tools, WebAssembly, or backend services |
| metadata | {"author":"calcosmic"} |
&T for borrowed references; prefer &self over &mut self in method signaturesClone only when necessary -- prefer references or Copy for small typesRc<T> for shared ownership in single-threaded contexts, Arc<T> for multi-threadedRefCell<T> in performance-critical paths; restructure data to satisfy the borrow checker staticallyResult<T, E> as the standard return type for fallible operations; never panic in library codethiserror for library crates: #[derive(Error)] with descriptive variantsanyhow for application-level error propagation with context: .context("failed to open config")?AppError type at application boundaries with From trait impls for conversionunwrap() and expect() only in tests or cases where failure is genuinely impossibletokio as the async runtime; annotate main with #[tokio::main] and select the appropriate flavor (flavor = "current_thread" for lightweight, multi_thread for CPU-bound)tokio::spawn for concurrent tasks; use JoinHandle to await resultstokio::sync::Mutex (not std::sync::Mutex) across .await points to avoid holding OS locks across yieldstokio::select! for racing futures and handling cancellationmpsc, broadcast, watch) for inter-task communication over shared mutable statetype OutputFrom/Into for type conversions rather than ad-hoc methodsdyn Trait for dynamic dispatch only when static dispatch with generics is impractical[workspace] in the root Cargo.tomlsrc/bin/, src/lib.rs, and tests/Cargo.lock for binaries; omit it for published libraries#[cfg(test)] modules for unit tests within source files and tests/ directory for integration testsopt-level, lto = true, and codegen-units = 1 in Cargo.toml for maximum performancewasm32-unknown-unknown for browser WASM; use wasm-bindgen for JS interopwasm-pack for building and publishing WASM packagesstd::fs, std::net, and blocking I/O in WASM targets -- use browser APIs via web-syswee_alloc as the global allocator and tree-shake with LTOwasm-pack test --chromeSource: calcosmic/Aether — distributed by TomeVault.