skills/dag-visual-editor-design/SKILL.md
Design modern, intuitive DAG/workflow visual editors that feel like LEGO, not LabView
npx skillsauth add curiositech/windags-skills dag-visual-editor-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Design modern, intuitive DAG and workflow visual editors following the LEGO philosophy: snap blocks together simply rather than wire complex ports.
Node Count < 20 AND Simple Flow?
├─ YES → Force-directed layout (React Flow default)
│ • Fast rendering
│ • Good for exploring connections
│
└─ NO → Node Count > 100?
├─ YES → Hierarchical (Dagre) + Virtualization
│ • Set viewport culling
│ • Lazy load node details
│
└─ NO → Branch Factor > 3 per node?
├─ YES → ELK Layered Algorithm
│ • Handles complex routing
│ • Minimizes edge crossings
│
└─ NO → Dagre LR (Left-Right)
• Standard choice
• rankdir: 'LR', ranksep: 80
Data Type Diversity?
├─ Single type (e.g., JSON) → Implicit connections
│ • No handles visible by default
│ • Snap zones on hover
│
├─ 2-3 types → Color-coded handles
│ • Red: Error streams
│ • Blue: Data streams
│ • Green: Success/completion
│
└─ 4+ types → Bundled connections
• Group related channels
• Label bundles clearly
• Consider type coercion nodes
User Skill Level?
├─ Beginner → Canvas + Sidebar
│ • Drag nodes from categorized list
│ • Template-based workflows
│
├─ Intermediate → Quick Add (Slash Commands)
│ • Type "/" for node search
│ • Context-aware suggestions
│
└─ Expert → Keyboard First
• Hotkeys for common nodes
• Text-based node creation
• Batch operations
Symptoms: Edges crossing everywhere, impossible to follow data flow, users getting lost Detection: If >30% of edges cross other edges, or users spend >20s tracing a path Fix:
Symptoms: Pan/zoom feels broken, users can't find their content, minimap unhelpful Detection: Users hitting zoom limits frequently, >5 seconds to locate nodes after navigation Fix:
Symptoms: Users connecting wrong ports, type errors, unexpected data flow Detection: >20% connection error rate, frequent undo of connections Fix:
Symptoms: Editor freezes with >50 nodes, stuttering during pan/zoom Detection: Frame rate drops below 30fps, render times >100ms Fix:
Symptoms: Users don't know if workflow is running, what failed, or why it stopped Detection: Users asking "is it working?" or clicking run button multiple times Fix:
Scenario: Design editor for CSV → Transform → Database pipeline
Step 1: Choose Layout
rankdir: 'LR', ranksep: 120 for readable spacingStep 2: Design Node Structure
const TransformNode = ({ data }) => (
<div className="w-64 border-2 border-gray-200 rounded-lg bg-white">
<div className="bg-blue-50 px-3 py-2 border-b">
<h3>🔄 Transform Data</h3>
</div>
<div className="p-3">
<div className="text-sm">Filter: {data.filter}</div>
<div className="text-sm">Sort: {data.sort}</div>
</div>
<Handle type="target" position={Position.Left} />
<Handle type="source" position={Position.Right} />
</div>
);
Step 3: Connection Logic
Novice Miss: Would add separate handles for each column Expert Catch: Keeps single connection, shows column mapping in node detail
Don't use DAG editors for:
Delegate to other skills:
data-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.