ワンクリックで
rust-standards
Write idiomatic Rust code. Use when writing Rust code.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Write idiomatic Rust code. Use when writing Rust code.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Review a GitHub pull request for correctness, security, observability, test coverage, and conventions. Identify applicable skills, verify and triage sub-agent findings to cut noise, score each review dimension purple-red-amber-green, and produce a structured review saved to disk and presented to the user. Use when user asks to review a PR, check a pull request, or give feedback on changes in a PR.
Walk a user through a GitHub pull request to help them understand what it does, using markdown visualisations and a guided diff-by-diff tour. Use when the user wants to understand, explore, learn from, or be walked through a PR (not when they want a formal review).
Capture aha-moments as durable insight notes under `.ai/insight/`, or quiz the user on past insights to reinforce recall. Use when the user has just learnt something non-obvious (a fix they didn't know, an explanation that clicked, a gotcha discovered) and wants to record it, or when the user invokes `/aha quiz` to be tested on stored insights.
Toggle persistent planning mode on/off. When on, hook support can remind the agent to keep planning documents updated throughout the conversation, with manual fallback if unavailable. Combines the full planning workflow with persistent mode for long-running planning and implementation sessions. Use with a topic to start, with "continue" to resume an existing plan, or with "off" to stop.
Planning a change to any codebase. Use when user asks you to plan something instead of taking immediate action.
Toggle persistent research mode on/off. When on, hook support can remind the agent to keep the research document updated throughout the conversation, with manual fallback if unavailable. Use with a research topic to start, with "continue" to resume an existing research doc, or with "off" to stop.
| name | rust-standards |
| description | Write idiomatic Rust code. Use when writing Rust code. |
#[cfg(test)] modules within each source filetests/ directoryget_ prefix: fn name() not fn get_name()iter() / iter_mut() / into_iter()as_ (cheap &), to_ (expensive), into_ (ownership)G_CONFIG for static, no prefix for conststruct Email(String) for domain semanticsif let [first, .., last] = sliceVec::with_capacity(), String::with_capacity()Vec abuse: use arrays for fixed sizes&str over String in function parametersString for ownership: return String when transferring ownerships.bytes() over s.chars() when ASCIICow<str> when you might need to modify borrowed dataformat! over string concatenation with +contains() on string is O(n*m)? for all fallible operationsunwrap() in tests only, never productionexpect() only for provably impossible states; the message must justify why it can't fail e.g. expect("regex is valid: validated at compile time")unwrap_or / unwrap_or_else / unwrap_or_default for deliberate fallbacksassert! at function entry'src, 'ctx not just 'atry_borrow() for RefCell to avoid paniclet x = x.parse()?lazy_static! → std::sync::OnceLock (since 1.70)once_cell::Lazy → std::sync::LazyLock (since 1.80)std::sync::mpsc → crossbeam::channel only if you need multi-consumer or better performance under contention; std::sync::mpsc is fine for most use casesfailure/error-chain → thiserror/anyhowtry!() → ? operator (since 2018)pub methods must have /// doc comments/// doc comments must be extremely conciseReturns the length not This function returns the lengthfn connect() doesn't need "Connects to the server"# Examples only for non-trivial usage; doctests must compile and passNaming: snake_case (fn/var), CamelCase (type), SCREAMING_CASE (const)
Format: rustfmt (just use it)
Docs: /// for public items, //! for module docs
Lint: #![deny(clippy::all, clippy::pedantic)]
Debug on all public types; derive Clone, PartialEq only when needed#![deny(clippy::all, clippy::pedantic)] - fix all warnings