About rustdoc-library-documentation
rustdoc-library-documentation is a skill for Rust library maintainers creating executable, navigable documentation. It emphasizes consumer workflows, public API coverage, and doctests.
Key features
- 01Organize docs around consumer tasks
- 02Write crate and module descriptions
- 03Document public APIs and invariants
- 04Add compiling examples and doctests
- 05Run documentation tests before publishing
Use cases
- 01Add crate docs to a Rust library
- 02Document functions, types, and errors
- 03Write doctests for core APIs
- 04Check docs and examples before release
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ lvtd-llc/ skills --skill rustdoc-library-documentationAfter installing, type/rustdoc-library-documentationin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
guidelines.mdagents/openai.yamlreferences/rustdoc-patterns.mdworkflows/document-library.mdDetails
From the project READMERustdoc Library Documentation
Use this skill to make Rust library documentation executable, navigable, and useful to downstream crate consumers.
Core Workflow
- Start from the consumer's first task, not from internal module order.
- Add crate-level and module-level docs that explain purpose and boundaries.
- Document public types, functions, errors, features, and invariants.
- Prefer short compiling examples and doctests for core APIs.
- Put longer scenarios in
examples/and reference them from docs. - Run docs and doctests before publishing.
Read Next
| Task | Load |
|---|---|
| Document a public crate API | guidelines.md, workflows/document-library.md |
| Add doctests or examples | references/rustdoc-patterns.md |
| Prepare docs for publishing | references/rustdoc-patterns.md |
Source Notes
Guidance is transformed and paraphrased from Herbert Wolverson, Advanced Hands-On Rust, especially Chapter 4 on documenting a library and Chapter 15 on sharing crates. Examples are original skeletons.
Comments
Markdown supported