agentleFS
SamuelNDCESamuelNDCE/claude-super-skill-library/skills/misc-utilities/fireworks-tech-graph/SKILL.md

fireworks-tech-graph

Skill1 starsChanged 4 months agoMITView on GitHub

生成技术图(架构图、流程图、序列图、Agent/记忆架构、思维导图等),输出 SVG+PNG。触发词:"画图" "帮我画" "生成图" "做个图" "架构图" "流程图" "可视化一下" "出图" "generate diagram" "draw diagram" "visualize" 或任何需要可视化的系统/流程描述。

9 other projects use a version of this, 6 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

37 rules. 6 are common, 19 are distinctive, and 12 are very specific to this project.

  • 6

    Common

    Most of the 9 edited versions we read keep these.

  • 19

    Distinctive

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Use scripts when generating complex SVGs to avoid syntax errors

    line 41
  2. Distinctive:

    When you need full control over SVG structure

    line 48
  3. Very specific:

    Validate: Run rsvg-convert file.svg -o NUL 2>&1 to check syntax (Windows: NUL, Git Bash: /dev/null)

    line 59
  4. Very specific:

    Use <rect> dashed containers to group related services in the same layer

    line 68
  5. Very specific:

    Use wider arrows (stroke-width: 2.5) for primary data paths

    line 75
  6. Common:

    Keep node labels short (≤3 words).

    line 83
  7. Common:

    Use cyclic arrows (loop arcs) to show iterative reasoning.

    line 94
  8. Common:

    Use stacked rects or layered cylinders for storage tiers

    line 101
  9. Very specific:

    Use curved <path> with cubic bezier for branches, not straight lines

    line 131
  10. Common:

    Keep names verb phrases: "Create Order", "Process Payment"

    line 157
  11. Distinctive:

    Always assign arrow meaning, not just color:

    line 260
  12. Common:

    Always include a legend when 2+ arrow types are used.

    line 272
  13. Very specific:

    Grouping: Use <rect> with dashed stroke + semi-transparent fill + small label in top-left to visually group related nodes.

    line 278
  14. Distinctive:

    Never overlap with nodes (maintain 10px safety distance)

    line 298
  15. Distinctive:

    When multiple arrows converge, stagger label vertical positions by 15-20px

    line 299
  16. Distinctive:

    Jump-over arcs: when crossings unavoidable, use small arc (5px radius) at intersection point

    line 305
  17. Very specific:

    All arrows: <marker> with markerEnd, sized markerWidth="10" markerHeight="7"

    line 313
  18. Distinctive:

    Before ANY tool call, verify you have all required parameters ready

    line 322
  19. Distinctive:

    If you encounter a tool error, STOP and analyze the root cause before retrying

    line 323
  20. Very specific:

    Use Write tool with file_path and content parameters

    line 338
  21. Distinctive:

    If Write fails once: switch to Python method immediately

    line 339
  22. Distinctive:

    Verify each append: Check file size increases after each append

    line 360
  23. Very specific:

    Run rsvg-convert file.svg -o NUL 2>&1 (Windows) or rsvg-convert file.svg -o /dev/null 2>&1 (Git Bash/macOS/Linux)

    line 363
  24. Distinctive:

    If error: apply Quick Fix Protocol (see below), retry once

    line 364
  25. Distinctive:

    If still fails: report error to user with line number and stop

    line 365
  26. Distinctive:

    Third error: Stop and report to user - do not loop endlessly

    line 370
  27. Distinctive:

    Before writing SVG, perform quick validation:

    line 374
  28. Distinctive:

    Ensure balance: every opening has a closing

    line 379
  29. Very specific:

    All attribute values must be in quotes: fill="#9dd4c7" not fill=#9dd4c7

    line 382
  30. Very specific:

    If present, replace with &lt;, &gt;, &amp.

    line 387
  31. Distinctive:

    Check before writing arrows section

    line 391
  32. Very specific:

    Always end with </svg> on its own line

    line 394
  33. Very specific:

    When rsvg-convert validation fails, parse error and apply fix:

    line 399
  34. Distinctive:

    If quick fix doesn't resolve, report to user with:

    line 418
  35. Distinctive:

    Not all styles work equally well for every diagram type.

    line 445
  36. Distinctive:

    CRITICAL: All arrow labels MUST have a background rect to prevent overlap with other elements.

    line 612
  37. Distinctive:

    Content: Must include arrow types, node types (if >2 types), color semantics

    line 627

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Fireworks Tech Graph

Generate production-quality SVG technical diagrams exported as PNG via rsvg-convert.

Helper Scripts (Recommended)

Three bash scripts in scripts/ directory provide stable SVG generation and validation:

1. generate-diagram.sh - Generate SVG + PNG

./scripts/generate-diagram.sh <output-name> [width] [height] [output-dir]
  • Generates SVG with predefined template
  • Validates syntax with xmllint
  • Exports PNG at 2x resolution
  • Example: ./scripts/generate-diagram.sh my-arch 960 800

2. validate-svg.sh - Validate SVG syntax

./scripts/validate-svg.sh <svg-file>
  • Checks XML syntax
  • Verifies tag c- Validates marker references
  • Checks attribute completeness
  • Validates path data

3. test-all-styles.sh - Batch test all styles

./scripts/test-all-styles.sh [output-dir]
  • Tests multiple diagram sizes
  • Validates all generated SVGs
  • Generates test report

When to use scripts:

  • Use scripts when generating complex SVGs to avoid syntax errors
  • Scripts provide automatic validation and error reporting
  • Recommended for production diagrams

When to generate SVG directly:

  • Simple diagrams with few elements
  • Quick prototypes
  • When you need full control over SVG structure

Workflow (Always Follow This Order)

  1. Classify the diagram type (see Diagram Types below)
  2. Extract structure — identify layers, nodes, edges, flows, and semantic groups from user description
  3. Plan layout — apply the layout rules for the diagram type
  4. Load style reference — always load references/style-1-flat-icon.md unless user specifies another; load the matching references/style-N.md for exact color tokens and SVG patterns
  5. Map nodes to shapes — use Shape Vocabulary below
  6. Check icon needs — load references/icons.md for known products
  7. Write SVG with adaptive strategy (see SVG Generation Strategy below)
  8. Validate: Run rsvg-convert file.svg -o NUL 2>&1 to check syntax (Windows: NUL, Git Bash: /dev/null)
  9. Export PNG: rsvg-convert -w 1920 file.svg -o file.png
  10. Report output paths

Diagram Types & Layout Rules

Architecture Diagram

Nodes = services/components. Group into horizontal layers (top→bottom or left→right).

  • Typical layers: Client → Gateway/LB → Services → Data/Storage
  • Use <rect> dashed containers to group related services in the same layer
  • Arrow direction follows data/request flow
  • ViewBox: 0 0 960 600 standard, 0 0 960 800 for tall stacks

Data Flow Diagram

Emphasizes what data moves where. Focus on data transformation.

  • Label every arrow with the data type (e.g., "embeddings", "query", "context")
  • Use wider arrows (stroke-width: 2.5) for primary data paths
  • Dashed arrows for control/trigger flows
  • Color arrows by data category (not just Agent/RAG — use semantics)

Flowchart / Process Flow

Sequential decision/process steps.

  • Top-to-bottom preferred; left-to-right for wide flows
  • Diamond shapes for decisions, rounded rects for processes, parallelograms for I/O
  • Keep node labels short (≤3 words); put detail in sub-labels
  • Align nodes on a grid: x positions snap to 120px intervals, y to 80px

Agent Architecture Diagram

Shows how an AI agent reasons, uses tools, and manages memory. Key conceptual layers to always consider:

  • Input layer: User, query, trigger
  • Agent core: LLM, reasoning loop, planner
  • Memory layer: Short-term (context window), Long-term (vector/graph DB), Episodic
  • Tool layer: Tool calls, APIs, search, code execution
  • Output layer: Response, action, side-effects Use cyclic arrows (loop arcs) to show iterative reasoning. Separate memory types visually.

Memory Architecture Diagram (Mem0, MemGPT-style)

Specialized agent diagram focused on memory operations.

  • Show memory write path and read path separately (different arrow colors)
  • Memory tiers: Working Memory → Short-term → Long-term → External Store
  • Label memory operations: store(), retrieve(), forget(), consolidate()
  • Use stacked rects or layered cylinders for storage tiers

Sequence Diagram

Time-ordered message exchanges between participants.

  • Participants as vertical lifelines (top labels + vertical dashed lines)
  • Messages as horizontal arrows between lifelines, top-to-bottom time order
  • Activation boxes (thin filled rects on lifeline) show active processing
  • Group with <rect> loop/alt frames with label in top-left corner
  • ViewBox height = 80 + (num_messages × 50)

Comparison / Feature Matrix

Side-by-side comparison of approaches, systems, or components.

  • Column headers = systems, row headers = attributes
  • Row height: 40px; column width: min 120px; header row height: 50px
  • Checked cell: tinted background (e.g. #dcfce7) + ✓ checkmark; unsupported: #f9fafb fill
  • Alternating row fills (#f9fafb / #ffffff) for readability
  • Max readable columns: 5; beyond that, split into two diagrams

Timeline / Gantt

Horizontal time axis showing durations, phases, and milestones.

  • X-axis = time (weeks/months/quarters); Y-axis = items/tasks/phases
  • Bars: rounded rects, colored by category, labeled inside or beside
  • Milestone markers: diamond or filled circle at specific x position with label above
  • ViewBox: 0 0 960 400 typical; wider for many time periods: 0 0 1200 400

Mind Map / Concept Map

Radial layout from central concept.

  • Central node at cx=480, cy=280
  • First-level branches: evenly distributed around center (360/N degrees)
  • Second-level branches: branch off first-level at 30-45° offset
  • Use curved <path> with cubic bezier for branches, not straight lines

Class Diagram (UML)

Static structure showing classes, attributes, methods, and relationships.

  • Class box: 3-compartment rect (name / attributes / methods), min width 160px
    • Top compartment: class name, bold, centered (abstract = italic)
    • Middle: attributes with visibility (+ public, - private, # protected)
    • Bottom: method signatures, same visibility notation
  • Relationships:
    • Inheritance (extends): solid line + hollow triangle arrowhead, child → parent
    • Implementation (interface): dashed line + hollow triangle, class → interface
    • Association: solid line + open arrowhead, label with multiplicity (1, 0.., 1..)
    • Aggregation: solid line + hollow diamond on container side
    • Composition: solid line + filled diamond on container side
    • Dependency: dashed line + open arrowhead
  • Interface: <<interface>> stereotype above name, or circle/lollipop notation
  • Enum: compartment rect with <<enumeration>> stereotype, values in bottom
  • Layout: parent classes top, children below; interfaces to the left/right of implementors
  • ViewBox: 0 0 960 600 standard; 0 0 960 800 for deep hierarchies

Use Case Diagram (UML)

System functionality from user perspective.

  • Actor: stick figure (circle head + body line) placed outside system boundary
    • Label below figure, 13-14px
    • Primary actors on left, secondary/supporting on right
  • Use case: ellipse with label centered inside, min 140×60px
    • Keep names verb phrases: "Create Order", "Process Payment"
  • System boundary: large rect with dashed border + system name in top-left
  • Relationships:
    • Include: dashed arrow <<include>> from base to included use case
    • Extend: dashed arrow <<extend>> from extension to base use case
    • Generalization: solid line + hollow triangle (specialized → general)
  • Layout: system boundary centered, actors outside, use cases inside
  • ViewBox: 0 0 960 600 standard

State Machine Diagram (UML)

Lifecycle states and transitions of an entity.

  • State: rounded rect with state name, min 120×50px
    • Internal activities: small text entry/ action, exit/ action, do/ activity
    • Initial state: filled black circle (r=8), one outgoing arrow
    • Final state: filled circle (r=8) inside hollow circle (r=12)
    • Choice: small hollow diamond, guard labels on outgoing arrows [condition]
  • Transition: arrow with optional label event [guard] / action
    • Guard conditions in square brackets
    • Actions after /
  • Composite/nested state: larger rect containing sub-states, with name tab
  • Fork/join: thick horizontal or vertical black bar (synchronization)
  • Layout: initial state top-left, final state bottom-right, flow top-to-bottom
  • ViewBox: 0 0 960 600 standard

ER Diagram (Entity-Relationship)

Database schema and data relationships.

  • Entity: rect with entity name in header (bold), attributes below
    • Primary key attribute: underlined
    • Foreign key: italic or marked with (FK)
    • Min width: 160px; attribute font-size: 12px
  • Relationship: diamond shape on connecting line
    • Label inside diamond: "has", "belongs to", "enrolls in"
    • Cardinality labels near entity: 1, N, 0..1, 0..*, 1..*
  • Weak entity: double-bordered rect with double diamond relationship
  • Associative entity: diamond + rect hybrid (rect with diamond inside)
  • Line style: solid for identifying relationships, dashed for non-identifying
  • Layout: entities in 2-3 rows, relationships between related entities
  • ViewBox: 0 0 960 600 standard; wider 0 0 1200 600 for many entities

Network Topology

Physical or logical network infrastructure.

  • Devices: icon-like rects or rounded rects
    • Router: circle with cross arrows
    • Switch: rect with arrow grid
    • Server: stacked rect (rack icon)
    • Firewall: brick-pattern rect or shield shape
    • Load Balancer: horizontal split rect with arrows
    • Cloud: cloud path (overlapping arcs)
  • Connections: lines between device centers
    • Ethernet/wired: solid line, label bandwidth
    • Wireless: dashed line with WiFi symbol
    • VPN: dashed line with lock icon
  • Subnets/Zones: dashed rect containers with zone label (DMZ, Internal, External)
  • Labels: device hostname + IP below, 12-13px
  • Layout: tiered top-to-bottom (Internet → Edge → Core → Access → Endpoints)
  • ViewBox: 0 0 960 600 standard

UML Coverage Map

Full mapping of UML 14 diagram types to supported diagram types:

UML DiagramSupported AsNotes
ClassClass DiagramFull UML notation
ComponentArchitecture DiagramUse colored fills per component type
DeploymentArchitecture DiagramAdd node/instance labels
PackageArchitecture DiagramUse dashed grouping containers
Composite StructureArchitecture DiagramNested rects within components
ObjectClass DiagramInstance boxes with underlined name
Use CaseUse Case DiagramFull actor/ellipse/relationship
ActivityFlowchart / Process FlowAdd fork/join bars
State MachineState Machine DiagramFull UML notation
SequenceSequence DiagramAdd alt/opt/loop frames
Communication—Approximate with Sequence (swap axes)
TimingTimelineAdapt time axis
Interaction OverviewFlowchartCombine activity + sequence fragments
ER DiagramER DiagramChen/Crow's foot notation

Shape Vocabulary

Map semantic concepts to consistent shapes across all diagram types:

ConceptShapeNotes
User / HumanCircle + body pathStick figure or avatar
LLM / ModelRounded rect with brain/spark icon or gradient fillUse accent color
Agent / OrchestratorHexagon or rounded rect with double borderSignals "active controller"
Memory (short-term)Rounded rect, dashed borderEphemeral = dashed
Memory (long-term)Cylinder (database shape)Persistent = solid cylinder
Vector StoreCylinder with grid lines insideAdd 3 horizontal lines
Graph DBCircle cluster (3 overlapping circles)
Tool / FunctionGear-like rect or rect with wrench icon
API / GatewayHexagon (single border)
Queue / StreamHorizontal tube (pipe shape)
File / DocumentFolded-corner rect
Browser / UIRect with 3-dot titlebar
DecisionDiamondFlowcharts only
Process / StepRounded rectStandard box
External ServiceRect with cloud icon or dashed border
Data / ArtifactParallelogramI/O in flowcharts

Arrow Semantics

Always assign arrow meaning, not just color:

Flow TypeColorStrokeDashMeaning
Primary data flowblue #2563eb2px solidnoneMain request/response path
Control / triggerorange #ea580c1.5px solidnoneOne system triggering another
Memory readgreen #0596691.5px solidnoneRetrieval from store
Memory writegreen #0596691.5px5,3Write/store operation
Async / eventgray #6b72801.5px4,2Non-blocking, event-driven
Embedding / transformpurple #7c3aed1px solidnoneData transformation
Feedback / looppurple #7c3aed1.5px curvednoneIterative reasoning loop

Always include a legend when 2+ arrow types are used.

Layout Principles

Alignment: Snap node centers to 8px base grid. Horizontal: 120px intervals. Vertical: 120px intervals (consistent layer spacing).

Grouping: Use <rect> with dashed stroke + semi-transparent fill + small label in top-left to visually group related nodes. Don't group more than 5-6 nodes in one box.

Layering: For complex diagrams, divide into named swim-lanes with subtle background fills.

Spacing:

  • Same-layer nodes: 80px horizontal spacing (consistent)
  • Between layers: 120px vertical spacing (consistent)
  • Canvas margins: 40px minimum on all sides
  • Minimum 60px between node edges

Visual Hierarchy:

  • Core/primary nodes: 20-30% larger than standard, double border or 3-4px stroke
  • Secondary nodes: Standard size, 2-2.5px stroke
  • Tertiary nodes: Standard size, 1.5-2px stroke
  • Color hierarchy: Core = high saturation, Secondary = medium saturation, Tertiary = low saturation/grayscale

Labels on arrows:

  • Short (≤3 words), placed mid-arrow
  • MUST have background rect: <rect> with fill matching canvas background, placed behind text
  • Background rect padding: 4px horizontal, 2px vertical
  • Never overlap with nodes (maintain 10px safety distance)
  • When multiple arrows converge, stagger label vertical positions by 15-20px

Arrow Routing:

  • Prefer orthogonal routing: vertical then horizontal segments to minimize crossings
  • Layer-based routing: different semantic flows use different "channels" (y-offsets)
  • Crossing minimization: route arrows around dense node clusters
  • Jump-over arcs: when crossings unavoidable, use small arc (5px radius) at intersection point

SVG Technical Rules

  • ViewBox: 0 0 960 600 default; 0 0 960 800 tall; 0 0 1200 600 wide
  • Fonts: embed via <style>font-family: ...</style> — no external @import (breaks rsvg-convert)
  • <defs>: arrow markers, gradients, filters, clip paths
  • Text: minimum 12px, prefer 13-14px labels, 11px sub-labels, 16-18px titles
  • All arrows: <marker> with markerEnd, sized markerWidth="10" markerHeight="7"
  • Drop shadows: <feDropShadow> in <filter>, apply sparingly (key nodes only)
  • Curved paths: use M x1,y1 C cx1,cy1 cx2,cy2 x2,y2 cubic bezier for loops/feedback arrows
  • Clip content: use <clipPath> if text might overflow a node box

SVG Generation Strategy

CRITICAL: Tool Call Discipline

  • NEVER call a tool without all required parameters - this is the #1 cause of error loops
  • Before ANY tool call, verify you have all required parameters ready
  • If you encounter a tool error, STOP and analyze the root cause before retrying
  • Max 2 retries for the same approach - if it fails twice, switch methods immediately

**Step 1: Estimate complexitnt nodes: N

  • Count arrows: A
  • Estimated SVG lines: L = 50 (header) + N×15 + A×3 + 20 (legend)

Step 2: Choose generation method

  • If L < 150: Direct Write tool (single call, most reliable)
  • If 150 ≤ L < 300: Python script via Bash (avoids heredoc issues)
  • If L ≥ 300: Chunked generation with Write + multiple appends

Step 3A: Direct generation (L < 150)

  1. Generate complete SVG content as string variable
  2. Self-check before writing (see SVG Self-Check Rules below)
  3. Use Write tool with file_path and content parameters
  4. If Write fails once: switch to Python method immediately

Step 3B: Python script method (150 ≤ L < 300) - RECOMMENDED

python << 'EOF'
svg_content = '''<svg xmlns="http://www.w3.org/2000/svg">
...complete SVG here...
</svg>'''

with open('output.svg', 'w', encoding='utf-8') as f:
    f.write(svg_content)
print("Generated output.svg")
EOF
  • Advantage: Avoids Bash heredoc truncation/corruption issues
  • Triple quotes: Handles complex SVG content reliably
  • No escaping needed: Python handles quotes and special chars correctly
  1. Chunk 1: Header (defs, style, background) → Write to file
  2. Chunk 2-N: Content sections → Append with echo '...' >> file.svg
  3. Final chunk: Legend + </svg> closing tag → Append
  4. Each chunk max 80 lines to avoid truncation
  5. Verify each append: Check file size increases after each append

Step 4: Validation

  • Run rsvg-convert file.svg -o NUL 2>&1 (Windows) or rsvg-convert file.svg -o /dev/null 2>&1 (Git Bash/macOS/Linux)
  • If error: apply Quick Fix Protocol (see below), retry once
  • If still fails: report error to user with line number and stop

Error Recovery Protocol

  1. First error: Analyze root cause, apply targeted fix
  2. Second error (same type): Switch generation method entirely
  3. Third error: Stop and report to user - do not loop endlessly

SVG Self-Check Rules

Before writing SVG, perform quick validation:

Rule 1: Tag Balance

  • Count opening tags: <rect, <text, <line, <path, <circle
  • Count closing: /> self-closing + </rect>, </text>, etc.
  • Ensure balance: every opening has a closing

Rule 2: Quote Check

  • All attribute values must be in quotes: fill="#9dd4c7" not fill=#9dd4c7
  • Check pattern: \w+=["'][^"']*["']

Rule 3: Special Characters

  • Text content must not contain unescaped <, >, &
  • If present, replace with &lt;, &gt;, &amp;

Rule 4: Marker References

  • All marker-end="url(#xxx)" must have matching <marker id="xxx"> in defs
  • Check before writing arrows section

Rule 5: Closing Tag

  • Always end with </svg> on its own line
  • In chunked generation, include in final chunk

Quick Fix Protocol

When rsvg-convert validation fails, parse error and apply fix:

Error: "Extra content at the end of the document"

  • Cause: Missing </svg> closing tag
  • Fix: echo '</svg>' >> file.svg

Error: "Couldn't find end of Start Tag" (line N)

  • Cause: Truncated attribute value
  • Fix: Read line N, identify incomplete attribute, use Edit tool to complete it

Error: "Invalid character" (line N)

  • Cause: Unescaped <, >, or & in text
  • Fix: Read line N, replace with HTML entities using Edit tool

Error: "Undefined marker" or "Failed to "

  • Cause: marker-end="url(#arrow-xxx)" but no <marker id="arrow-xxx"> in defs
  • Fix: Add missing marker definition to defs section

Max retry: 1 time per error

  • If quick fix doesn't resolve, report to user with:
    • Full error message
    • Line number
    • Suggested manual fix

Output

  • Default: ./[derived-name].svg and ./[derived-name].png in current directory
  • Custom: user specifies path with --output /path/ or 输出到 /path/
  • PNG export: rsvg-convert -w 1920 file.svg -o file.png (1920px = 2x retina)

Styles

#NameBackgroundBest For
1Flat Icon (default)WhiteBlogs, docs, presentations
2Dark Terminal#0f0f1aGitHub, dev articles
3Blueprint#0a1628Architecture docs
4Notion CleanWhite, minimalNotion, Confluence, Wiki
5GlassmorphismDark gradientProduct sites, keynotes
6Claude OfficialWarm cream #f8f6f3Anthropic-style diagrams
7OpenAI OfficialPure white #ffffffOpenAI-style diagrams

Load references/style-N.md for exact color tokens and SVG patterns.

Style-to-Diagram-Type Adaptation Guide

Not all styles work equally well for every diagram type. Use this guide to pick the best style.

Architecture Diagram

StyleSuitabilityNotes
1 Flat IconExcellentDefault choice; colorful node fills, clear layering
2 Dark TerminalExcellentPopular for dev blogs; use colored borders on dark bg
3 BlueprintExcellentPerfect for formal architecture docs
4 Notion CleanGoodMinimal, works for inline docs
5 GlassmorphismGoodStriking for presentations and product pages
6 Claude OfficialGoodWarm aesthetic, Anthropic-style presentations
7 OpenAI OfficialGoodClean, precise; minimal borders, brand green accents

Class Diagram / ER Diagram

StyleSuitabilityNotes
1 Flat IconGoodColored headers per class category
2 Dark TerminalGoodHigh contrast for code-like diagrams
3 BlueprintExcellentBest for formal UML documentation
4 Notion CleanExcellentClean, minimal; ideal for Notion-embedded diagrams
5 GlassmorphismPoorGlass effects distract from structural content
6 Claude OfficialExcellentWarm, readable; good for documentation
7 OpenAI OfficialExcellentMinimal aesthetic matches UML precision

Sequence Diagram

StyleSuitabilityNotes
1 Flat IconGoodClear lifelines; activation boxes visible
2 Dark TerminalGoodGood for dev articles; dashed lifelines visible
3 BlueprintExcellentFormal, technical documentation
4 Notion CleanExcellentBest for Notion-embedded sequence diagrams
5 GlassmorphismPoorGlass effects make lifelines hard to read
6 Claude OfficialExcellentWarm bg, good contrast
7 OpenAI OfficialExcellentMinimal, precise; ideal for API docs

Flowchart / Process Flow

StyleSuitabilityNotes
1 Flat IconExcellentDefault; colorful decision diamonds
2 Dark TerminalGoodWorks well for dev workflow diagrams
3 BlueprintGoodFormal process documentation
4 Notion CleanGoodClean for SOPs and inline docs
5 GlassmorphismGoodStriking for product demos
6 Claude OfficialGoodWarm aesthetic for presentations
7 OpenAI OfficialGoodClean and minimal

Mind Map / Concept Map

StyleSuitabilityNotes
1 Flat IconExcellentColorful branches, engaging
2 Dark TerminalGoodNeon-like branches on dark bg
3 BlueprintPoorBlueprint grid conflicts with radial layout
4 Notion CleanExcellentIdeal for Notion brainstorming
5 GlassmorphismExcellentStunning visual for presentations
6 Claude OfficialGoodWarm, readable
7 OpenAI OfficialGoodClean and minimal

Data Flow Diagram

StyleSuitabilityNotes
1 Flat IconExcellentColor-coded arrows by data type
2 Dark TerminalExcellentGlowing data paths on dark bg
3 BlueprintExcellentFormal data flow documentation
4 Notion CleanGoodMinimal, clean
5 GlassmorphismPoorDistracts from flow semantics
6 Claude OfficialGoodReadable
7 OpenAI OfficialGoodPrecise, minimal

Use Case Diagram

StyleSuitabilityNotes
1 Flat IconGoodColorful use case ellipses
2 Dark TerminalPoorStick figures less visible on dark bg
3 BlueprintExcellentClassic UML aesthetic
4 Notion CleanExcellentPerfect for product requirement docs
5 GlassmorphismPoorUnnecessary visual noise
6 Claude OfficialExcellentWarm, professional
7 OpenAI OfficialExcellentClean, precise UML

State Machine Diagram

StyleSuitabilityNotes
1 Flat IconGoodColorful states
2 Dark TerminalGoodGlowing states and transitions
3 BlueprintExcellentBest for formal UML state machines
4 Notion CleanExcellentClean for documentation
5 GlassmorphismPoorDistracts from state transitions
6 Claude OfficialExcellentReadable
7 OpenAI OfficialExcellentMinimal, precise

Network Topology

StyleSuitabilityNotes
1 Flat IconExcellentColorful device icons
2 Dark TerminalExcellentCyberpunk-style network maps
3 BlueprintExcellentIdeal for infrastructure docs
4 Notion CleanGoodClean for IT documentation
5 GlassmorphismGoodStriking for presentations
6 Claude OfficialGoodProfessional network diagrams
7 OpenAI OfficialGoodClean infrastructure diagrams

Comparison / Feature Matrix

StyleSuitabilityNotes
1 Flat IconExcellentColor-coded checkmarks
2 Dark TerminalGoodWorks for dev tool comparisons
3 BlueprintPoorGrid conflicts with table layout
4 Notion CleanExcellentPerfect for Notion-embedded tables
5 GlassmorphismPoorDistracts from tabular data
6 Claude OfficialExcellentClean, warm
7 OpenAI OfficialExcellentMinimal, precise

Timeline / Gantt

StyleSuitabilityNotes
1 Flat IconExcellentColorful bars by category
2 Dark TerminalGoodWorks for dev roadmaps
3 BlueprintGoodFormal project plans
4 Notion CleanExcellentIdeal for Notion project docs
5 GlassmorphismGoodStriking for keynote presentations
6 Claude OfficialGoodWarm, professional
7 OpenAI OfficialGoodClean timeline

Agent / Memory Architecture

StyleSuitabilityNotes
1 Flat IconExcellentColorful layers, engaging
2 Dark TerminalExcellentPopular for AI/ML blog posts
3 BlueprintGoodFormal AI system documentation
4 Notion CleanGoodClean for AI research notes
5 GlassmorphismExcellentStunning for AI product presentations
6 Claude OfficialExcellentAnthropic AI aesthetic
7 OpenAI OfficialExcellentOpenAI AI aesthetic

These patterns appear frequently — internalize them:

RAG Pipeline: Query → Embed → VectorSearch → Retrieve → Augment → LLM → Response Agentic RAG: adds Agent loop with Tool use between Query and LLM Agentic Search: Query → Planner → [Search Tool / Calculator / Code] → Synthesizer → Response Mem0 / Memory Layer: Input → Memory Manager → [Write: VectorDB + GraphDB] / [Read: Retrieve+Rank] → Context Agent Memory Types: Sensory (raw input) → Working (context window) → Episodic (past interactions) → Semantic (facts) → Procedural (skills) Multi-Agent: Orchestrator → [SubAgent A / SubAgent B / SubAgent C] → Aggregator → Output Tool Call Flow: LLM → Tool Selector → Tool Execution → Result Parser → LLM (loop)

Common Mistakes

MistakeFix
Arrows crossing over nodesRoute around with orthogonal paths or bezier detour
Too many arrow colorsMax 4 semantic colors per diagram; combine similar flows
Unlabeled arrowsAlways label; put text mid-arrow on white/dark bg rect
No grouping on complex graphsAdd swim-lane rects for groups >4 nodes
Text overflowtext-anchor="middle" + clip or shorten label
PNG missingRun rsvg-convert immediately after SVG write; report if unavailable
Style mismatchLoad style reference file before generating any SVG

Best Practices (2026 Update)

Text Size Hierarchy

  • Title: 24-28px, font-weight: 700
  • Layer labels: 16-18px, font-weight: 600
  • Node main labels: 16-18px, font-weight: 600
  • Node sub-labels: 13-14px, font-weight: 400
  • Arrow labels: 12-13px, font-weight: 400
  • Legend: 11-12px, font-weight: 400

Arrow Label Background

CRITICAL: All arrow labels MUST have a background rect to prevent overlap with other elements.

<!-- Background rect (place before text) -->
<rect x="label_x - 4" y="label_y - 14" width="lh + 8" height="18" 
      fill="canvas_background_color" opacity="0.95"/>
<text x="label_x" y="label_y">label_text</text>

Arrow Semantics

  • Primary flow: solid, high saturation color
  • Secondary flow: 2px stroke, solid, medium saturation
  • Async/optional: 1.5px stroke, dashed (4,2), low saturation

Legend Requirements

  • Placement: Right-upper corner (x=760, y=40) or left-lower corner (x=40, y=520)
  • Content: Must include arrow types, node types (if >2 types), color semantics
  • Style: Match diagram style but use subtle background to distinguish

Orthogonal Arrow Routing

To minimize crossings, use orthogonal (L-shaped) paths instead of diagonal lines:

<!-- Bad: diagonal crossing -->
<line x1="100" y1="100" x2="300" y2="300"/>

<!-- Good: orthogonal routing -->
<path d="M 100,100 L 100,200 L 300,200 L 300,300"/>

Node Size Hierarchy

  • Core nodes: 1.25x standard size, 3-4px stroke or double border
  • Secondary nodes: Standard size (180x90), 2-2.5px stroke
  • Tertiary nodes: Standard size, 1.5-2px stroke

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.