Diagram Gen

by DennisToma

codedocument

Generate architecture, sequence, state, and ERD diagrams for code understanding. Use when user wants to visualize code structure or document systems.

Skill Details

Repository Files

2 files in this skill directory


name: diagram-gen description: Generate architecture, sequence, state, and ERD diagrams for code understanding. Use when user wants to visualize code structure or document systems. allowed-tools: "Read,Grep,Glob,Write" version: 1.0.0

Diagram Generator

Generate Mermaid diagrams to understand and document code.

Diagram Types

Type Best For
Architecture System overview, onboarding
Sequence Request flows, workflows
State Machine Object lifecycle
ERD Database structure
Flowchart Algorithm logic
Class OOP structure

Instructions

  1. Scope - What specific part needs visualization?
  2. Gather - Read entry points, key functions, data models
  3. Generate - Use Mermaid syntax (see {baseDir}/references/mermaid-templates.md)
  4. Save - Write to docs/diagrams/[name].md

Output Format

# [Name] Diagram

[1-2 sentence description]

\`\`\`mermaid
[diagram]
\`\`\`

| Component | Purpose |
|-----------|---------|
| [Name] | [Role] |

Guidelines

  • Focus on one aspect per diagram
  • Match names to actual code
  • Show happy path; add errors only if relevant
  • Link to source files when helpful

Resources

Templates: {baseDir}/references/mermaid-templates.md

Related Skills

Dbt Transformation Patterns

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

testingdocumenttool

Clinical Decision Support

Generate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug develo

developmentdocumentcli

Scientific Schematics

Create publication-quality scientific diagrams using Nano Banana Pro AI with smart iterative refinement. Uses Gemini 3 Pro for quality review. Only regenerates if quality is below threshold for your document type. Specialized in neural network architectures, system diagrams, flowcharts, biological pathways, and complex scientific visualizations.

artdocument

Mermaid Diagrams

Comprehensive guide for creating software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams (domain modeling, object-oriented design), sequence diagrams (application flows, API interactions, code execution), flowcharts (processes, algorithms, user journeys), entity relationship diagrams (database schemas), C4 architecture diagrams (system context, containers, components), state diagrams, git graphs, pie charts,

artdesigncode

Diagram Generation

Mermaid diagram generation for architecture visualization, data flow diagrams, and component relationships. Use for documentation, PR descriptions, and architectural analysis.

documentdata

Matlab

MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing. Use when writing MATLAB/Octave scripts for linear algebra, signal processing, image processing, differential equations, optimization, statistics, or creating scientific visualizations. Also use when the user needs help with MATLAB syntax, functions, or wants to convert between MATLAB and Python code. Scripts can be executed with MATLAB or the open-source GNU Octave interpreter

codedata

Dask

Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.

codeworkflow

Scientific Schematics

Create publication-quality scientific diagrams using Nano Banana Pro AI with smart iterative refinement. Uses Gemini 3 Pro for quality review. Only regenerates if quality is below threshold for your document type. Specialized in neural network architectures, system diagrams, flowcharts, biological pathways, and complex scientific visualizations.

artdocument

Clinical Decision Support

Generate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug develo

developmentdocumentcli

Materialize Docs

Materialize documentation for SQL syntax, data ingestion, concepts, and best practices. Use when users ask about Materialize queries, sources, sinks, views, or clusters.

documentdata

Skill Information

Category:Technical
Version:1.0.0
Allowed Tools:Read,Grep,Glob,Write
Last Updated:12/18/2025