/cartograph:class-diagramfrom cartograph
Generates Mermaid class diagrams from codebases to visualize types, inheritance, and composition. Useful for understanding class hierarchies and documenting module public APIs.
Ships in cartograph. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate a Mermaid class diagram showing types, their relationships, and public interfaces from a codebase.
cartograph:dependency-graph)cartograph:data-flow)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.
Transform the structural model into a Mermaid class diagram.
Rules for class diagrams:
classDiagram diagram type<|-- for inheritance*-- for compositiono-- for aggregation..> for dependency/usage<<protocol>> for Python protocols/interfaces<<dataclass>> for dataclasses<<enum>> for enums<<abstract>> for abstract classesnamespaceExample 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 ..> ResumeError
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).
Show the rendered diagram with analysis notes:
classDiagram syntax generated with at least one class
definition including public methods or attributesmcp__claude_ai_Mermaid_Chart__validate_and_render_mermaid_diagram
called with diagramType: "classDiagram" and returns without error__init__, __repr__, etc.)
are absent from the generated diagramWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub athola/claude-night-market --plugin cartograph7 skills in this plugin
/architecture-diagramGenerates a Mermaid architecture diagram showing high-level component relationships. Use when visualizing how plugins or modules fit together./call-chainTraces execution paths through the code graph with criticality scoring and Mermaid charts. Use when understanding how a function propagates through the system./code-communitiesDetects architectural clusters and coupling boundaries via community detection on the code graph. Use when identifying module groupings or refactoring targets./data-flowGenerates a Mermaid sequence diagram showing how data moves between components. Use when tracing request flows or documenting data transformation pipelines./dependency-graphGenerates a Mermaid dependency graph showing import relationships between modules. Use when analyzing coupling, finding circular deps, or planning refactors./workflow-diagramGenerates a Mermaid workflow diagram showing process steps, decisions, and state transitions. Use when documenting CI/CD pipelines or lifecycle processes.Other plugins' skills for the same job