Agent skill

Rustdoc

by shift-editor in shift-editor/shift

Add or revise source-level Rustdoc for Shift Rust APIs. An agent skill from shift-editor/shift.

Apache-2.0Auto-check passed

Install Rustdoc

skills CLI
$ npx skills add shift-editor/shift --skill rustdoc -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install shift-editor/shift rustdoc --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/shift-editor/shift.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/rustdoc .claude/skills/rustdoc && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rustdoc
GitHub stars
343
Token cost
~1.6k tokens
SKILL.md length
665 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
Apache-2.0

At a glance

Add or revise source-level Rustdoc for Shift Rust APIs. An agent skill from shift-editor/shift.

  • Works in 7 steps: Identify the boundary and audience:… → Read the surrounding module, relevant… → Start with one short sentence stating… → …
  • SKILL.md covers Runbook, What To Document, Style Rules and Conventional Sections, plus 3 more sections
  • Calls cargo

What it does

Rustdoc is an agent skill from shift-editor/shift. Add or revise source-level Rustdoc for Shift Rust APIs. Use before writing or editing documentation comments in .rs files, especially for public or crate-visible APIs, domain structures, compiler adapters, persistence boundaries, trait implementations, unsafe code, or any API where ownership, units, coordinate spaces, mutation, I/O, sparse behavior, failure modes, panics, or concurrency are easy to misunderstand.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Rust. The repository describes itself as: A cross-platform font editor built in Rust and TypeScript. The licence is Apache-2.0.

Example prompts

  • “/rustdoc”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  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…
  5. Add conventional sections when required
  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 it can do on your machine

Read from SKILL.md and the folder at commit e7dacfa. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rustdoc loads about 1.6k tokens when it runs. Until then it costs about 107 tokens; SKILL.md has 665 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~107
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from shift-editor/shift at commit e7dacfa, republished under its Apache-2.0 licence (© shift-editor). 665 words, ~1,571 tokens.

Download SKILL.mdSave it as .claude/skills/rustdoc/SKILL.md (or your agent's skills folder).
name
rustdoc
description
Add or revise source-level Rustdoc for Shift Rust APIs. Use before writing or editing documentation comments in `.rs` files, especially for public or crate-visible APIs, domain structures, compiler adapters, persistence boundaries, trait implementations, unsafe code, or any API where ownership, units, coordinate spaces, mutation, I/O, sparse behavior, failure modes, panics, or concurrency are easy to misunderstand.

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.

Document pub(crate) and private items when they form an architectural seam or carry a non-obvious invariant. Do not document obvious constructors or mechanical work wrappers merely because they are visible within the crate.

Style Rules

  • Open with a direct contract sentence; avoid “This function” and “This struct.”
  • Prefer stable domain language over current implementation wiring.
  • Do not restate parameter or field types in prose.
  • Document fields individually only when their units, ownership, valid range, or meaning is not encoded by the field name and type.
  • Use backticks for values and syntax; use intra-doc links for Rust items.
  • Put module-wide invariants in one //! comment instead of repeating them on every item.
  • Keep algorithmic rationale in ordinary // comments near the algorithm, not in the public contract.
  • Do not copy documentation from an implemented trait. Describe Shift-specific adapter semantics on the implementing type or module.
  • Do not use Rustdoc as a TODO list, changelog, ticket, or warning to future maintainers.
  • Do not promise behavior more strongly than tests and implementation support.
Show full SKILL.md (222 more words)Show less

Conventional Sections

Use headings exactly as Rust tooling and readers expect:

rust
/// Writes a TTF compiled from an immutable snapshot of the supplied font.
///
/// The destination is replaced atomically after compilation succeeds.
///
/// # Errors
///
/// Returns [`ExportError`] when the source cannot be represented, compilation
/// fails, or the destination cannot be replaced.
pub fn export(/* ... */) -> Result<FontExportResult, ExportError> {
    // ...
}

For panics, document the actual precondition rather than writing a generic disclaimer:

rust
/// Returns the default source.
///
/// # Panics
///
/// Panics when the font has no default source.

Every unsafe item needs a precise caller obligation:

rust
/// Reads a point from the packed geometry buffer.
///
/// # Safety
///
/// `index` must address a fully initialized point in `buffer`.

Examples are executable contracts, not decoration.

  • Prefer a compiling doctest with assertions.
  • Use hidden # lines for setup when that keeps the lesson focused.
  • Use no_run for filesystem or process examples; avoid ignore unless the example fundamentally cannot compile in docs.
  • Keep one concept per example and omit examples for trivial accessors.
  • Run doc tests after adding an example.

Use links that Rustdoc can resolve:

rust
/// Creates the snapshot consumed by [`FontExporter::export`].
///
/// See [`FontView`] for the borrowed authoring interface.

Validation

After editing Rustdoc:

  1. Run cargo fmt --all -- --check.
  2. Run the affected crate's tests, including doc tests when examples changed.
  3. Run RUSTDOCFLAGS="-D rustdoc::broken_intra_doc_links" cargo doc --workspace --no-deps --document-private-items for new or changed links.
  4. Run Clippy for affected crates when documentation changes accompany Rust code changes.

Do not enable workspace-wide missing_docs as part of an unrelated change. Introduce lint policy separately after auditing the existing baseline.

Checklist

  • The first sentence states a useful contract.
  • The comment adds information not already encoded by the signature.
  • Units, coordinate spaces, ownership, sparse behavior, and effects are explicit where relevant.
  • Every documented failure, panic, and safety obligation matches reality.
  • Intra-doc links resolve and examples compile.
  • No caller name-drops, implementation history, TODOs, or duplicated trait docs.

© shift-editor, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .codex/skills/rustdoc of shift-editor/shift.

Open the folder on GitHubat commit e7dacfa

Compare with similar skills

Rustdoc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rustdoc compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rustdoc this skillshift-editor/shift343—~1.6kAutomated safety check: PassApache-2.0
Update V8 Versionopeninterpreter/openinterpreter69k2 repos~845Automated safety check: PassApache-2.0
Firecrawl Page Scrape Integrationfirecrawl/firecrawl189k1 repos~944Automated safety check: PassISC
Migrate Core Code to Submodulestinyhumansai/openhuman41k—~2.6kAutomated safety check: PassGPL-3.0
Rust TDD Workflowrtk-ai/rtk83k—~753Automated safety check: NotesApache-2.0
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Update V8 Version

    openinterpreter/openinterpreter

    Bumps the pinned v8 and rusty_v8 versions in Codex, validates the release-candidate path with the v8-canary check, and traces failures to upstream build changes.

    69k GitHub starsUsed in 2 repos~845 tokens
    DevOps & CloudAuto-check passed
  • Adds Firecrawl's /scrape endpoint to application code to pull markdown, HTML, links, screenshots or structured data from a single known URL.

    189k GitHub starsUsed in 1 repo~944 tokens
    Data & AnalyticsAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    41k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Enforces red-green-refactor for Rust work, with idiomatic test patterns, a naming convention and a pre-commit gate of cargo fmt, clippy and test.

    83k GitHub stars~753 tokensUpdated today
    Testing & QAAuto-check: notes
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.

    23k GitHub stars~2.5k tokensUpdated 3 days ago
    DevelopmentAuto-check: notes

More from shift-editor/shift

All 14 skills in this repo
  • Shift Commit Rules

    shift-editor/shift

    Rules for writing git commits in the Shift font editor repo: Conventional Commits subjects, user-facing changelog wording, concise subjects and logical commit boundaries.

    343 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check: notes
  • Dead Code Removal with Knip

    shift-editor/shift

    Finds unused files, exports and class members with Knip, then verifies each candidate through reference tracing before removing anything, never using knip --fix.

    343 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Shift Subsystem Docs

    shift-editor/shift

    Updates or creates DOCS.md files for Shift subsystems, recording the architecture invariants and constraints that cannot be learned from reading the source.

    343 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Adversarial Docs Audit

    shift-editor/shift

    Fact-checks DOCS.md files against the source code, testing each concrete claim and sorting it as true, false, stale or unverifiable.

    343 GitHub stars~818 tokensUpdated yesterday
    Auto-check passed
  • Shift Issue Writer

    shift-editor/shift

    Sets the rules for finding, writing and updating Shift GitHub issues: search for duplicates first, use outcome-focused titles and testable acceptance criteria.

    343 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Shift JSDoc Contracts

    shift-editor/shift

    Guides writing JSDoc for Shift exported APIs as a stable caller contract, covering ownership, lifetime, side effects and nullability that TypeScript types cannot express.

    343 GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Rustdoc

What does Rustdoc do?

Add or revise source-level Rustdoc for Shift Rust APIs. An agent skill from shift-editor/shift. Rustdoc is an agent skill from shift-editor/shift. Add or revise source-level Rustdoc for Shift Rust APIs.

How do I install Rustdoc in Claude Code?

Run `npx skills add shift-editor/shift --skill rustdoc -a claude-code`. Or copy the skill folder (.codex/skills/rustdoc in shift-editor/shift) into .claude/skills/rustdoc in your project. Claude Code loads it when a task matches its description.

How do I install Rustdoc in Codex?

Run `npx skills add shift-editor/shift --skill rustdoc -a codex`. Or copy the skill folder (.codex/skills/rustdoc in shift-editor/shift) into .agents/skills/rustdoc in your project. Codex loads it when a task matches its description.

Can I use Rustdoc in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add shift-editor/shift --skill rustdoc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rustdoc, .gemini/skills/rustdoc, .github/skills/rustdoc and .opencode/skills/rustdoc in your project.

What does Rustdoc need to run?

Going by SKILL.md and its folder, Rustdoc needs the command-line tools its instructions call (cargo).

Does Rustdoc access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Rustdoc safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rustdoc use?

Rustdoc is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rustdoc use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rustdoc?

Skills that share tags, products or a category with Rustdoc: Update V8 Version (openinterpreter/openinterpreter, 69k stars), Firecrawl Page Scrape Integration (firecrawl/firecrawl, 189k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 41k stars) and Rust TDD Workflow (rtk-ai/rtk, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rustdoc?

shift-editor (a GitHub organization) maintains it in shift-editor/shift, which has 343 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 6, 2026.

Source: shift-editor/shift on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.