# Rustdoc Library Documentation

> Write and review Rust library documentation with rustdoc module docs, public API examples, doctests, examples directories, missing-docs gates, docs.rs readiness, and user-first crate narratives. Use when documenting a Rust crate, improving docs before publishing, or turning examples into tested rustdoc.

- Skill: `thedixitjain/rustdoc-library-documentation` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds add thedixitjain/rustdoc-library-documentation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/thedixitjain/rustdoc-library-documentation/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: thedixitjain (https://skillmd.com/u/thedixitjain)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/thedixitjain/rustdoc-library-documentation

---



# Rustdoc Library Documentation

Use this skill to make Rust library documentation executable, navigable, and
useful to downstream crate consumers.

## Core Workflow

1. Start from the consumer's first task, not from internal module order.
2. Add crate-level and module-level docs that explain purpose and boundaries.
3. Document public types, functions, errors, features, and invariants.
4. Prefer short compiling examples and doctests for core APIs.
5. Put longer scenarios in `examples/` and reference them from docs.
6. 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.

---

**Source:** [`hashgraph-online/awesome-codex-plugins`](https://github.com/hashgraph-online/awesome-codex-plugins) → `plugins/LVTD-LLC/skills/skills/rustdoc-library-documentation/SKILL.md`

