Originally Posted by
Leebo
Replace the housing with the cable, best to replace the chain and cassette together.
Don't spend any money, until/unless you know what's actually wrong. Without a proper analysis of the problem and the cause, you're likely to waste money by replacing perfectly good parts without solving anything.
As I say in my signature " an ounce of diagnosis is worth a pound of cure". the bike is ridable, so this is the time to try to better determine if this a trim issue, oe a chain wear issue. Once you know the cause you'll know where to throw the dough (if necessary).