Hash exploring-rust-crates
Generate Rust documentation to understand crate APIs, structure, and usage. Use when exploring Rust code, understanding crate organization, finding functions/types/traits, or needing context about a Rust package in the HASH workspace.
install
source · Clone the upstream repo
git clone https://github.com/hashintel/hash
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/hashintel/hash "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/exploring-rust-crates" ~/.claude/skills/hashintel-hash-exploring-rust-crates && rm -rf "$T"
manifest:
.claude/skills/exploring-rust-crates/SKILL.mdsource content
Exploring Rust Crates
Generate and use Rust documentation to understand crate APIs, structure, and code organization in the HASH workspace.
Generating Documentation
For a Specific Package
cargo doc --no-deps --all-features --package <package-name>
For the Entire Workspace
cargo doc --no-deps --all-features --workspace
Key Flags
: Document local code only (faster, less noise)--no-deps
: Include all feature-gated APIs--all-features
: Target a specific crate--package <name>
: Document all crates in the workspace--workspace
: Include internal implementation details--document-private-items
What Generated Docs Provide
- Crate organization - Module hierarchy and component relationships
- Public API surface - All public functions, types, traits, and constants
- Usage examples - Code examples from doctest blocks
- Error documentation - Documented error conditions and handling
- Type relationships - Trait implementations, type aliases, associated types
Viewing Documentation
Docs are generated at:
target/doc/<crate_name>/index.html
Tips
- Generate docs before diving into unfamiliar Rust code
- Cross-reference
sections for error handling patterns# Errors - Look for
sections for idiomatic usage patterns# Examples