shift: Skill for Claude Code

.agents/skills/rustdoc/SKILL.md

rustdoc is a skill for Claude Code, Codex from shift-editor/shift. It costs 83 tokens per session (1,279 once invoked), scanned A, original, Apache-2.0.

A skill for adding or revising Rustdoc, the documentation comments attached to Rust code. It covers public and internal APIs, data structures, persistence boundaries, trait implementations, and unsafe code.

In plain words
What is it for?
Use it when documenting Rust APIs or changing comments around compiler adapters, storage code, domain types, or unsafe implementations.
Why use it?
It helps code documentation explain ownership, units, coordinate spaces, and other details that are easy to misunderstand in Rust.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is shift-editor/shift's own configuration. It tells Claude Code and Codex how to work on shift itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything shift configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/shift-editor/shift/main/.agents/skills/rustdoc/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/shift-editor/shift

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for rustdoc

README.md
[![agentmods](https://agentmods.dev/badge/skills/shift-editor/shift/rustdoc/github.svg)](https://agentmods.dev/skills/shift-editor/shift/rustdoc)
Your own site
<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.

agentmods 80×15 button for rustdoc

Your own site · 80×15
<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>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,279 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash fe1814af0d9f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.agents/skills/rustdoc/SKILL.md · 128 lines

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

  1. Identify the boundary and audience: caller, implementer, compiler adapter, persistence layer, or maintainer.
  2. Read the surrounding module, relevant callers, and behavior tests before describing the contract.
  3. Start with one short sentence stating what the item represents or does.
  4. Add only applicable details: ownership, snapshotting, mutation, I/O, units, coordinate domain, fallback, ordering, concurrency, performance, or invariants.
  5. Add conventional sections when required:
    • # Errors for observable failure conditions.
    • # Panics for conditions that actually panic.
    • # Safety for every unsafe API, stating the caller's obligations.
    • # Examples only when call order, conversion, or output is non-obvious.
  6. Link related APIs with intra-doc links such as [Font] or [Self::export].
  7. 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.

Read the full file on GitHub · 128 lines

Changes

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.

  1. 1mo ago First seen · 128 lines · 83 tokens per session scan A fe1814af0d9f

Subscribe to this mod's changes

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.

Related

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.

ax-llm/ax · 36 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

ax-rust-llm

Use when writing Rust code with axllm for using the generated Ax package, factory functions, package docs, examples, and API reference.

ax-llm/ax · 37 tokens

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.

nirholas/three.ws · 50 tokens

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…

quicknode/solana-finance-claude-plugin · 76 tokens

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…

espennilsen/pi · 118 tokens