Overview
Concrete skill procedure for turning source material into a static PNG + animated GIF flow diagram using a JSON specification and Python/Pillow renderer, provided by the visual-flow-gif skill.
Description
The visual-flow-gif skill defines a four-step workflow: read and analyze source material (identify actors, modules, arrows, decision points, feedback loops), create the JSON spec (from light or dark template, with explicit coordinates, routed arrows, pulses), render the diagram (via render_animated_gif using Pillow), and inspect and verify before delivery (readable text, no overlaps, arrow directions match, GIF has visible motion). The skill enforces a quality bar: always run with --verify --check before delivery.
Usage
Invoke when a user wants to turn source material (article, workflow notes, architecture sketch, process description) into a clear animated flow diagram. Triggers: "create a flow diagram", "make an animated diagram from this article".
Code Reference
Source Location
- Repository: AI Builder Club Skills
- File: skills/visual-flow-gif/SKILL.md
- References: skills/visual-flow-gif/references/spec-format.md
- Templates: skills/visual-flow-gif/assets/default-spec.json, skills/visual-flow-gif/assets/dark-spec.json
Signature
# Skill procedure (invoked as a Claude Code skill):
def analyze_source(source_material: str) -> {actors, modules, arrows, decision_points, feedback_loops}:
"""Step 1: Read source material and identify the system.
- Inputs, outputs, actors, modules, tools, stores, feedback loops
- Main steps, decision points, shared artifacts, arrow direction
- Visual constraints from reference image (if any)
"""
def create_spec(system_model: dict, theme: str) -> dict:
"""Step 2: Author JSON spec from template.
- Start from default-spec.json (light) or dark-spec.json (dark)
- Use explicit x, y, w, h values for predictable layout
- Use custom multi-point paths for routed arrows (rounded by default)
- Add important modules to animation.pulses
- See spec-format.md for field details
"""
def render_diagram(spec: dict, outdir: str, basename: str) -> {png, gif}:
"""Step 3: Render via render_animated_gif.py.
python3 render_animated_gif.py --spec spec.json --outdir ./output --basename diagram --verify --check
"""
def inspect_and_verify(png_path, gif_path, spec) -> bool:
"""Step 4: Inspect before delivery.
- Text readable, not clipped
- Labels/arrows don't overlap important content
- Arrow directions match source material
- GIF has visible motion (--verify)
- Pulse highlights clearly visible
- Full system fits inside the frame
"""
Import
# Invoked as a Claude Code skill:
# /visual-flow-gif
# or triggered by: "create a flow diagram", "make an animated diagram"
I/O Contract
Inputs
| Name |
Type |
Required |
Description
|
| source_material |
str |
Yes |
Article, workflow notes, architecture sketch, or process description
|
| theme |
str |
No |
light (default) or dark
|
| reference_image |
image |
No |
Visual constraints to match
|
Outputs
| Name |
Type |
Description
|
| {basename}.png |
PNG image |
Static flow diagram
|
| {basename}.gif |
GIF image |
Animated flow diagram with visible motion
|
| spec.json |
JSON |
The JSON spec used (for later edits)
|
JSON Spec Top-Level Fields
| Field |
Type |
Description
|
| canvas |
dict |
width, height, fps, frames (defaults: 1280x800, 20fps, 48 frames)
|
| theme |
str |
"light" or "dark" with optional color overrides
|
| title |
dict |
text, highlight, subtitle
|
| nodes |
list |
Each: id, type, x, y, w, h, label, body, color
|
| edges |
list |
Each: from, to, label, stroke, width, arrow, style, points
|
| animation |
dict |
motion_color, paths, pulses
|
Usage Examples
Full Workflow
"Create an animated flow diagram from this article about the support
signal loop — use the light theme."
# The skill will:
# 1. Analyze: identify actors (support, product), modules (triage, memory,
# response), arrows (ticket → triage → memory → response → close)
# 2. Create spec from default-spec.json template with explicit coordinates
# 3. Render: python3 render_animated_gif.py --spec spec.json --outdir ./output --verify --check
# 4. Inspect: verify text readable, no overlaps, motion visible
Render Command
python3 ${CLAUDE_PLUGIN_ROOT}/skills/visual-flow-gif/scripts/render_animated_gif.py \
--spec /path/to/spec.json \
--outdir /path/to/output \
--basename diagram \
--verify \
--check
Related Pages
Implements Principle