agentsclimarketplace

Lang rust

Skill xiaolai/docs-guardian-for-claude/skills/docs-guardian/languages/lang-rust

Use when writing, auditing, or generating documentation for Rust projects — covers docstring conventions, API doc extraction, and Rust-specific patterns.From its SKILL.md

Install
npx -y skills add xiaolai/docs-guardian-for-claude --skill lang-rust

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.8 KB, as published. Nobody here has run it

Rust Language Adapter

Public API Detection

A symbol is public if it has the pub visibility modifier:

PatternPublic?
pub fn name(Yes
pub struct NameYes
pub enum NameYes
pub trait NameYes
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.

Symbol Types to Document

TypeDetectionDocumentation Expected
Functionspub fn/// doc comment with params, returns, errors
Structspub struct/// on struct + /// on each pub field
Enumspub enum/// on enum + /// on each variant
Traitspub trait/// on trait + /// on each method
Impl blocksimpl Name/// on each pub method
Type aliasespub type/// describing the alias
Constantspub const/// one-liner
Modulespub mod//! module doc or /// on mod declaration

Doc Comment Format

Outer doc comments (///)

/// 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> {

Inner doc comments (//!)

Used for module/crate-level documentation:

//! # Auth Module
//!
//! Provides user authentication and session management.

Documentation Completeness Check

A Rust symbol is fully documented when:

  1. Has /// doc comment (not empty)
  2. # Arguments section lists all parameters (for functions with params)
  3. # Returns section describes return value (if not ())
  4. # Errors section lists error conditions (if returns Result)
  5. # Examples section with working code block (recommended)

Special Cases

  • #[doc(hidden)]: exclude from documentation coverage
  • #[cfg(test)] modules: exclude
  • Derive macros: no docs needed on derived implementations
  • Re-exports (pub use): document at origin, not re-export site

File Patterns

Source files: **/*.rs Exclude: target/, **/tests.rs, **/test_*.rs, files in #[cfg(test)] modules

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.