xyflow-patterns

Integrate XYFlow patterns into the ChainGraph visual flow editor.

15|3|Updated Apr 29, 2025
One-click install
npx skills add https://github.com/chaingraphlabs/chaingraph --skill xyflow-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xyflow-patterns
Source: https://github.com/chaingraphlabs/chaingraph/tree/main/.claude/skills/xyflow-patterns
Command: npx skills add https://github.com/chaingraphlabs/chaingraph --skill xyflow-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

XYFlow integration patterns for the ChainGraph visual flow editor resolve the complexity of building scalable, interactive graph editors by providing battle-tested UI patterns and architected integration points.

Core Features & Use Cases

  • Custom node/edge integration with XYFlow to extend the flow editor for domain-specific visuals.
  • Efficient, pre-computed render data and delta update patterns to minimize re-renders during drag.
  • Anchor and handle systems implemented as XYFlow nodes, enabling dynamic path calculation and native drag behavior.
  • Ghost anchors to preview insertion points and simplify edge augmentation.
  • Comprehensive interaction hooks and store patterns that support selection, keyboard shortcuts, drag-and-drop, and real-time updates.

Quick Start

  • Install the XYFlow and React Flow packages compatible with your project.
  • Import and render the Flow.tsx component, and extend nodeTypes with your own chaingraphNode and anchorNode.
  • Wire edgeTypes and configure anchors, selection, and ghost-anchors flow as described in the architecture.

Frequently Asked Questions about xyflow-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate custom React Flow node types into a visual flow editor?

To integrate custom React Flow node types, you import the Flow.tsx component and extend the nodeTypes object with your custom chaingraphNode and anchorNode definitions to render domain-specific UI elements.

How do I optimize React Flow UI performance for large graphs?

You optimize React Flow UI performance for large graphs by applying pre-computed render data and delta update patterns to minimize re-renders during drag, alongside 18 interaction and store hooks.

What is the best way to handle anchor and handle systems in XYFlow?

The best way to handle anchor systems in XYFlow is implementing them as dedicated XYFlow nodes, enabling dynamic path calculation and native drag behavior for edge augmentation.

Does XYFlow support ghost anchors to preview edge insertion points?

Yes, XYFlow supports ghost anchors to preview insertion points and simplify edge augmentation, operating as specialized nodes within the visual flow editor.

How do I manage selection and keyboard shortcuts in a React Flow editor?

You manage selection and keyboard shortcuts in a React Flow editor by leveraging a set of 18 comprehensive interaction hooks and store patterns that support real-time UI updates.

Can I use React Flow patterns for custom edge rendering and port management?

Yes, you can use React Flow patterns for custom edge rendering and port management by wiring edgeTypes and utilizing store hooks designed to retrieve render data and manage port connections.