lang-rust

Identify public Rust API items and verify doc-comment conventions.

6|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/xiaolai/docs-guardian-for-claude --skill lang-rust-xiaolai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lang-rust
Source: https://github.com/xiaolai/docs-guardian-for-claude/tree/main/skills/docs-guardian/languages/rust
Command: npx skills add https://github.com/xiaolai/docs-guardian-for-claude --skill lang-rust-xiaolai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rust crates expose a public API surface that must be consistently documented. This Skill automatically detects all pub items (functions, structs, enums, traits, impl blocks, type aliases, and public modules) and verifies or generates documentation according to Rust doc-comment conventions, improving doc accuracy and maintainability.

Core Features & Use Cases

  • Public item detection: scans Rust crates to locate all pub items (functions, structs, enums, traits, impls, and type aliases).
  • Documentation conformance: checks for proper doc comments (///) and module-level docs using inner //! or module declarations, flagging gaps for repair.
  • Assisted modernization: guides adding missing docs during refactors, reducing docs debt in large codebases.

Quick Start

Run the Rust language adapter on your crate to detect public items and generate a doc coverage report.

Frequently Asked Questions about lang-rust

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find all public items in a Rust crate for documentation?

Finding undocumented pub items in Rust involves scanning crate boundaries for public functions, structs, enums, and traits, then flagging missing /// doc comments and //! module-level docs to repair documentation gaps.

How do I check Rust doc comment conventions for public modules?

Checking Rust doc comment conventions involves verifying that all pub items have outer /// doc comments and modules have inner //! comments or module declarations, ensuring public API surface documentation accuracy.

Can I generate a doc coverage report for Rust APIs based on pub visibility?

Yes, you can generate a doc coverage report for Rust APIs by analyzing pub visibility modifiers and crate boundaries, which detects public items and flags missing documentation according to Rust doc-comment conventions.

Does this work with Rust libraries across multiple crates and modules?

Yes, this works across Rust libraries by analyzing crate boundaries and module declarations to detect pub visibility, ensuring functions, structs, enums, and traits are properly documented throughout the entire codebase.

What is the best way to reduce documentation debt in large Rust codebases?

The best way to reduce documentation debt in large Rust codebases is to automate public item detection and enforce doc-comment conventions during refactors, systematically identifying missing /// and //! comments on pub items.

Why are my Rust module docs not recognized by documentation tools?

Rust module docs might not be recognized if they lack inner //! doc comments or proper module declarations, which are required alongside outer /// comments on pub items to ensure full API documentation conformance.