
Class Diagram
- 81 installs
- 325 repo stars
- Updated August 2, 2026
- athola/claude-night-market
Turn a messy module into a Mermaid class diagram that shows public types, inheritance, and composition for docs or onboarding.
About
class-diagram is an agent skill from the Claude Night Market cartograph family that produces Mermaid class diagrams from a structural model of your codebase. Solo builders use it when they need to see how types relate—inheritance versus composition—without manually drawing every public method. The workflow is deliberate: first a codebase-explorer agent returns classes, protocols, parents, and composed types for a scoped area, then you transform that model into valid Mermaid with stereotypes and relationship arrows. It fits backend and full-stack modules where onboarding, design reviews, or README updates need a single visual truth. Because it limits to roughly a dozen classes, it works best for one package or feature slice rather than an entire monorepo at once.
- Two-step workflow: dispatch codebase explorer, then generate Mermaid classDiagram syntax
- Relationship notation for inheritance, composition, aggregation, and dependency
- Stereotypes for protocol, dataclass, enum, and abstract types
- Caps diagram at 12–15 classes for readable module-level views
- Focuses on public methods and key attributes only
Class Diagram by the numbers
- 81 all-time installs (skills.sh)
- Ranked #690 of 1,879 Documentation skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/athola/claude-night-market --skill class-diagramAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 81 |
|---|---|
| repo stars | ★ 325 |
| Security audit | 3 / 3 scanners passed |
| Last updated | August 2, 2026 |
| Repository | athola/claude-night-market ↗ |
What it does
Turn a messy module into a Mermaid class diagram that shows public types, inheritance, and composition for docs or onboarding.
Files
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
classDiagramdiagram type - Show only public methods and key attributes
- Use Mermaid relationship notation:
<|--for inheritance*--for compositiono--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:
classDiagram
class ResumeSession {
+Path config_path
+dict data
+load() ResumeSession
+to_pdf(Path) Path
+to_html(Path) Path
}
class ResumeError {
<<abstract>>
+str message
+str context
}
class ValidationError {
+list~str~ fields
}
class RenderError {
+str template
}
ResumeError <|-- ValidationError
ResumeError <|-- RenderError
ResumeSession ..> ResumeErrorStep 3: Render via MCP
Call the Mermaid Chart MCP to render:
mcp__claude_ai_Mermaid_Chart__validate_and_render_mermaid_diagram
prompt: "Class diagram of [scope]"
mermaidCode: [generated syntax]
diagramType: "classDiagram"
clientName: "claude-code"If rendering fails, fix syntax and retry (max 2 retries).
Step 4: Present Results
Show the rendered diagram with analysis notes:
- Total classes and relationship count
- Key inheritance hierarchies identified
- Composition patterns noted
Exit Criteria
- [ ] Mermaid
classDiagramsyntax generated with at least one class
definition including public methods or attributes
- [ ]
mcp__claude_ai_Mermaid_Chart__validate_and_render_mermaid_diagram
called with diagramType: "classDiagram" and returns without error
- [ ] Analysis notes include total class count, identified inheritance
hierarchies, and composition patterns
- [ ] Private methods and dunder methods (
__init__,__repr__, etc.)
are absent from the generated diagram
- [ ] Diagram contains at most 15 classes; if more exist in scope,
aggregation is applied and noted
Related skills
FAQ
Is Class Diagram safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.