rust-docs-guidelines
/rust-docs-guidelines
Guidelines for writing Rust documentation. Use this when you want to write Rust documentation.
- Author
- RediSearch ↗
- Repository
- RediSearch ↗
- Licence
- AGPL-3.0
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 2
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.
What it does and when to use it
Guidelines for writing Rust documentation. Use this when you want to write Rust documentation.
Original author description
Guidelines for writing Rust documentation. Use this when you want to write Rust documentation.
How it works
- Guidelines
SKILL.md preview
--- name: rust-docs-guidelines description: Guidelines for writing Rust documentation. Use this when you want to write Rust documentation. --- # 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.). - In a `# Safety` section, link the word `valid` to std's pointer-validity rules: write it as `[valid]` and put this reference definition at the end of the doc block — ```text [valid]: https://doc.rust-lang.org/std/ptr/index.html#safety ``` Only where it means pointer or memory validity — `valid UTF-8`, a valid enum variant, a valid nul terminator and a by-value struct whose fields must agree keep their plain form, since std's definition says nothing about them. A duration clause such as "must remain valid for the lifetime of the returned iterator" does mean it, so link it as well; the duration it adds is orthogonal to what validity means. A callback parameter is the other way round: std's rules cover accesses through data pointers, not whether an address is callable under a given ABI, so require the signature to be `[ABI-compatible]` instead and define it as — ```text [ABI-compatible]: https://doc.rust-lang.org/std/primitive.fn.html#abi-compatibility ``` Non-doc `// SAFETY:` comments keep the plain form too: rustdoc does not render them, so the brackets would stay literal text. - 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.
Versions
The database has no other skills named rust-docs-guidelines.
Database snapshot: 13.11.2026 · package version 8d791a183a5e (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 86rust-tests-guidelines
Guidelines for writing Rust tests. Use this when you want to write Rust tests. - 100rust
Provides Rust coding best practices for structure, patterns, performance, and error handling. Use when writing or reviewing Rust code, or when the user asks for Rust style guidance. - 100rust-development
Expert Rust development guidance covering naming conventions, type safety, error handling, documentation, and best practices based on official Rust guidelines. Use this skill when writing new Rust code, reviewing or modifying existing Rust code, designing Rust APIs or libraries,… - 100rust-development
Develop, review, and explore Rust code with strict adherence to Pragmatic Rust Guidelines. Use when the user mentions Rust, .rs files, Cargo, clippy, rustdoc, or requests Rust architecture, implementation, or review. - 90write-rust-tests
Write Rust tests to verify correctness of Rust code. Use this when you want to write Rust tests. - 100rust-documentation
Design, write, build, test, and publish Rust documentation with rustdoc, cargo doc, doctests, intra-doc links, crate-level guides, examples, README synchronization, mdBook, docs.rs metadata, link checking, documentation CI, and the Rust API Guidelines Documentation chapter…