Agent skill
yfiles-layout
Applies automatic layout algorithms (HierarchicalLayout, OrganicLayout, TreeLayout, CircularLayout, OrthogonalLayout, RadialLayout) to arrange graph elements. Use when organizing graphs, applying layouts, or when user mentions "hierarchical", "organic", "tree", "circular", "orthogonal", "radial", "arrange nodes", or "apply layout".
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/yfiles-layout
SKILL.md
Apply Automatic Layouts
Executes layout algorithms to automatically arrange graph elements.
Quick Start
import { HierarchicalLayout, LayoutExecutor } from '@yfiles/yfiles'
await new LayoutExecutor({
graphComponent,
layout: new HierarchicalLayout(),
animationDuration: '0.5s'
}).start()
Before Applying
Always query yFiles MCP for current API:
yfiles:yfiles_search_by_description(query="layout algorithm")
yfiles:yfiles_get_symbol_details(name="HierarchicalLayout")
yfiles:yfiles_get_symbol_details(name="LayoutExecutor")
Choosing a Layout
Quick decision guide:
- Tree (no cycles)? → TreeLayout
- Directed/hierarchical? → HierarchicalLayout
- Undirected network? → OrganicLayout
- Center focus? → RadialLayout
- Orthogonal routing? → OrthogonalLayout
- Circular/cyclic? → CircularLayout
Common Layouts
See algorithms.md for:
- HierarchicalLayout (flowcharts, org charts)
- OrganicLayout (social networks)
- TreeLayout (file trees, decision trees)
- CircularLayout (cycles)
- OrthogonalLayout (technical diagrams)
- RadialLayout (star topologies)
Advanced Configuration
See configuration.md for:
- LayoutData (constraints, hints)
- Sequential layouts
- Partial layouts
- Incremental layouts
- Fixed nodes
Complete Examples
See examples.md for working code.
LayoutExecutor Options
new LayoutExecutor({
graphComponent, // Required
layout, // Required: ILayoutAlgorithm
layoutData, // Optional: Layout-specific data
animationDuration: '1s',
animateViewport: true,
easedAnimation: true
})
After Layout
Layout is applied and animated. Viewport adjusts automatically if animateViewport: true.
MCP Tools
yfiles:yfiles_search_documentation(query="layout algorithms")- Overviewyfiles:yfiles_get_symbol_details(name="LayoutExecutor")- Executor APIyfiles:yfiles_search_by_description(query="hierarchical layout")- Specific algorithms
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?