This has come up a couple of times, and it's always been explained, and usually very well. But pictures help a lot, and I had the opportunity to take pictures with my latest upper build, so here goes!
This description will assume that the reader: a) knows how to disassemble a bolt, b) has access to a readily available, "standard" headspace gauge as opposed to the expensive and increasingly rare GI gauges that don't require disassembling the bolt, and c) wants to verify that their new barrel will be safe with the bolt they plan to use with it. I'm demonstrating with a 300 Blackout GO gauge from PTG, so there is no version that's made to use an assembled bolt with. The process isn't really any different from using a headspace gauge with an assembled upper, but it
looks different because you're doing it without the upper.
First, here's my gauge, and my bolt:
Note that it has a distinct "rim" that's similar to a cartridge case rim. That's why the extractor has to come off of the bolt. The ejector needs to come out because it will oppose any attempt you make to push in on the bolt and can confuse you about whether or not you're "forcing" the bolt. The green ring on the gauge identifies it as a GO gauge (not all gauges are marked with a color, but PTG uses green for GO and red for NO GO).
Now simply put the gauge into the chamber (make sure the chamber is free of debris, gunk, excessive oil/grease, etc. first). This is what it'll look like from the breech end:
Next, simply insert your stripped bolt into the barrel extension...
...and try to turn it (either direction - it doesn't matter) to lock the lugs within the barrel extension:
If the GO gauge allows the bolt to turn, the barrel is chambered AT LEAST deeply enough. The process with a NO GO or FIELD gauge is the same, but you DO NOT want the bolt to rotate with either of those gauges, as they indicatea "worn" chamber or excessive chamber depth; not necessarily "unsafe!!!!!" but definitely too deep a chamber for a NEW barrel.