agentsclimarketplace

Yfiles graphbuilder

Skill yWorks/yfiles-for-html-skills/skills/yfiles-graphbuilder

Comprehensive Claude Code plugin for yFiles for HTML development - includes skills for initialization, graph building, layouts, custom styling, and interactive features

Install
npx -y skills add yWorks/yfiles-for-html-skills --skill yfiles-graphbuilder

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

This skill should be used when the user asks to "build a graph from data", "load data into a graph", "import JSON into yFiles", "create nodes from an array", "use GraphBuilder", or mentions "data to graph", "import data", "business data", "GraphBuilder", "TreeBuilder", or "AdjacencyGraphBuilder".

SKILL.md

2.1 KB, as published. Nobody here has run it

Build Graphs from Data

Convert business data into graph visualizations using the GraphBuilder API.

Before Building

Always query the yFiles MCP for current API:

yfiles:yfiles_get_symbol_details(name="GraphBuilder")
yfiles:yfiles_search_documentation(query="GraphBuilder tutorial")

Quick Start

import { GraphBuilder } from '@yfiles/yfiles'

const builder = new GraphBuilder(graph)
builder.createNodesSource({ data: nodesData, id: 'id' })
builder.createEdgesSource({
  data: edgesData,
  id: 'id',
  sourceId: 'source',
  targetId: 'target'
})
builder.buildGraph()

Key Concepts

  • Data stays in tags: Original data objects are stored in element.tag after build
  • ID mapping: Use field name strings or accessor functions for id, sourceId, targetId
  • Build order: Groups → nodes → edges (groups must exist before their children)
  • Provider functions: Compute styles, labels, and layouts from data at build time
  • updateGraph(): Incrementally updates an existing graph instead of rebuilding from scratch

Important: Never directly assign to readonly properties like node.layout, edge.sourceNode, or edge.targetNode. Use IGraph methods instead (e.g., graph.setNodeLayout(), graph.setEdgePorts()). The @yfiles/eslint-plugin rule @yfiles/suggest-setter-methods warns about these mistakes.

After Building

Apply a layout to position the nodes:

/yfiles-layout

Additional Resources

  • references/patterns.md — Node/edge creation, custom styles from data, labels, node positioning, updating graphs
  • references/advanced.md — Group nodes, ports and bends, TreeBuilder, AdjacencyGraphBuilder
  • references/examples.md — Complete working code examples

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.