flow-graph

Generate animated GIF/WebM videos of graph visualizations from natural language descriptions

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "flow-graph" with this command: npx skills add asgeirf/agent-skills/asgeirf-agent-skills-flow-graph

Flow Graph Skill

Generate graph visualizations rendered as GIF and WebM video files with animated traffic flowing along edges. You describe a process or graph in natural language, then this skill produces a video of the diagram.

Workflow

1. Understand the Request

Parse the user's description to identify:

  • Nodes — entities, states, steps, or concepts
  • Edges — relationships, transitions, data flows
  • Layout — flowchart (top-down), pipeline (left-right), state machine (radial), etc.
  • Mode — static with traffic (default) or step-by-step build-up (only if user explicitly asks)

2. Generate Graph JSON

Create a graph-data.json file. Default to static mode — define all nodes and edges upfront. The engine renders the complete graph immediately with animated traffic flowing along edges.

Static mode (default — use this unless asked for build-up animation):

{
  "settings": {
    "width": 1280, "height": 720,
    "background": "#1a1a2e",
    "duration": 5000,
    "traffic": true
  },
  "nodes": [
    { "id": "a", "label": "Start", "position": [400, 50] },
    { "id": "b", "label": "Process", "position": [400, 200] },
    { "id": "c", "label": "End", "position": [400, 350] }
  ],
  "edges": [
    { "id": "e1", "source": "a", "target": "b" },
    { "id": "e2", "source": "b", "target": "c" }
  ]
}

Step mode (advanced — only when user asks for build-up sequences):

{
  "settings": {
    "width": 1280, "height": 720,
    "background": "#1a1a2e",
    "animationDuration": 500,
    "fitViewOnComplete": true
  },
  "steps": [
    { "type": "addNode", "node": { "id": "1", "label": "Start", "position": [200, 100] }, "delay": 600 },
    { "type": "addEdge", "edge": { "id": "e1-2", "source": "1", "target": "2", "animated": true }, "delay": 400 },
    { "type": "highlight", "ids": ["1"], "color": "#e94560", "delay": 800 },
    { "type": "fitView", "padding": 0.2, "delay": 500 },
    { "type": "wait", "delay": 1500 }
  ]
}

Step types: addNode, addEdge, highlight, moveNode, removeNode, removeEdge, updateStyle, fitView, zoom, pan, wait

See references/graph-schema.md for full details on both modes.

3. Write the JSON File

Write the graph JSON to a temporary file, e.g. /tmp/my-graph.json.

4. Setup (first run only)

Install the skill's dependencies if not yet done:

cd <skill-dir> && npm install --prefer-offline --no-audit --no-fund
cd <skill-dir>/assets/flow-template && npm install --prefer-offline --no-audit --no-fund
npx playwright install chromium

Where <skill-dir> is the directory containing this SKILL.md file.

5. Record the Animation

Run the recording script:

node <skill-dir>/scripts/record.mjs /tmp/my-graph.json ./output --format both

This will produce output.webm and output.gif in the current directory.

Layout Patterns

Top-down flowchart — Increment Y by ~150 per row, center X:

{ "id": "a", "label": "Step 1", "position": [400, 50] }
{ "id": "b", "label": "Step 2", "position": [400, 200] }

Left-to-right pipeline — Increment X by ~200, same Y:

{ "id": "src", "label": "Source", "position": [50, 150] }
{ "id": "dst", "label": "Dest",   "position": [250, 150] }

Branching / decision — Fork at the decision node with different X offsets:

{ "id": "decide", "position": [400, 300] }
{ "id": "yes",    "position": [250, 450] }
{ "id": "no",     "position": [550, 450] }

Recording Options

node record.mjs <graph-data.json> <output-path> [options]

Options:
  --format gif|webm|both   Output format (default: both)
  --width  <number>        Viewport width override
  --height <number>        Viewport height override

The script handles everything: copies the template to a temp directory, injects the graph data, starts a Vite dev server, records with Playwright, converts via ffmpeg, and cleans up.

Design Tips

Static mode (default)

  • Set duration to 4000-6000ms for a good looping clip
  • Traffic animation flows automatically on all edges — no per-edge config needed
  • Set "traffic": false in settings if you want a still diagram
  • Style key nodes with colored backgrounds or borders to show roles (source, sink, decision)
  • Use edge label to annotate relationships

Step mode (build-up animation)

  • Use delay: 400-800 for node/edge additions (fast enough to be engaging, slow enough to follow)
  • Add a highlight step after key nodes appear to draw attention
  • End with fitView + wait to show the complete graph for 1-2 seconds
  • Use animated: true on edges to show data flow direction
  • Style decision nodes with borderRadius: "50%" for diamond/circle shapes
  • Keep total animation under 15 seconds for best GIF file size

Prerequisites

  • Node.js 20+
  • ffmpeg (for GIF conversion) — brew install ffmpeg
  • Playwright browsers — npx playwright install chromium

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

graphilizer

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

Repository Source
86.2K23Kvercel
Automation

vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

Repository Source
60.5K23Kvercel
Automation

supabase-postgres-best-practices

Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

Repository Source
35.2K1.6Ksupabase