Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    React Flow Canvas Engineer

    1

    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

    1 useSecurity scanned
    React Flow Canvas Engineer

    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.

    MetricBeforeAfter
    Subtree collapse latency~1.8s blocked~40ms
    Rerenders per pan/drag tick3-5 full passesid-based selection only
    Layout recomputes during dragevery pixel event0 (signature-gated)
    Hidden-in-collapse search hitsnot findablefind + 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

    1. Define the graph by providing source nodes and edges with structured metadata for hierarchy levels and categories.
    2. Apply projection logic to determine which nodes and edges are visible based on the current collapse set.
    3. Execute layout calculations using structural signatures to ensure positioning only runs when the graph topology changes.
    4. 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.

    Code samples assume @xyflow/react v12 and Dagre; ELKjs users get the pattern but not ready-made configs. Tunings target hundreds-to-thousands of nodes - very small graphs do not need the projection layer.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    • Free with an Agensi account

    Permissions

    Read Files
    Write Files

    File Scopes

    src/**
    *.ts
    *.tsx

    Needs shell and file read/write access only to edit the app's TypeScript/React source and run the local build; no network egress is required.

    Listed1 month ago
    Updated1 month ago

    What's inside

    Frequently Asked Questions

    While standard implementations struggle at 100+ nodes, this skill uses hierarchical projection and structural signatures to maintain 60fps performance even when handling thousands of nodes in a single graph.

    The package includes the core React Flow architectural patterns, TypeScript types for graph metadata, Dagre integration for auto-layout, and optimized search/focus logic.

    Yes, the skill is designed for React Flow (XYFlow) environments and is compatible with any AI agent that supports TypeScript and React development workflows.

    It is ideal for hierarchical data like software dependencies or business processes, though it is not recommended for physics-based force-directed layouts or graphs with over 5,000 nodes visible simultaneously without additional virtualization.

    Setup is straightforward: you provide your source data with hierarchy metadata, and the skill provides the projection and layout logic to render the canvas without manual positioning.

    Updates are released periodically to ensure compatibility with the latest versions of XYFlow and to refine performance as React's rendering engine evolves.