write-documentation

Standardize Rust rustdoc structure, voice, and intra-doc links.

477|32|Updated Feb 23, 2022
One-click install
npx skills add https://github.com/r3bl-org/r3bl-open-core --skill write-documentation-r3bl-org
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-documentation
Source: https://github.com/r3bl-org/r3bl-open-core/tree/main/.claude/skills/write-documentation
Command: npx skills add https://github.com/r3bl-org/r3bl-open-core --skill write-documentation-r3bl-org

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing Rust documentation often suffers from inconsistent voice, unclear structure, and brittle rustdoc links. This skill provides a clear, reusable guide to craft high-quality rustdoc for modules, traits, and types, ensuring professional, navigable documentation.

Core Features & Use Cases

  • Voice & Tone: Establishes a serious, precise, and approachable tone for Rust documentation.
  • Prose Style & Structure: Enforces opening paragraphs, proper subjects, and inverted pyramid structure.
  • Intra-doc Links: Guides the use of crate:: paths and reference-style links for robust navigation.
  • Constants & Formatting: Covers byte constants conventions and cargo rustdoc-fmt usage to ensure consistent formatting.
  • Commands for Retroactive Fixes: Provides commands such as /fix-intradoc-links, /fix-comments, /fix-md-tables to repair existing docs.

Quick Start

Use this skill to audit and repair rustdoc across a codebase. Start by running the documentation checks, then apply fixes with the provided commands.

Frequently Asked Questions about write-documentation

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

FAQPage Schema
How do I fix broken rustdoc intra-doc links in my Rust crate?

To fix broken rustdoc intra-doc links, use the /fix-intradoc-links command to retroactively repair paths and enforce reference-style links using crate:: paths for robust navigation across your codebase.

What is the best way to structure Rust module and trait documentation?

The best way to structure Rust documentation is using the inverted pyramid approach, placing opening paragraphs and proper subjects first to ensure clear, professional, and navigable rustdoc for modules, traits, and types.

How do I format markdown tables and comments in an existing Rust codebase?

You can format markdown tables and comments in a Rust codebase by running the /fix-md-tables and /fix-comments commands to standardize formatting and apply consistent rustdoc conventions retroactively.

Does cargo rustdoc-fmt work with reference-style intra-doc links?

Yes, cargo rustdoc-fmt works with reference-style intra-doc links, ensuring consistent formatting while maintaining the crate:: paths required for robust documentation navigation.

Why do my rustdoc links break when I refactor Rust module paths?

Rustdoc links break during refactoring because brittle relative paths fail to resolve, which is why enforcing reference-style intra-doc links with crate:: paths provides robust navigation that survives module restructuring.