With several cats my cat trees seem to need repair periodically. The rope gets destroyed by their claws more frequently than I would like. Of course, this is the trade off for not having damaged furniture.
I’ve had to repair all of the cat trees in my house at some point. I use a u-shaped staple and a hot glue if the underlining material is wood. If it is cardboard I use hot glue and add a staple to the two ends only. I use a nail gun for the u-shaped staples, but you can use a hammer. It’s as simple as removing the old rope and gluing the new rope in place.
Ouch. Ouch. Ouch. I always manage to burn myself on the glue. Ouchy.