The Rohloff HG-IG Check (the older version, up to 10 speed) and the HG-Check (10-12 speed) are good tools and are based on a premise that seems to work well. They're probably about as close as you're going to get to a reasonable go or no-go without testing, because they're based on testing for slippage in exactly the same way you'd encounter problems with when putting a new chain on an overworn cassette.
In practice there are three heuristics that can also be helpful, especially if you don't have a gauge.
- How worn was the old chain? When pitch becomes super elongated (I've always found the Sheldon approach of classifying this as 1/8" or more of elongation over a 12" span to be good), the heavily used cogs are almost always toast. Even if they don't skip readily, they will accelerate wear on the new chain. Conversely, cassettes wear very slowly when you stay on top of chain maintenance/replacement.
- Sometimes you can simply see the teeth getting thinned out in an obvious way. This is unreliable with modern cassettes because the teeth are all funny shaped.
- The edge of the teeth getted overtly folded over and mashed in the upper left hand corner on some cogs very often goes along with those cogs being worn out. You'll notice this from using the Rohloff tool a lot. If you were relying on this visual cue plus chain wear measurements alone, I don't think you'd get many false positives or negatives for wear, although you might get some. It is a heuristic, but a good one.
Note there are a few different ways of defining the goal of checking for cassette wear: it could be avoiding a new chain skipping immediately, or it could be minimizing the risk of problems and premature wear in the foreseeable future. You of course always want to do the first, and the Rohloff tools are good at doing that for you, but the second has value as well in many situations, especially if the real goal of all it is to preserve wear on money chainrings moreso than squeezing the last bit of life out of a cassette. When I'm making the determination of whether to replace a cassette, I'm more concerned with what's going to work well for the rider and not waste time or cause frustration than I am with pure maximization of the cassette's lifespan. In shops there can be a need to save riders with poor maintenance habits from themselves, which also causes some gray areas with when to recommend replacing a cassette.
You can tell by testing it.
Install a new chain. It has to be new, because the problems don't occur with a worn chain.
Then test pedaling hard on every gear.
If the chain skips on any gear, the cassette needs to be changed.
Don't use any "gauge", because the only reason you would ever want to change a cassette is that it fails to work with a new chain. If a "gauge" tells a cassette is worn but the new chain still works perfectly on every single gear when pedaling hard, the "gauge" was wrong. Similarly, if a "gauge" tells a cassette is not worn but the new chain skips on some gear, you need to change the cassette.
One approach is, after a new chain has been installed, to grasp the chain on the back end of whatever cog is being checked, and try to pull the chain off the cog (pulling towards the rear, not to the side). See how much "daylight" you can see between chain and cog.
Normally you should be able to pull the chain about halfway off, but if you can just about see the ends of the teeth when you pull then the cog is likely badly worn.
Alternative to measuring, is to monitor your mileage. If you're a data-driven person, then there's a good chance you log rides on strava or a similar service. Most of those will let you log total distance on parts and when they were changed.
Example, in Strava its under "Settings --> My Gear" and requires you to set up your bike. This shows my road bike - the cassette, chain and chainrings are all 4000km, so the chain is long overdue for a change. However this bike gets minimal riding in Winter, and the chain wax minimises chain elongation.
So if you know your bike and its conditions, then you can buy the spares before you need them.