Diagram First

by mzbac

artcode

Diagram-first explanations using ASCII visualizations (sequence diagrams, flowcharts, component maps) to explain code, systems, request/response flows, pipelines, concurrency, and comparisons. Use when the user asks to "draw an ASCII diagram", "show the flow/logic", "visualize the architecture", "explain how it works", or when a diagram would reduce ambiguity in a technical explanation.

Skill Details

Repository Files

1 file in this skill directory


name: diagram-first description: Diagram-first explanations using ASCII visualizations (sequence diagrams, flowcharts, component maps) to explain code, systems, request/response flows, pipelines, concurrency, and comparisons. Use when the user asks to "draw an ASCII diagram", "show the flow/logic", "visualize the architecture", "explain how it works", or when a diagram would reduce ambiguity in a technical explanation.

Diagram First

Overview

Answer questions with a short ASCII diagram first, then a concise explanation. Prefer visual structure over prose when describing flows, architecture, or logic.

Default Output Pattern

  1. Diagram first (in a code block for alignment).
  2. Legend (1–3 bullets, only if needed).
  3. Explanation (map diagram nodes/edges to the user’s question; cite key files/functions if relevant).
  4. Next check (optional: one quick validation step or a clarifying question).

Choose a Diagram Type

Use the smallest diagram that answers the question:

  • Flowchart: branching logic, error paths, validation, “what happens when…”.
  • Sequence diagram: request/response, streaming, callbacks, cancellation, distributed coordination.
  • Component diagram: modules/services and their responsibilities.
  • Pipeline diagram: stage-by-stage compute (tokenization → forward → sampling → decode), incl. distributed ranks.
  • State machine: lifecycle of a request, streaming states, tool-call modes.
  • Side-by-side: comparisons (“left vs right”, “old vs new”, “A vs B”) using two columns.

Diagram Templates

Sequence (streaming / HTTP)

Client -> HTTP Handler (rank0) -> (broadcast request) -> All Ranks: generate loop
Client <- HTTP Handler (rank0) <- (stream tokens/chunks) <- rank0 only

Flowchart (validation / routing)

request
  |
  v
parse -> validate -> route -> run -> shape response -> send
                 \-> error -> JSON error

Component map (codebase)

api/ (HTTP schemas + shaping) -> model_provider (load) -> tool_fixes (normalize) -> mlx_lm (generate)

Side-by-side compare

LEFT (A)                        RIGHT (B)
---------                       ---------
...                             ...

Practical Rules

  • Keep diagrams tight: ~10–30 lines; add a second diagram only if it reduces confusion.
  • Include the happy path; add the most important failure/cancel path if relevant.
  • Use stable labels (same node name = same thing) and avoid vague boxes (“stuff happens”).
  • If you need to assume something, label it clearly in-diagram (e.g., “(assumption)”) and ask a clarifying question.
  • Don’t leak secrets/PII in diagrams unless the user already provided it and asked to include it.

Related Skills

Team Composition Analysis

This skill should be used when the user asks to "plan team structure", "determine hiring needs", "design org chart", "calculate compensation", "plan equity allocation", or requests organizational design and headcount planning for a startup.

artdesign

Startup Financial Modeling

This skill should be used when the user asks to "create financial projections", "build a financial model", "forecast revenue", "calculate burn rate", "estimate runway", "model cash flow", or requests 3-5 year financial planning for a startup.

art

Startup Metrics Framework

This skill should be used when the user asks about "key startup metrics", "SaaS metrics", "CAC and LTV", "unit economics", "burn multiple", "rule of 40", "marketplace metrics", or requests guidance on tracking and optimizing business performance metrics.

art

Market Sizing Analysis

This skill should be used when the user asks to "calculate TAM", "determine SAM", "estimate SOM", "size the market", "calculate market opportunity", "what's the total addressable market", or requests market sizing analysis for a startup or business opportunity.

art

Anndata

This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling large-scale biological datasets. Use when tasks involve AnnData objects, h5ad files, single-cell RNA-seq data, or integration with scanpy/scverse tools.

arttooldata

Geopandas

Python library for working with geospatial vector data including shapefiles, GeoJSON, and GeoPackage files. Use when working with geographic data for spatial analysis, geometric operations, coordinate transformations, spatial joins, overlay operations, choropleth mapping, or any task involving reading/writing/analyzing vector geographic data. Supports PostGIS databases, interactive maps, and integration with matplotlib/folium/cartopy. Use for tasks like buffer analysis, spatial joins between dat

artdatacli

Market Research Reports

Generate comprehensive market research reports (50+ pages) in the style of top consulting firms (McKinsey, BCG, Gartner). Features professional LaTeX formatting, extensive visual generation with scientific-schematics and generate-image, deep integration with research-lookup for data gathering, and multi-framework strategic analysis including Porter's Five Forces, PESTLE, SWOT, TAM/SAM/SOM, and BCG Matrix.

artdata

Plotly

Interactive scientific and statistical data visualization library for Python. Use when creating charts, plots, or visualizations including scatter plots, line charts, bar charts, heatmaps, 3D plots, geographic maps, statistical distributions, financial charts, and dashboards. Supports both quick visualizations (Plotly Express) and fine-grained customization (graph objects). Outputs interactive HTML or static images (PNG, PDF, SVG).

artdata

Excel Analysis

Analyze Excel spreadsheets, create pivot tables, generate charts, and perform data analysis. Use when analyzing Excel files, spreadsheets, tabular data, or .xlsx files.

artdata

Neurokit2

Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.

arttooldata

Skill Information

Category:Creative
Last Updated:1/10/2026