rustdoc

Enforce RFC 1574 documentation conventions for public Rust items.

Updated Jul 10, 2025
One-click install
npx skills add https://github.com/nubiv/my-nome --skill rustdoc-nubiv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rustdoc
Source: https://github.com/nubiv/my-nome/tree/main/nix-darwin/config/claude/skills/rust-doc
Command: npx skills add https://github.com/nubiv/my-nome --skill rustdoc-nubiv

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers adhere to the official Rust documentation conventions (RFC 1574), ensuring clarity, consistency, and discoverability in their code documentation.

Core Features & Use Cases

  • Standardized Doc Comments: Learn the correct format for summary sentences, comment styles, and section headings.
  • Effective Linking: Understand how to reference types and external documentation.
  • Comprehensive Sections: Implement essential sections like # Examples, # Panics, # Errors, and # Safety.
  • Use Case: When documenting a new public Rust function, use this Skill to ensure your doc comments follow best practices, making your library easier for others to understand and use.

Quick Start

Apply the rustdoc skill to write clear and conventional documentation comments for your Rust code.

Frequently Asked Questions about rustdoc

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

FAQPage Schema
How do I write Rust documentation comments that follow RFC 1574 conventions?

Rust documentation comments following RFC 1574 require a standardized summary sentence structure, specific comment styles, section headings like # Examples, and American English spelling for public items. This ensures clarity and discoverability for your library.

What sections should I include when documenting a public Rust function?

Documenting a public Rust function should include essential sections such as # Examples, # Panics, # Errors, and # Safety. These sections communicate function behavior, failure conditions, and unsafe usage requirements to consumers.

What is the correct summary sentence structure for Rust doc comments?

The correct summary sentence structure for Rust doc comments is a concise, single sentence using American English spelling that summarizes the item. This summary appears first in the documentation block before detailing type references and examples.

How do I reference types and link external documentation in Rust code?

Referencing types and linking external documentation in Rust code involves using specific rustdoc syntax to connect module items. Effective linking ensures users can navigate between type definitions and related documentation seamlessly.

Do I need American English spelling for Rust module and type documentation?

Yes, American English spelling is required for Rust module and type documentation to adhere to RFC 1574 conventions. Enforcing this spelling standard maintains consistency across the Rust ecosystem's official documentation.

Can I use this for documenting private Rust items or only public ones?

RFC 1574 documentation conventions specifically target public Rust items, including modules and types, to ensure external API clarity. Private items generally do not require this level of standardized documentation exposure.