react-flow
SKILL.md
React Flow Repair, Migration, And Build Protocol
Execute this protocol in order. Keep fixes small, reversible, and validated.
Required Outputs
- Produce a short audit report of the current React Flow architecture.
- Produce a prioritized fix list with risk and expected impact.
- Apply safe fixes in small patches when requested.
- Generate missing typed scaffolding when the project is incomplete.
- Report verification results and any residual risks.
Workflow
- Discover project shape.
- Locate all React Flow usage (
ReactFlow,useNodesState,useEdgesState,addEdge, custom node/edge components). - Confirm framework/runtime details (
vite,next, TypeScript config, lint setup).
- Locate all React Flow usage (
- Validate graph model contracts.
- Centralize
NodeandEdgetype definitions. - Validate id strategy,
dataschema stability, and custom type names.
- Centralize
- Validate state and event wiring.
- Ensure
onNodesChange,onEdgesChange, andonConnectare correctly bound. - Detect duplicated or conflicting state sources.
- Ensure
- Validate rendering and performance.
- Keep
nodeTypesandedgeTypesreferences stable. - Detect avoidable re-renders and unsafe inline object creation in hot paths.
- Keep
- Apply auto-fixes.
- Apply highest-impact, low-risk fixes first.
- Preserve behavior unless an explicit bug fix requires a behavior change.
- Include migration notes for any public API or schema changes.
- Run migration pass when legacy APIs are present.
- Detect legacy package/import usage and map to modern
@xyflow/react. - Migrate types first, then runtime wiring, then persistence compatibility.
- Add migration guard for old payload versions when needed.
- Detect legacy package/import usage and map to modern
- Scaffold from scratch when needed.
- Generate a minimal typed baseline with custom node support and layout helper.
- Ensure resulting scaffold compiles in a standard TS React setup.
- Verify.
- Run available tests or static checks.
- If checks are missing, provide manual verification steps.
Guardrails
- Preserve existing business logic unless the bug requires change.
- Keep node and edge ids stable across operations and persistence cycles.
- Avoid introducing a second state manager unless explicitly requested.
- Keep templates framework-agnostic unless the repository enforces a framework.
- Prefer typed interfaces over
anyfor flowdatapayloads.
References
- Use
references/CHECKLIST.mdfor systematic auditing. - Use
references/FIX_PATTERNS.mdfor common issue-to-fix mapping. - Use
references/EXAMPLES.mdfor prompt and output patterns. - Use
references/MIGRATION_CHECKLIST.mdandreferences/API_RENAMES.mdfor upgrade work. - Use
references/MIGRATION_EXAMPLES.mdfor migration request patterns.
Templates
- Start from
templates/Flow.tsx.tmplfor baseline flow container. - Start from
templates/nodeTypes.tsx.tmplandtemplates/edgeTypes.tsx.tmplfor typed registries. - Use
templates/layout.ts.tmplfor deterministic starter layout behavior. - Use
templates/migration-plan.md.tmplfor patch-by-patch upgrade planning. - Use
templates/compat-adapter.ts.tmplwhen backward compatibility is required.
Weekly Installs
11
Repository
fatih-developer…h-skillsGitHub Stars
1
First Seen
Feb 18, 2026
Security Audits
Installed on
antigravity11
github-copilot11
amp11
codex11
kimi-cli11
gemini-cli11