This is an interesting idea. We don't have plans to add it in the short term, but I do think it's worth doing.
You could do it by looking at the JSON data or loading the data into a Spine runtime. Bones can be used in a number of places. The obvious one is animation timelines. Go through Animation timelines
, if it is a BoneTimeline (which covers rotation, scale, translation, and shear timlines) then skeleton.slots[timeline.boneIndex]
will give you the bone. Other places a bone can be used is in an IK, path, or transform constraint.
Note a bone may not be used anywhere, but have child bones or slots that are used.