xiaohongshu
xiaohongshu
dag-visual-editor-design
Design modern, intuitive DAG/workflow visual editors that feel like LEGO, not LabView
Full skill instructions
Design modern, intuitive DAG and workflow visual editors. This skill captures best practices from industry leaders like n8n, ComfyUI, Retool Workflows, and React Flow — prioritizing clarity over complexity.
Traditional node editors (LabView, Max/MSP, older VFX tools) suffer from:
Modern DAG editors take a different approach:
Nodes should feel like self-contained units, not wiring terminals.
┌─────────────────────────────┐
│ 🔄 Transform Data │ ← Clear title with icon
├─────────────────────────────┤
│ Input: users.json │ ← Inline config, not ports
│ Output: filtered_users │
├─────────────────────────────┤
│ ▶ Run │ ⚙ Config │ 📋 Docs │ ← Actions in footer
└─────────────────────────────┘
Bad (LabView style):
●─┬─● ●─●
│ │
┌───┴───┐ ┌─┴─┐
│ Node │─│ N │
└───┬───┘ └─┬─┘
│ │
●─┴─● ●─┴─●
Good (Modern style):
┌──────────┐ ┌──────────┐
│ Input │ ───▶ │ Process │ ───▶ [Output]
└──────────┘ └──────────┘
| Pattern | When to Use | Visual |
|---|---|---|
| Implicit | Sequential flows | Vertical stack, no lines |
| Explicit minimal | Branching logic | Single clear edge |
| Bundled | Multiple data channels | Grouped/labeled edges |
| Animated | Execution/data flow | Particles along edges |
Key insight from ComfyUI: Show data flowing through edges during execution. Users understand what's happening.
Avoid: Multiple tiny ports crammed on node sides
Prefer:
Auto-layout is critical. Users shouldn't manually arrange nodes.
// Dagre layout (hierarchical, left-to-right)
const layout = dagre.graphlib.Graph()
.setGraph({ rankdir: 'LR', ranksep: 80, nodesep: 40 })
.setDefaultEdgeLabel(() => ({}));
// ELK (more sophisticated, handles complex graphs)
const elk = new ELK();
await elk.layout(graph, {
algorithm: 'layered',
'elk.direction': 'RIGHT',
'elk.layered.spacing.nodeNodeBetweenLayers': 100,
});
Essential for complex workflows:
import ReactFlow, {
Background,
Controls,
MiniMap,
useNodesState,
useEdgesState,
} from 'reactflow';
function WorkflowEditor() {
const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes);
const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges);
return (
<ReactFlow
nodes={nodes}
edges={edges}
onNodesChange={onNodesChange}
onEdgesChange={onEdgesChange}
fitView
>
<Background variant="dots" gap={16} />
<MiniMap />
<Controls />
</ReactFlow>
);
}
const SkillNode = ({ data, selected }) => (
<div className={cn(
"rounded-lg border-2 bg-white shadow-md min-w-[200px]",
selected ? "border-blue-500" : "border-gray-200"
)}>
{/* Header */}
<div className="flex items-center gap-2 px-3 py-2 bg-gray-50 rounded-t-lg">
<span className="text-lg">{data.icon}</span>
<span className="font-medium">{data.label}</span>
</div>
{/* Body - preview of config */}
<div className="px-3 py-2 text-sm text-gray-600">
{data.preview}
</div>
{/* Handles */}
<Handle type="target" position={Position.Left} />
<Handle type="source" position={Position.Right} />
</div>
);
/ to search nodes (like Notion)| Key | Action |
|---|---|
Delete / Backspace | Remove selected |
Cmd/Ctrl + D | Duplicate |
Cmd/Ctrl + G | Group selected |
Cmd/Ctrl + Z | Undo |
/ | Quick node search |
Space + Drag | Pan canvas |
Scroll | Zoom |
/* Default */
.node { border: 2px solid #e5e7eb; }
/* Selected */
.node.selected { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.3); }
/* Running */
.node.running { border-color: #f59e0b; animation: pulse 1s infinite; }
/* Completed */
.node.completed { border-color: #10b981; }
/* Error */
.node.error { border-color: #ef4444; background: #fef2f2; }
.edge-animated path {
stroke-dasharray: 5;
animation: dash 0.5s linear infinite;
}
@keyframes dash {
to { stroke-dashoffset: -10; }
}
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience