← ClaudeAtlas

class-diagramlisted

Generate class diagrams showing classes, interfaces, inheritance, and composition
athola/claude-night-market · ★ 350 · AI & Automation · score 89
Install: claude install-skill athola/claude-night-market
# Class Diagram Generate a Mermaid class diagram showing types, their relationships, and public interfaces from a codebase. ## When To Use - Understanding class hierarchies and inheritance - Documenting public APIs of a module - Analyzing composition vs. inheritance patterns - Answering "what types exist and how do they relate?" ## Workflow ### Step 1: Explore the Codebase Dispatch the codebase explorer agent: ``` Agent(cartograph:codebase-explorer) Prompt: Explore [scope] and return a structural model. Focus on classes, dataclasses, protocols, type aliases, inheritance, and composition for a class diagram. Extract: class names, methods (public only), attributes, parent classes, and composed types. ``` ### Step 2: Generate Mermaid Syntax Transform the structural model into a Mermaid class diagram. **Rules for class diagrams**: - Use `classDiagram` diagram type - Show only public methods and key attributes - Use Mermaid relationship notation: - `<|--` for inheritance - `*--` for composition - `o--` for aggregation - `..>` for dependency/usage - Add stereotypes for special types: - `<<protocol>>` for Python protocols/interfaces - `<<dataclass>>` for dataclasses - `<<enum>>` for enums - `<<abstract>>` for abstract classes - Limit to 12-15 classes maximum - Group related classes with `namespace` - Omit private methods and dunder methods - Show return types for methods **Example output**: ```mermaid classDiagram class ResumeSession { +Path