RU

rust-docs-guidelines

Provides best practices and standards for writing idiomatic, linked Rust documentation.

Install

mkdir -p .claude/skills/rust-docs-guidelines && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1552" && unzip -o skill.zip -d .claude/skills/rust-docs-guidelines && rm skill.zip

Installs to .claude/skills/rust-docs-guidelines

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Guidelines for writing Rust documentation. Use this when you want to write Rust documentation.
94 chars✓ has a “when” trigger
Beginner

Key capabilities

  • Enforce intra-documentation links for all symbols
  • Explain concepts once and link to the original definition
  • Document the 'why' instead of trivial implementation details
  • Use line comments for specific code section documentation

How it works

The skill applies a set of standards that prioritize linking to existing definitions and focusing on the rationale behind code decisions rather than the mechanics of the implementation.

Inputs & outputs

You give it
Rust source code with docstrings
You get back
Standardized, maintainable documentation

When to use rust-docs-guidelines

  • Write idiomatic rustdoc comments
  • Add intra-documentation links
  • Improve code documentation quality
  • Document complex rust functions

About this skill

Rust Docs Guidelines

Standards to follow when writing Rust documentation.

Guidelines

  • Key concepts should be explained only once. All other documentation should use an intra-documentation link to the first explanation.
  • Always use an intra-documentation link when mentioning a Rust symbol (type, function, constant, etc.).
  • Avoid referring to specific lines or line ranges, as they may change over time. Use line comments if the documentation needs to be attached to a specific code section inside a function/method body.
  • Focus on why, not how. In particular, avoid explaining trivial implementation details in line comments.
  • Refer to constants using intra-documentation links. Don't hard-code their values in the documentation of other items.
  • Intra-documentation links to private items are preferable to duplication. Add #[allow(rustdoc::private_intra_doc_links)] where relevant.

When not to use it

  • Explaining trivial implementation details
  • Hard-coding constant values in documentation

Limitations

  • Requires discipline to avoid explaining 'how' in comments
  • Depends on the existence of a primary definition for linking

How it compares

It enforces a structured, link-heavy documentation style that prevents duplication and ensures consistency across the codebase.

Compared to similar skills

rust-docs-guidelines side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
rust-docs-guidelines (this skill)75moNo flagsBeginner
documenting-rust-code12moReviewBeginner
write-documentation129dReviewIntermediate
review-rust-docs15moNo flagsBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry