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.
SkillScore95Maintained
Automatic
◆Doc Ops pack
Last verified 8/16/2026
What it changes
Passed 21 of 22 test cases with the skill, and 20 of 22 without it.
Without skill91%
With skill95%
Checks it passed that the model alone missed
Recommends running documentation builds and doctests as a mandatory pre-publishing step
1 fixed20 passed either way1 still failing0 broke
Pass-rate lift
+5 pp
Tokens
-23%
Agent turns
0%
Response time
-33%
Model gemini-3.6-flashMeasured 8/16/2026v121 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
What is the recommended sequence of verification steps immediately prior to running `cargo publish` on a Rust library crate?
What was checked, without and with the skill
Checked
Without skill
With skill
Recommends running documentation builds and doctests as a mandatory pre-publishing step
Missed
Passed
case-13 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md27 lines2 files
Rustdoc 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.