一键导入
lang-rust
Use when writing, auditing, or generating documentation for Rust projects — covers docstring conventions, API doc extraction, and Rust-specific patterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when writing, auditing, or generating documentation for Rust projects — covers docstring conventions, API doc extraction, and Rust-specific patterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when generating or auditing documentation in Docusaurus format — covers config, directory structure, frontmatter conventions, and build commands.
Use when generating or auditing documentation in MkDocs format — covers config, directory structure, frontmatter conventions, and build commands.
Use when generating or auditing documentation in plain Markdown format — covers config, directory structure, frontmatter conventions, and build commands.
Use when generating or auditing documentation in Sphinx format — covers config, directory structure, frontmatter conventions, and build commands.
Use when generating or auditing documentation in VitePress format — covers config, directory structure, frontmatter conventions, and build commands.
Use when writing, auditing, or generating documentation for projects in unsupported languages — covers docstring conventions, API doc extraction, and generic heuristic patterns.
| name | lang-rust |
| description | Use when writing, auditing, or generating documentation for Rust projects — covers docstring conventions, API doc extraction, and Rust-specific patterns. |
A symbol is public if it has the pub visibility modifier:
| Pattern | Public? |
|---|---|
pub fn name( | Yes |
pub struct Name | Yes |
pub enum Name | Yes |
pub trait Name | Yes |
pub type Name = | Yes |
pub const NAME: | Yes |
pub(crate) fn name( | Crate-internal, exclude from external docs |
pub(super) fn name( | Module-internal, exclude |
fn name( (no pub) | No |
Only pub (fully public) items require documentation. pub(crate) and pub(super) are internal.
| Type | Detection | Documentation Expected |
|---|---|---|
| Functions | pub fn | /// doc comment with params, returns, errors |
| Structs | pub struct | /// on struct + /// on each pub field |
| Enums | pub enum | /// on enum + /// on each variant |
| Traits | pub trait | /// on trait + /// on each method |
| Impl blocks | impl Name | /// on each pub method |
| Type aliases | pub type | /// describing the alias |
| Constants | pub const | /// one-liner |
| Modules | pub mod | //! module doc or /// on mod declaration |
///)/// Processes the input data and returns results.
///
/// # Arguments
///
/// * `input` - The raw input data to process.
/// * `config` - Processing configuration.
///
/// # Returns
///
/// A vector of processed results.
///
/// # Errors
///
/// Returns `ProcessError` if the input is malformed.
///
/// # Examples
///
/// ```
/// let results = process_data(&input, &config)?;
/// assert!(!results.is_empty());
/// ```
pub fn process_data(input: &[u8], config: &Config) -> Result<Vec<Result>, ProcessError> {
//!)Used for module/crate-level documentation:
//! # Auth Module
//!
//! Provides user authentication and session management.
A Rust symbol is fully documented when:
/// doc comment (not empty)# Arguments section lists all parameters (for functions with params)# Returns section describes return value (if not ())# Errors section lists error conditions (if returns Result)# Examples section with working code block (recommended)#[doc(hidden)]: exclude from documentation coverage#[cfg(test)] modules: excludepub use): document at origin, not re-export siteSource files: **/*.rs
Exclude: target/, **/tests.rs, **/test_*.rs, files in #[cfg(test)] modules