react-flow
БесплатноБез исполняемых скриптовНе проверенExpert guidance for React Flow (@xyflow/react): building interactive node-based graphs, custom nodes and edges, handles, state management, layouting…
от framara★ 56 звёзд на GitHubОб этом скилле
React Flow
Overview
Use this skill to build, customize, debug, and optimize interactive node-based UIs with React Flow (@xyflow/react v12+). Covers everything from basic setup to advanced patterns like computed flows, sub-flows, and external layout integration.
Version and source policy
Guidance reviewed against @xyflow/react 12.12.0 on 2026-09-28. Check the target project's installed version and lockfile before applying an API; “v12+” does not mean every minor release has every feature. Preserve the project's state and styling choices unless the task requires changing them.
Use the official documentation index to find a specific guide or API page. For version-sensitive behavior, check release notes and the installed package's declarations/source. Read only the references relevant to the task. Examples with omitted imports or ... are integration sketches, not standalone applications.
Agent behavior contract (follow these rules)
- For v12 projects, import from
@xyflow/react. If maintaining a legacy project, follow its installed API until a migration is in scope. - Always import the stylesheet:
import '@xyflow/react/dist/style.css'(orbase.csswhen replacing the default visual styles). - The
<ReactFlow>parent container must resolve to nonzero width and height (explicit sizing or a sized flex/grid layout). - Define
nodeTypesandedgeTypesobjects outside component bodies or wrap inuseMemoto prevent re-renders. - Use custom nodes for application-specific content or handles; built-in nodes remain suitable for simple labeled graphs.
- Use the
nodragclass on interactive elements inside custom nodes (inputs, buttons, selects). - Use
nowheelclass on scrollable elements inside custom nodes to prevent zoom interference. - When hiding handles, use
visibility: hiddenoropacity: 0— neverdisplay: none(breaks dimension calculation). - When using multiple handles of the same type on a node, always assign unique
idprops. - After adding, removing, or repositioning handles, call
useUpdateNodeInternalsafter the DOM update, such as in an effect. - Always create new objects when updating node/edge state — mutations are not detected by React Flow.
- Prefer controlled flows for non-trivial applications. Wire
onNodesChangeandonEdgesChangefor editable controlled elements, and addonConnectonly when users can create connections.
First 60 seconds (triage template)
- Identify the goal from the request: new flow setup, custom nodes/edges, state management, layout, performance, styling, E2E testing, advanced patterns (undo/redo, copy/paste, computed flows, collaboration), or debugging.
- Inspect the project for these facts; ask only when a missing fact affects the solution:
- React Flow version (v12+ uses
@xyflow/react) - TypeScript or JavaScript
- State management approach (local state, Zustand, Redux)
- Number of nodes expected (affects performance strategy)
- Styling approach (CSS, Tailwind, styled-components)
- React Flow version (v12+ uses
- Branch quickly:
- migrating from legacy
reactfloworreact-flow-renderer-> package rename, import changes, API differences - blank canvas or missing nodes -> container dimensions or missing CSS import
- edges not rendering -> missing handles, missing CSS, or
display: noneon handles - re-renders or sluggish performance -> nodeTypes defined inside component, missing memoization
- connecting nodes not working -> missing
onConnecthandler or handle configuration - layout/positioning -> external layout library integration (dagre, elkjs)
- type errors -> TypeScript generic patterns for Node/Edge types
- migrating from legacy
Routing map (read the right reference fast)
- Migrating from
reactfloworreact-flow-rendererto@xyflow/reactv12 ->references/migration.md - Installation, setup, first flow, node/edge objects ->
references/fundamentals.md - Custom node components, Handle, multiple handles, drag handles ->
references/custom-nodes.md - Custom edge components, path utilities, edge labels, markers ->
references/custom-edges.md - Event handlers, callbacks, connection validation, selection, keyboard ->
references/interactivity.md - Controlled vs uncontrolled, Zustand integration, state update patterns ->
references/state-management.md - Node/Edge types, generics, union types, type guards ->
references/typescript.md - External layout libraries (dagre, elkjs, d3), sub-flows, parent-child ->
references/layouting.md - Background, Controls, MiniMap, Panel, NodeToolbar, NodeResizer, hooks ->
references/components-and-hooks.md - Memoization, render optimization, theming, CSS variables, Tailwind ->
references/performance-and-styling.md - Keyboard workflows, accessible names, focus management, assistive technology ->
references/accessibility.md - Server rendering, initial geometry, hydration, Next.js boundaries ->
Установить react-flow в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл react-flow?
Expert guidance for React Flow (@xyflow/react): building interactive node-based graphs, custom nodes and edges, handles, state management, layouting, TypeScript patterns, performance optimization, accessibility, SSR, and theming. Use when writing React Flow code, creating custom nodes or edges, debugging flow issues, optimizing graph performance, integrating with Zustand, or building canvas-based UIs with React Flow.
Как установить скилл react-flow?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл react-flow запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic