reactflow
Skill2 starsChanged 3 months agoMITView on GitHub
Use when working with React Flow / @xyflow/react: building, editing, reviewing, debugging, typing, performance-tuning, testing, or designing interactive node-edge canvases, custom nodes, handles, edges, labels, layouts, graph filters, save/restore behavior, or architecture diagrams. Always use for files importing @xyflow/react, ReactFlow, Background, Controls, MiniMap, Handle, useNodesState, useEdgesState, useReactFlow, Node, Edge, NodeProps, EdgeProps, or related graph/canvas code.
In this repository9 other files it gives its agents.
- animejsSkill
- container-security-auditSkill
- tiger-styleSkill
- nextjs-security-reviewSkill
- react-security-reviewSkill
- spec-locked-tddSkill
- structural-refactorSkill
- whatsapp-cloud-apiSkill
- whatsapp-flows-jsonSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 9 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Before implementing or reviewing React Flow behavior:
- Distinctive: line 13
Search that file for the task area: quick start, concepts, custom nodes, handles, edges, labels, layouting, hooks, TypeScript, performance, …
- Distinctive: line 18
Use bundled references only as a routing map.
- Very specific: line 22
Read references/doc-map.md to pick the right official React Flow links quickly.
- Very specific: line 23
Read references/implementation-checklist.md before editing substantial React Flow code or reviewing graph behavior.
- Distinctive: line 27
Treat React Flow canvas state as UI state unless product requirements say otherwise.
- Very specific: line 28
Keep business/domain relationships outside React Flow node positions.
- Very specific: line 30
Use TypeScript generics for Node<Data> and Edge<Data> instead of any.
- Very specific: line 31
Use stable nodeTypes and edgeTypes objects, typically memoized or module-scoped, to avoid React Flow remounts.
- Distinctive: line 33
Keep custom node and edge components small.
- Very specific: line 34
Avoid mutating node or edge objects in event handlers.
- Distinctive: line 46
no invalid cross-type relationship.
- Distinctive: line 47
no duplicate edge if domain forbids it.
- Distinctive: line 48
no cycle if the graph must be acyclic.
- Distinctive: line 50
Verify with TypeScript and the app's relevant test/build command.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Flow
Required doc freshness workflow
Before implementing or reviewing React Flow behavior:
- Fetch
https://reactflow.dev/llms.txt. - Search that file for the task area: quick start, concepts, custom nodes, handles, edges, labels, layouting, hooks, TypeScript, performance, SSR, testing, examples, API reference, or troubleshooting.
- Fetch the exact linked React Flow page(s) needed for the task.
- Base API names, prop names, event signatures, and type imports on fetched pages, not memory.
- Mention which docs were fetched when handing off non-trivial React Flow work.
Use bundled references only as a routing map. They are not a substitute for fresh docs.
Reference routing
- Read
references/doc-map.mdto pick the right official React Flow links quickly. - Read
references/implementation-checklist.mdbefore editing substantial React Flow code or reviewing graph behavior.
Implementation stance
- Treat React Flow canvas state as UI state unless product requirements say otherwise.
- Keep business/domain relationships outside React Flow node positions. Persist domain graph facts in the application data model, then derive
nodes[]andedges[]for rendering. - Store node positions, viewport, collapsed groups, and visual preferences separately from business relationships.
- Use TypeScript generics for
Node<Data>andEdge<Data>instead ofany. - Use stable
nodeTypesandedgeTypesobjects, typically memoized or module-scoped, to avoid React Flow remounts. - Validate every connection before adding an edge when the domain has constraints.
- Keep custom node and edge components small. Put domain editing forms/panels outside custom node renderers when possible.
- Avoid mutating
nodeoredgeobjects in event handlers. Return new arrays/objects through state setters. - For large graphs, minimize subscriptions to full node/edge arrays and avoid expensive work inside node renderers.
Common task workflow
- Identify current React Flow version from
package.jsonand imports. In this repo expect@xyflow/react. - Fetch fresh docs through the required workflow.
- Inspect current controlled/uncontrolled setup:
nodes,edges,onNodesChange,onEdgesChange,onConnect, provider usage. - Define typed data shapes for node and edge
data. - Encode graph invariants near the mutation boundary:
- connection endpoints exist;
- no forbidden self-edge;
- no invalid cross-type relationship;
- no duplicate edge if domain forbids it;
- no cycle if the graph must be acyclic.
- Persist domain mutations first when data is business-relevant; re-render from returned server data.
- Verify with TypeScript and the app's relevant test/build command.
Project-specific notes for this repository
- Existing app uses React Flow for an architecture cartography canvas.
- Domain source of truth must be SQLite/relational data, not
localStorageor React Flow objects. localStoragemay keep layout and appearance preferences only.- Graph filters should derive from typed persisted relationships: project membership, application dependency, deployment, datastore access, system-user hosting, database-instance containment, party association.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

