dagre-react-flow

Apply Dagre algorithm layouts to React Flow graph nodes and edges.

Updated Feb 17, 2026
One-click install
npx skills add https://github.com/javierhbr/random-poc --skill dagre-react-flow-javierhbr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dagre-react-flow
Source: https://github.com/javierhbr/random-poc/tree/main/custom-skills/beagle-main/plugins/beagle-react/skills/dagre-react-flow
Command: npx skills add https://github.com/javierhbr/random-poc --skill dagre-react-flow-javierhbr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @dagrejs/dagre, @xyflow/react, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the complex task of arranging nodes and edges in a graph visualization, ensuring clear and organized layouts without manual effort.

Core Features & Use Cases

  • Hierarchical Layouts: Automatically arranges nodes in tree-like structures (e.g., org charts, decision trees).
  • Programmatic Arrangement: Positions nodes based on graph data, ideal for dynamic or data-driven visualizations.
  • Use Case: Visualize a complex API request flow where nodes represent services and edges represent dependencies; this Skill ensures the graph is always readable, regardless of the number of services.

Quick Start

Use the dagre-react-flow skill to apply a top-to-bottom layout to the provided nodes and edges.

Frequently Asked Questions about dagre-react-flow

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

FAQPage Schema
How do I automatically layout nodes in React Flow without manual positioning?

Use the Dagre algorithm to calculate optimal hierarchical positions and edge paths for your nodes, integrating seamlessly with React Flow components to render dynamic, interactive graph visualizations without manual positioning.

What is the best way to generate a hierarchical tree structure for a React Flow visualization?

Generating a hierarchical tree structure for React Flow is best handled by the Dagre algorithm, which programmatically arranges nodes in tree-like structures to visualize org charts, decision trees, or complex API request flows.

Can I use Dagre with React Flow for data-driven graph layouts?

Yes, Dagre works with React Flow to position nodes based on graph data, making it ideal for data-driven visualizations. It calculates node positions and edge paths dynamically, ensuring graphs remain readable regardless of the number of services.

Do I need @dagrejs/dagre and @xyflow/react to apply automatic graph layouts?

Yes, you need the @dagrejs/dagre and @xyflow/react dependencies to apply automatic graph layouts. These packages provide the underlying layout calculation algorithms and the React Flow components required for dynamic rendering.

How does automatic graph layout handle complex API request flow visualizations?

Automatic graph layout handles complex API request flow visualizations by using Dagre to calculate optimal node positions and edge paths, ensuring graphs representing services and dependencies are always automatically arranged and clearly readable.