workflow-diagram
Skill16 starsChanged 9 months agoMITView on GitHub
Create workflow diagrams, flowcharts, and process maps in Figma with shapes, arrows, and text. Use when asked to create a workflow, flowchart, process diagram, decision tree, or any node-and-edge diagram in Figma. Supports process boxes, decision diamonds, start/end pills, subprocess shapes, notes, swimlanes, and automatic graph layout.
In this repository5 other files it gives its agents.
- a11y-auditSkill
- content-reviewSkill
- figma-docSkill
- figma-slidesSkill
- online-researchSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 103
Direction: default TB; use LR for timelines or horizontal processes
- Distinctive: line 108
Write concise labels (1–4 words ideal)
- Distinctive: line 110
Every node should be reachable from a start node
- Distinctive: line 111
Every path should lead to an end node (unless it's a loop)
- Very specific: line 119
Use get_canvas_bounds first to avoid overlap with existing content.
- Very specific: line 194
Manual overrides: If a node has explicit x/y, those are used
- Very specific: line 196
Default spacing: nodeWidth=240, nodeHeight=72, horizontalGap=120, verticalGap=80
- Very specific: line 224
Direction: Use TB for most workflows, LR for pipelines/timelines
- Very specific: line 226
Use get_canvas_bounds to avoid overlap with existing content
- Distinctive: line 228
Keep labels concise (1–4 words).
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Workflow Diagram
Build workflow diagrams in Figma using the create_workflow_diagram command. One command builds the entire diagram — shapes, arrows, labels, and layout are handled automatically.
Prerequisites
- figma-ai-bridge plugin running in Figma and connected
- The
create_workflow_diagramcommand registered incode.js - Helper:
scripts/figma_cmd.mjs <channel> create_workflow_diagram '<paramsJSON>'
Shape Types
| Type | Shape | Use for |
start | Green pill | Entry point of a workflow |
end | Red pill | Termination / completion points |
process | White rectangle | Actions, tasks, operations |
decision | Yellow diamond | Yes/no branches, conditions. Always has 2+ labeled outgoing edges |
subprocess | Purple double-border rectangle | Referenced sub-processes, external calls |
note | Dashed yellow box | Comments, annotations, side notes |
Command Schema
{
"title": "My Workflow",
"direction": "TB",
"nodes": [
{ "id": "start", "type": "start", "label": "Begin" },
{ "id": "step1", "type": "process", "label": "Do something" },
{ "id": "check", "type": "decision", "label": "OK?" },
{ "id": "done", "type": "end", "label": "Done" }
],
"edges": [
{ "from": "start", "to": "step1" },
{ "from": "step1", "to": "check" },
{ "from": "check", "to": "done", "label": "Yes" },
{ "from": "check", "to": "step1", "label": "No" }
],
"x": 0,
"y": 0
}Parameters
| Parameter | Type | Required | Default | Description |
title | string | No | "Workflow Diagram" | Diagram title |
nodes | array | Yes | — | Node definitions |
edges | array | Yes | — | Edge definitions |
direction | "TB" | "LR" | No | "TB" | Top-to-bottom or left-to-right |
swimlanes | array | No | — | Optional lane groupings |
x, y | number | No | 0 | Canvas placement offset |
spacing | object | No | — | Override nodeWidth, nodeHeight, horizontalGap, verticalGap |
Node Object
| Field | Type | Required | Description |
id | string | Yes | Unique identifier |
type | string | Yes | start, end, process, decision, subprocess, note |
label | string | Yes | Display text inside the shape |
sublabel | string | No | Smaller text below the shape |
x, y | number | No | Manual position override |
Edge Object
| Field | Type | Required | Description |
from | string | Yes | Source node id |
to | string | Yes | Target node id |
label | string | No | Text label on the arrow ("Yes", "No", "Error") |
Swimlane Object
| Field | Type | Required | Description |
id | string | Yes | Lane identifier |
label | string | Yes | Header text |
nodeIds | string[] | Yes | Node IDs belonging to this lane |
Workflow
1. Analyze the User's Description
Parse the description and identify:
- Steps →
processnodes - Decision points →
decisionnodes - Start/End →
start/endnodes - Sub-processes →
subprocessnodes - Annotations →
notenodes - Roles/departments → swimlanes
- Direction: default TB; use LR for timelines or horizontal processes
2. Plan Nodes and Edges
- Assign unique short
idstrings (e.g.,validate_email,send_welcome) - Write concise labels (1–4 words ideal)
- Every
decisionnode must have labeled outgoing edges - Every node should be reachable from a start node
- Every path should lead to an end node (unless it's a loop)
3. Build the Diagram
FIGMA_TIMEOUT_MS=60000 node scripts/figma_cmd.mjs <channel> create_workflow_diagram '<JSON>'Use get_canvas_bounds first to avoid overlap with existing content.
4. Refine (Optional)
set_fill_color— change a node's colorset_text_content— update a labelmove_node— reposition a nodeset_focus— zoom to the diagram
Common Patterns
Linear Flow
{
"title": "Order Processing",
"nodes": [
{ "id": "start", "type": "start", "label": "Order Received" },
{ "id": "validate", "type": "process", "label": "Validate Order" },
{ "id": "charge", "type": "process", "label": "Charge Payment" },
{ "id": "ship", "type": "process", "label": "Ship Item" },
{ "id": "done", "type": "end", "label": "Complete" }
],
"edges": [
{ "from": "start", "to": "validate" },
{ "from": "validate", "to": "charge" },
{ "from": "charge", "to": "ship" },
{ "from": "ship", "to": "done" }
]
}Branching Decision
{
"title": "Login Flow",
"nodes": [
{ "id": "start", "type": "start", "label": "User Login" },
{ "id": "auth", "type": "process", "label": "Authenticate" },
{ "id": "valid", "type": "decision", "label": "Valid?" },
{ "id": "dashboard", "type": "process", "label": "Show Dashboard" },
{ "id": "error", "type": "process", "label": "Show Error" },
{ "id": "retry", "type": "decision", "label": "Retry?" },
{ "id": "done", "type": "end", "label": "Done" }
],
"edges": [
{ "from": "start", "to": "auth" },
{ "from": "auth", "to": "valid" },
{ "from": "valid", "to": "dashboard", "label": "Yes" },
{ "from": "valid", "to": "error", "label": "No" },
{ "from": "error", "to": "retry" },
{ "from": "retry", "to": "auth", "label": "Yes" },
{ "from": "retry", "to": "done", "label": "No" },
{ "from": "dashboard", "to": "done" }
]
}Swimlane Layout
{
"title": "Support Ticket Flow",
"swimlanes": [
{ "id": "customer", "label": "Customer", "nodeIds": ["submit"] },
{ "id": "support", "label": "Support Team", "nodeIds": ["triage", "assign"] },
{ "id": "engineering", "label": "Engineering", "nodeIds": ["investigate", "resolve", "close"] }
]
}Layout Algorithm
Built-in layered graph layout (Sugiyama-style):
- Rank assignment: BFS from start nodes assigns each node to a layer
- Crossing minimization: Barycenter heuristic (4 passes)
- Coordinate assignment: Nodes evenly spaced, centered
- Manual overrides: If a node has explicit
x/y, those are used
Default spacing: nodeWidth=240, nodeHeight=72, horizontalGap=120, verticalGap=80
Design Tokens
Shape Colors
| Shape | Fill | Stroke |
| Process | #FFFFFF | #D1D6DC |
| Decision | #FFF9EB | #E3C78A |
| Start | #ECF9EC | #8CC78C |
| End | #FAECEC | #D18C8C |
| Subprocess | #EFEFFA | #A6A6D6 |
| Note | #FDFCF3 | #D1CCB3 (dashed) |
Typography
| Element | Font | Weight | Size | Color |
| Diagram title | Inter | Bold | 24px | #212631 |
| Node label | Inter | Semibold | 14px | #212631 |
| Node sublabel | Inter | Regular | 11px | #737A85 |
| Edge label | Inter | Regular | 11px | #666E78 |
| Swimlane header | Inter | Semibold | 13px | #59616B |
Notes
- Auto-layout is built-in — no coordinate math required
- Direction: Use
TBfor most workflows,LRfor pipelines/timelines - Swimlanes are optional — only use when roles/departments are mentioned
- Use
get_canvas_boundsto avoid overlap with existing content - Node
idvalues should be short, snake_case identifiers - Keep labels concise (1–4 words). Use sublabels for additional context.
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
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.

