The path is determined by which graph property you're after:
Need the skeleton itself: Skeleton.
Need just the pixels where lines meet: Skeleton — branch points.
Need just the pixels where lines terminate: Skeleton — end points.
Want to remove short noise branches: Skeleton — remove spurs (length threshold).
Want to remove branches that go in a specific direction: Skeleton — remove spurs (by angle).
Want to trim spurs without removing them entirely: Skeleton — shorten spurs.
Want to extend short branches that almost-but-not-quite reach an intersection: Skeleton — extend spurs.
Want each branch as its own measurable object: Skeleton — split.
Most workflows chain several of these: skeleton, then remove short spurs, then split for per-segment measurement.