agentleFS
fatih-developerfatih-developer/fth-skills/skills/react-flow/SKILL.md

react-flow

Skill7 starsChanged 46 days agoMITView on GitHub

Analyze, repair, migrate, and scaffold @xyflow/react codebases. Use when users ask to debug React Flow behavior, fix node/edge state wiring, improve type safety or performance, upgrade legacy React Flow APIs, preserve persisted graph compatibility, or generate a complete React Flow starter from scratch.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

21 rules. 0 are common, 8 are distinctive, and 13 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Ensure onNodesChange, onEdgesChange, and onConnect are correctly bound.

    line 27
  2. Very specific:

    Keep nodeTypes and edgeTypes references stable.

    line 30
  3. Distinctive:

    Run migration pass when legacy APIs are present.

    line 36
  4. Distinctive:

    Add migration guard for old payload versions when needed.

    line 39
  5. Distinctive:

    Ensure resulting scaffold compiles in a standard TS React setup.

    line 42
  6. Distinctive:

    Run available tests or static checks.

    line 44
  7. Distinctive:

    If checks are missing, provide manual verification steps.

    line 45
  8. Distinctive:

    Keep node and edge ids stable across operations and persistence cycles.

    line 50
  9. Distinctive:

    Avoid introducing a second state manager unless explicitly requested.

    line 51
  10. Distinctive:

    Keep templates framework-agnostic unless the repository enforces a framework.

    line 52
  11. Very specific:

    Prefer typed interfaces over any for flow data payloads.

    line 53
  12. Very specific:

    Use references/CHECKLIST.md for systematic auditing.

    line 57
  13. Very specific:

    Use references/FIX_PATTERNS.md for common issue-to-fix mapping.

    line 58
  14. Very specific:

    Use references/EXAMPLES.md for prompt and output patterns.

    line 59
  15. Very specific:

    Use references/MIGRATION_CHECKLIST.md and references/API_RENAMES.md for upgrade work.

    line 60
  16. Very specific:

    Use references/MIGRATION_EXAMPLES.md for migration request patterns.

    line 61
  17. Very specific:

    Start from templates/Flow.tsx.tmpl for baseline flow container.

    line 65
  18. Very specific:

    Start from templates/nodeTypes.tsx.tmpl and templates/edgeTypes.tsx.tmpl for typed registries.

    line 66
  19. Very specific:

    Use templates/layout.ts.tmpl for deterministic starter layout behavior.

    line 67
  20. Very specific:

    Use templates/migration-plan.md.tmpl for patch-by-patch upgrade planning.

    line 68
  21. Very specific:

    Use templates/compat-adapter.ts.tmpl when backward compatibility is required.

    line 69

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

React Flow Repair, Migration, And Build Protocol

Execute this protocol in order. Keep fixes small, reversible, and validated.

Required Outputs

  1. Produce a short audit report of the current React Flow architecture.
  2. Produce a prioritized fix list with risk and expected impact.
  3. Apply safe fixes in small patches when requested.
  4. Generate missing typed scaffolding when the project is incomplete.
  5. Report verification results and any residual risks.

Workflow

  1. 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).
  2. Validate graph model contracts.
    • Centralize Node and Edge type definitions.
    • Validate id strategy, data schema stability, and custom type names.
  3. Validate state and event wiring.
    • Ensure onNodesChange, onEdgesChange, and onConnect are correctly bound.
    • Detect duplicated or conflicting state sources.
  4. Validate rendering and performance.
    • Keep nodeTypes and edgeTypes references stable.
    • Detect avoidable re-renders and unsafe inline object creation in hot paths.
  5. 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.
  6. 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.
  7. 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.
  8. 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 any for flow data payloads.

References

  • Use references/CHECKLIST.md for systematic auditing.
  • Use references/FIX_PATTERNS.md for common issue-to-fix mapping.
  • Use references/EXAMPLES.md for prompt and output patterns.
  • Use references/MIGRATION_CHECKLIST.md and references/API_RENAMES.md for upgrade work.
  • Use references/MIGRATION_EXAMPLES.md for migration request patterns.

Templates

  • Start from templates/Flow.tsx.tmpl for baseline flow container.
  • Start from templates/nodeTypes.tsx.tmpl and templates/edgeTypes.tsx.tmpl for typed registries.
  • Use templates/layout.ts.tmpl for deterministic starter layout behavior.
  • Use templates/migration-plan.md.tmpl for patch-by-patch upgrade planning.
  • Use templates/compat-adapter.ts.tmpl when backward compatibility is required.

🔗 Next Steps & Handoffs

<!-- BEGIN GENERATED: handoffs (generated from the ecosystem workflow map by build_ecosystems.py — do not edit by hand) -->

Ecosystem: @ecosystem-web — Web, Design & Delivery.

Direct handoffs:

  • @claude-style-coding — The flow editor needs product-level UX polish.

Handoff contract: pass results to the next skill through an inline Handoff block in your reply with the fields skill, workflow, created_at, inputs, summary, and next (the handoff contract of @ecosystem-web). If a next skill is not installed, continue with its step from the ecosystem map, or install it with npx skills add fatih-developer/fth-skills --skill <name> after the user agrees.

<!-- END GENERATED: handoffs -->

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.