Borrowing it
Nothing to install: this file belongs to shift-editor/shift. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shift-editor/shift/main/.agents/skills/rustdoc/SKILL.mdgit clone --depth 1 https://github.com/shift-editor/shiftWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/shift-editor/shift/rustdoc)<a href="https://agentmods.dev/skills/shift-editor/shift/rustdoc"><img src="https://agentmods.dev/badge/skills/shift-editor/shift/rustdoc/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/shift-editor/shift/rustdoc"><img src="https://agentmods.dev/badge/skills/shift-editor/shift/rustdoc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00083 | $0.01279 |
| Opus 5.5 | $0.00033 | $0.00512 |
| Sonnet 5.5 | $0.00017 | $0.00256 |
| Haiku 4.5 | $0.00008 | $0.00128 |
Grade A, and why
rustdoc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rustdoc — Source API Contracts
Write Rustdoc as the stable contract a caller or maintainer needs without reconstructing the implementation.
Use /// immediately before an item and //! at the start of a module or crate. Let Rust's types describe shape; document semantics the type system cannot express.
Runbook
- Identify the boundary and audience: caller, implementer, compiler adapter, persistence layer, or maintainer.
- Read the surrounding module, relevant callers, and behavior tests before describing the contract.
- Start with one short sentence stating what the item represents or does.
- Add only applicable details: ownership, snapshotting, mutation, I/O, units, coordinate domain, fallback, ordering, concurrency, performance, or invariants.
- Add conventional sections when required:
# Errorsfor observable failure conditions.# Panicsfor conditions that actually panic.# Safetyfor everyunsafeAPI, stating the caller's obligations.# Examplesonly when call order, conversion, or output is non-obvious.
- Link related APIs with intra-doc links such as [
Font] or [Self::export]. - Delete implementation trivia, current-caller anecdotes, migration history, and statements already obvious from the signature.
What To Document
Prioritize contracts that Rust cannot encode directly:
- Ownership and lifetime semantics — owned snapshot versus live view, aliasing, cloning, and who may mutate a result.
- Effects and atomicity — filesystem or database I/O, shared-state mutation, transaction boundaries, and partial-failure behavior.
- Units and coordinate domains — font units, user coordinates, design coordinates, normalized coordinates, and mapping direction.
- Resolution and sparsity — exact lookup versus fallback, missing layer versus empty layer, and default-source requirements.
- Ordering and identity — stable ordering, ID preservation, minted identity, and when a value becomes stale.
- Failures — error conditions, panic preconditions, cancellation, and unsupported input.
- Concurrency and performance — thread assumptions, blocking work, hot-path suitability, and important complexity.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 128 lines · 83 tokens per session scan A fe1814af0d9f
rustdoc is a skill published in the GitHub repository shift-editor/shift (379 stars, last pushed today), licensed Apache-2.0. It adds 83 tokens to every session and 1,279 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.
Other skills, from other repositories
ax-rust-signature
Use when writing Rust code with axllm for string signatures, field descriptors, JSON schema output, validation, and typed tool argument shapes.
dd-code-generation
Use pup CLI for immediate Datadog operations or generate code for integration into applications.
ax-rust-llm
Use when writing Rust code with axllm for using the generated Ax package, factory functions, package docs, examples, and API reference.
solana-toolkit-guide
Guide to the Solana Wallet Toolkit — vanity address generation with multi-threaded search, official Solana Labs libraries, Rust and TypeScript implementations. Includes wallet generation, custom address prefixes, and OG names on the blockchain.
solana
Use when working on Solana software, including one or more of: Solana client code using TypeScript, Rust libraries that use Solana crates, Anchor programs, Quasar programs, LiteSVM tests, including Rust program files, TypeScript tests, and Anchor.toml or Quasar.toml configuration. Designed to create minimal, reusable…
docstring-generator
Generate and update language-idiomatic doc comments for TypeScript (TSDoc/JSDoc) and Rust (Rustdoc). Use when asked to "add docs", "document this file", "generate docstrings", "add JSDoc", "add Rustdoc", "write TSDoc", or when working with TypeScript or Rust source files that need documentation comments. Supports…