Gears slipping after a chain change
Look up the proper chain for the components. XT is not a size - that is the group level.   You should size the chain for the number of speeds (gears).  

Inspect the cassette.  As they wear the teeth get sharper spaces get longer.  Visually compare it to a new cassette even if you are looking at a picture.

If your chain snapped then possible something else is damaged.  Inspect all the drive components.

A cassette typically last 2-3 chains.  If you get a new cassette then change the chain. 

A worn chain wears a cassette down faster.
And a worn cassette wears a chain down faster.  

A chain is cheaper and easier to change so cheaper to stay with a fresh chain.
There are tools to measure chain stretch.
Replace a stretched chain.  

A new chain on a worn cassette will jump - basically both the chain and cassette stretch.