OpenParable
Skip to content
← Back to skills

Rust Docs Guidelines

Development
rust-docs-guidelines

Rust Docs Guidelines is an Agent Skill for development published in the RediSearch/RediSearch repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Guidelines for writing Rust documentation. Use this when you want to write Rust documentation.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/RediSearch/RediSearch/blob/HEAD/.skills/rust-docs-guidelines/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/rust-docs-guidelines, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

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.