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:
tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.