rust-uml

Translate Rust source code into Mermaid UML class diagrams.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/jamieadams-nerd/umrs-project --skill rust-uml
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-uml
Source: https://github.com/jamieadams-nerd/umrs-project/tree/main/.claude/skills/rust-uml
Command: npx skills add https://github.com/jamieadams-nerd/umrs-project --skill rust-uml

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates generating Mermaid UML class diagrams directly from Rust source code, turning type definitions, traits, enums, and impl blocks into standard, readable diagrams that document architecture and relationships.

Core Features & Use Cases

  • Generate class diagrams that reflect Rust types with accurate visibility, stereotypes, and relationships (ownership, references, and trait impls).
  • Visualize module architectures, type hierarchies, and API compositions to support documentation in docs/modules/devel/, docs/modules/architecture/, and docs/modules/patterns/.
  • Trigger diagrams on natural prompts like draw a diagram of, show the relationships between, UML for this module, or class diagram for a given Rust module.

Quick Start

Provide the Rust module path you want diagrammed and the tool will generate a Mermaid class diagram.

Frequently Asked Questions about rust-uml

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Mermaid class diagrams from Rust source code?

Generating Mermaid class diagrams from Rust source code involves translating type definitions, traits, enums, and impl blocks into standard Mermaid syntax. This process automates the visualization of Rust module architectures and type relationships for documentation.

Can I visualize Rust ownership and trait implementations in a UML diagram?

Yes, visualizing Rust ownership and trait implementations in a UML diagram is supported by mapping relationships like ownership, references, and trait implementations. The tool applies consistent stereotypes for structs, traits, and enums to represent these concepts accurately.

What is the best way to document Rust module architectures and type hierarchies?

Documenting Rust module architectures and type hierarchies is best achieved by generating Mermaid UML class diagrams that reflect type relationships and API composition. This supports documentation in directories like devel, architecture, and patterns.

Does this approach work for creating API diagrams from Rust modules?

Yes, this approach works for creating API diagrams from Rust modules by translating type definitions and impl blocks into Mermaid class diagrams. It visualizes API composition and type relationships with consistent visibility mapping and stereotypes.

How do I trigger a class diagram for a given Rust module using natural language?

You can trigger a class diagram for a Rust module using natural language prompts like draw a diagram of, show the relationships between, UML for this module, or class diagram for a given Rust module, which initiates the translation into Mermaid syntax.

What Rust type stereotypes and visibility mappings are enforced in the generated UML?

The generated UML enforces consistent visibility mapping and applies specific stereotypes for structs, traits, and enums. It maps relationships like ownership, references, and trait implementations to produce valid Mermaid syntax.