tree-layout

Build collision-free genealogy tree layouts with curved SVG connectors.

2|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/jonaseck2/slaktforskning --skill tree-layout
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tree-layout
Source: https://github.com/jonaseck2/slaktforskning/tree/main/.claude/skills/tree-layout
Command: npx skills add https://github.com/jonaseck2/slaktforskning --skill tree-layout

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you build pedigree, hourglass, and descendant tree chart layouts that avoid clipped branches, overlaps, and broken connectors by enforcing a consistent measurement-then-placement pipeline.

Core Features & Use Cases

  • Deterministic multi-pass chart layout: clone → inject placeholders → collapse pruning → measure box heights and horizontal footprints → place nodes in passes → route curved SVG connectors → finalize chart geometry.
  • Dynamic box sizing: compute per-person box heights from wrapped names and optional birth/death lines, ensuring no fixed placeholder height leaks into real nodes.
  • Correct placeholder behavior: filters placeholder nodes out of recursive spacing/placement passes to prevent phantom rows and subtree inflation, while still reserving outline width where needed.
  • Connector generation: emits curved SVG Q-bezier elbow paths (with dashed placeholder conventions) that stay valid under collinear endpoints.
  • Collision avoidance guarantees: places outline groups by scanning candidate positions to keep every box non-overlapping and lines from crossing boxes.

Quick Start

Ask the agent to layout a selected person’s pedigree chart using the tree-layout pipeline with placeholder filtering, dynamic box height measurement, footprint-based spacing, and curved connector routing.

Frequently Asked Questions about tree-layout

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

FAQPage Schema
How do I generate collision-free genealogy tree charts with SVG connectors?

To generate collision-free genealogy tree charts, apply a multi-pass pipeline that measures node box heights and horizontal footprints, then places boxes using placeholder-safe recursion. This approach emits curved SVG path connectors while keeping every box non-overlapping and preventing lines from crossing boxes.

Why do my pedigree chart branches overlap and clip during node placement?

Pedigree chart branches overlap and clip when placeholder nodes are not filtered out of recursive spacing and placement passes. Applying a consistent measurement-then-placement pipeline with footprint-based spacing ensures outline width is reserved without inflating subtrees or creating phantom generation rows.

How do I calculate dynamic box heights for genealogy tree nodes with wrapped names?

Dynamic box heights for genealogy tree nodes are calculated by measuring wrapped names and optional birth/death lines per person. This computation guarantees that fixed placeholder heights never leak into real nodes during the chart layout passes.

Can I build hourglass and descendant tree views alongside standard pedigree charts?

You can build hourglass and descendant tree views alongside standard pedigree charts. The layout pipeline supports all three views by applying collapse pruning, footprint rules, and connector routing uniformly across selected-person outlines and collapsed branches.

What's the best way to route SVG connectors for tree layouts with collinear endpoints?

The best way to route SVG connectors for tree layouts is to emit curved Q-bezier elbow paths with dashed placeholder conventions. This routing method stays mathematically valid even under collinear endpoint conditions and prevents connector lines from crossing node boxes.

Does this tree layout pipeline handle collapsed branches without phantom generation rows?

The tree layout pipeline handles collapsed branches without phantom generation rows by skipping placeholder nodes in key recursive functions. It reserves outline room via horizontal footprint rules, ensuring collapsed sections are represented accurately without inflating the chart geometry.