It's likely easiest to keep the skeleton's position at runtime fixed. Then in Spine you can assume the ledge does not move, so you would animate the root bone. You can put an image in the background to use as a reference for the ledge (eg, add a second skeleton to your project, add a ledge image, uncheck Select
). When the animation completes, you would move the skeleton in your game code so the next animation (idle?) matches the post-climbing pose.
One downside to this may be determining the character's hitbox during the climb animation. The game keeps the skeleton position fixed, probably exactly on the edge of the ledge, or maybe below it. Visually the skeleton climbs above the ledge but if the hitbox stays at the skeleton position, it won't match the visuals until the end of the climb animation. You could offset the hitbox by the root bone position, which may also be helpful for other animations. Or you could just disable being able to hit the skeleton while it is climbing.
To animate it like in your video, you would probably first animate as above: the ledge does not move, the root bone is animated. You would then remove the root bone animation to get an animation like your video. However, at runtime you will have to move the skeleton to match the removed root movement, which is only feasible for very simple movement.
"Root motion" is where the animation's movement of the root bone is used to move the skeleton in the game world. This is helpful for non-linear movement, like a zombie's shuffling walk, where it would be difficult to code skeleton movement that matches the animation. Essentially the root bone movement is removed from the animation at runtime and instead that movement is applied to the entire skeleton in the game world. What game toolkit are you using? I believe we have an example (using stretchyman) that shows root motion.