Agent skill
yfiles-nodestyle-advanced
Implements advanced node style features including viewport culling (isVisible), custom bounds (getBounds), and group node styles. Optimizes rendering performance and handles hierarchical visualization. Use when implementing viewport culling, custom bounds, group nodes, or when user mentions "isVisible", "getBounds", "group node", "viewport culling", or "rendering optimization".
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/yfiles-nodestyle-advanced
SKILL.md
Advanced Node Style Features
Implement viewport culling, custom bounds, and group node styles.
Quick Start
export class AdvancedNodeStyle extends NodeStyleBase {
protected isVisible(
context: ICanvasContext,
rectangle: Rect,
node: INode
): boolean {
// Only render if node intersects viewport
return node.layout.toRect().intersects(rectangle)
}
protected getBounds(context: ICanvasContext, node: INode): Rect {
// Return actual rendering bounds (including badges, etc.)
return node.layout.toRect().getEnlarged(10)
}
}
Before Implementing
Always query yFiles MCP for current API:
yfiles:yfiles_get_symbol_details(name="NodeStyleBase")
yfiles:yfiles_list_members(name="NodeStyleBase")
yfiles:yfiles_search_documentation(query="group node style")
yfiles:yfiles_get_symbol_details(name="INode")
Core Concepts
- isVisible(): Viewport culling for performance
- getBounds(): Actual rendering bounds
- Group nodes: Hierarchical container nodes
- Folding: Collapsible groups
When to Implement
- isVisible(): Custom shapes extending beyond layout
- getBounds(): Rendering beyond layout bounds (badges, shadows)
- Group styles: Hierarchical graph visualization
Note: When implementing yFiles interfaces, always use BaseClass() wrapper instead of TypeScript implements. The @yfiles/eslint-plugin rule @yfiles/fix-implements-using-baseclass enforces this pattern.
Code Examples
See examples.md for:
- Viewport culling optimization
- Custom bounds with badges
- Group node styles
- Folder tab rendering
Reference
See reference.md for:
- isVisible() optimization strategies
- getBounds() calculation patterns
- Group node API
- Performance considerations
Related Skills
/yfiles-nodestyle-basic- Start here/yfiles-nodestyle-configure- Configuration/yfiles-nodestyle-interaction- Hit testing
MCP Tools
yfiles:yfiles_get_symbol_details(name="INode")- Node APIyfiles:yfiles_search_by_description(query="group node")- Group nodesyfiles:yfiles_search_documentation(query="folding")- Collapsible groups
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?