rdocx: Command for Claude Code

.claude/commands/study-crate.md

study-crate is a command for Claude Code from tensorbee/rdocx. It costs 14 tokens per session (611 once invoked), scanned A, original, MIT.

A read-only command for learning the structure of one Rust crate before changing it. A crate is a Rust package; the command maps its files, public interfaces, dependencies, module boundaries, and relevant conventions.

In plain words
What is it for?
Use it to inspect a crate's manifest, module tree, public surface, dependants, dependencies, feature settings, and implementation conventions.
Why use it?
It reduces the risk of changing an unfamiliar package in a way that breaks users, violates dependency layering, or exposes an unintended interface.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is tensorbee/rdocx's own configuration. It tells Claude Code how to work on rdocx 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 rdocx configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tensorbee/rdocx. 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/tensorbee/rdocx/main/.claude/commands/study-crate.md
Clone the repo
git clone --depth 1 https://github.com/tensorbee/rdocx

Made for: Claude Code.

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 study-crate

README.md
[![agentmods](https://agentmods.dev/badge/commands/tensorbee/rdocx/study-crate/github.svg)](https://agentmods.dev/commands/tensorbee/rdocx/study-crate)
Your own site
<a href="https://agentmods.dev/commands/tensorbee/rdocx/study-crate"><img src="https://agentmods.dev/badge/commands/tensorbee/rdocx/study-crate/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 study-crate

Your own site · 80×15
<a href="https://agentmods.dev/commands/tensorbee/rdocx/study-crate"><img src="https://agentmods.dev/badge/commands/tensorbee/rdocx/study-crate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 611 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.00014 $0.00611
Opus 5.5 $0.00006 $0.00244
Sonnet 5.5 $0.00003 $0.00122
Haiku 4.5 $0.00001 $0.00061

Measured 26d ago against content hash 13ab16f60a8b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

study-crate 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 26d 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.

.claude/commands/study-crate.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/study-crate

Produce a map of a crate: what it owns, what it depends on, where its seams are, and where its traps are. Read-only.

Use before the first story that touches an unfamiliar crate, or before an XL story that will be split.

Steps

  1. The manifest. Dependencies, features and their defaults, and anything unusual: a narrowed feature set, an include, a publish = false. The root Cargo.toml carries comments explaining why several feature sets are minimal. Read them rather than regenerating the reasoning.

  2. The module tree. Every file with a one-line purpose and a line count. The line counts matter, because they say where the weight is.

  3. The public surface. Everything re-exported from lib.rs. Then, separately, types that leak: public function signatures naming a type from another crate that this crate does not re-export. rdocx has several, and they turn an apparently internal change into a breaking one.

  4. The dependency position. What depends on this crate, and what it depends on. Confirm it respects the layering rule in docs/hld/03-architecture.md.

  5. The conventions in force. How this crate parses and serialises, how it names things, how it handles errors, whether it captures raw XML. New code matches the file it sits in.

  6. The traps. Anything a newcomer would get wrong:

    • Behaviour that is deliberately wrong, listed in CLAUDE.md.
    • Invariants held by convention rather than by the type system.
    • Ordering requirements, such as OOXML xsd:sequence.
    • Anything whose change moves the hash harness.
  7. The tests. Where they live, what they cover, and what they do not. The gap is usually more useful than the coverage.

  8. Report as a map. Do not paste large code blocks. Cite path:line and let the reader open it.

Report shape

# <crate>

**Purpose**: one sentence.
**Position**: depends on X, Y. Depended on by A, B.
**Size**: N files, N lines.

## Modules
| File | Lines | Purpose |

## Public surface
What is exported. What leaks and from where.

## Conventions
How this crate does things.

## Traps
Each with a path:line and why it bites.

## Test coverage
What is covered. **What is not.**

Read the full file on GitHub · 76 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. 26d ago First seen · 76 lines · 14 tokens per session scan A 13ab16f60a8b

Subscribe to this mod's changes

study-crate is a command published in the GitHub repository tensorbee/rdocx (44 stars, last pushed yesterday), licensed MIT. It adds 14 tokens to every session and 611 once invoked, about $0.0001 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-10-04.