Agent skill
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.
Stars
163
Forks
31
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/exploring-rust-crates
Metadata
Additional technical details for this skill
- triggers
-
{ "type": "domain", "keywords": [ "cargo doc", "rust documentation", "crate api", "rust crate", "module hierarchy" ], "priority": "medium", "enforcement": "suggest", "intent-patterns": [ "\\b(explore|understand|learn)\\b.*?\\b(rust|crate|package)\\b", "\\b(what|how)\\b.*?\\b(functions|types|traits|api)\\b.*?\\bcrate\\b", "\\bdocument(ation)?\\b.*?\\brust\\b" ] }
SKILL.md
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
bash
cargo doc --no-deps --all-features --package <package-name>
For the Entire Workspace
bash
cargo doc --no-deps --all-features --workspace
Key Flags
--no-deps: Document local code only (faster, less noise)--all-features: Include all feature-gated APIs--package <name>: Target a specific crate--workspace: Document all crates in the workspace--document-private-items: Include internal implementation details
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:
txt
target/doc/<crate_name>/index.html
Tips
- Generate docs before diving into unfamiliar Rust code
- Cross-reference
# Errorssections for error handling patterns - Look for
# Examplessections for idiomatic usage patterns
Didn't find tool you were looking for?