Works with the AI tools you already use
React Flow Canvas Engineer
Ship React Flow graphs that expand, collapse and auto-layout on thousands of nodes at 60fps, with search, focus views, and state that never breaks.
Free
React Flow Canvas Engineer
Example session with this skill installed
Our approval-workflow viewer uses React Flow, but the canvas freezes for a second or two once users collapse a service subtree, and the layout flickers during drags. The graph is about 300 nodes loaded from /api/workflows. Please refactor src/features/flow/Canvas.tsx so the source graph, visible projection, layout output, and selection state stay separate, add Dagre auto-layout that only recomputes on structural changes, memoize our custom node component, and make search find nodes hidden inside collapsed branches. We are on @xyflow/react v12 and TypeScript; keep the existing node styling intact.
- Read your context and instructions
- Compiled the react flow canvas
Summary
Refactored the approval-flow canvas into a four-layer architecture (source graph, visible projection, layout, interaction state). Collapse now mutates a single Set<string>, Dagre reruns only when the structural signature changes, and search walks the full graph before revealing matches.
| Metric | Before | After |
|---|---|---|
| Subtree collapse latency | ~1.8s blocked | ~40ms |
| Rerenders per pan/drag tick | 3-5 full passes | id-based selection only |
| Layout recomputes during drag | every pixel event | 0 (signature-gated) |
| Hidden-in-collapse search hits | not findable | find + reveal + select |
Changed: src/features/flow/Canvas.tsx, plus new projection.ts, layout.ts, and canvasReducer.ts. Added a memoized ProcessNode wrapper and kept existing CSS classes untouched.
Next steps
- Bind persistence to onNodeDragStop (never onNodeDrag) for manual layout saves
- Wrap the rankdir toggle in useDebouncedCallback(150ms)
- Snapshot only structural mutations for undo history; skip transient selection
- Load-test against a 1,000-node export before enabling focus mode by default
Connects securely to your tools. The creator never sees your data.
About this skill
Building complex React Flow canvases often leads to performance bottlenecks, layout flicker, and fragile state management. This skill provides the architectural patterns needed to handle large-scale graph visualizations without the common pitfalls of rerender churn or tangled selection logic.
What it does
- Hierarchical projection manages visibility by calculating sub-graphs based on expand and collapse states.
- Layered auto-layout integrates Dagre to handle node positioning dynamically based on structural changes.
- Optimized state management separates the source graph from view projections to prevent lag during interactions.
- Performance-tuned rendering utilizes stable custom node types and memoized edge presentation to maintain 60fps.
- Context-aware navigation provides neighborhood focus views and search-based reveal logic for deep hierarchies.
How it works
- Define the graph by providing source nodes and edges with structured metadata for hierarchy levels and categories.
- Apply projection logic to determine which nodes and edges are visible based on the current collapse set.
- Execute layout calculations using structural signatures to ensure positioning only runs when the graph topology changes.
- Trigger interactions such as toggling nodes, searching labels, or isolating local neighborhoods through a central reducer.
Frameworks & tools
Built for React Flow (XYFlow) and TypeScript. It utilizes Dagre for graph distribution and standard React hooks for state orchestration.
Why this beats prompting it yourself
Generic AI prompts often produce basic canvas examples that fail under the weight of 100+ nodes. This skill provides the specific separation of concerns, such as structural signatures and visibility projections, that prevent expensive UI recalculations and broken layout state.
Use cases
- Process mapping for complex business workflows with nested stages and tasks.
- Dependency visualization for software modules or package trees with deep hierarchies.
- Interactive documentation where users explore documentation trees through a spatial canvas.
- System monitoring to visualize real-time connections and health across microservices.
Known limitations
Does not include logic for physics-based force layouts. Performance tuning is focused on React Flow and may require manual virtualization adjustments for graphs exceeding 5,000 simultaneously visible nodes.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 1 day ago
- Free to download with an account