documenting-rust-code

Official

Generate crystal-clear Rust docs, effortlessly.

Authorhashintel
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides comprehensive guidance for writing high-quality Rust documentation in the HASH repository, ensuring consistency, navigability, and adherence to rustdoc conventions. It streamlines code understanding, accelerates developer onboarding, and reduces the effort required to maintain accurate API documentation.

Core Features & Use Cases

  • Function & Type Documentation: Learn to structure doc comments for functions, methods, structs, enums, and traits, including single-line summaries and detailed descriptions.
  • Error & Panic Sections: Guides you to document all fallible functions with # Errors sections, linking error variants, and to use # Panics for functions that might panic, ensuring complete API contracts.
  • Intra-Doc Links: Master the [...] syntax for internal and standard library type references, making your documentation highly navigable and interconnected.
  • Compilable Code Examples: Learn to include compilable # Examples sections for public APIs, demonstrating practical usage and error handling, making your code easier to adopt.
  • Use Case: When writing a new public function, this skill guides you to start with a concise summary, describe parameters inline, detail return values, add an # Errors section with intra-doc links for all potential error variants, and include a practical code example demonstrating its usage.

Quick Start

Use the documenting-rust-code skill to write documentation for the 'create_user' function, including its parameters, return value, and potential errors.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: documenting-rust-code
Download link: https://github.com/hashintel/hash/archive/main.zip#documenting-rust-code

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository