Threading a barrel requires a couple of basic measurements. The outside diameter of the barrel, and the depth and pitch of the threads.
If you’ve got a barrel that has the correct outside diameter, you can thread it with hand tools. If the outside of the barrel is too large, it will have to be turned down on a lathe. If you are turning the diameter down with a lathe, you might just as well also cut the threads with a lathe at the same time.
Threads tend to be sized for a particular caliber or class of firearms. The threading will be the same whether you are using a flash suppressor, a silencer (sound suppressor), muzzle break, or a recoil compensator. Barrel extensions may also use the same threading, but if the extension is to comply with laws of your state or nation, you’ll probably need the extension to be permanently fixed.
223 (including ARs), 10/22 and many other 22 calibers:
1/2inch x 28 tpi. .500″ Outside diameter barrel.
M-14, most 338 Lapua (and some other 30 caliber weapons)
5/8″ 24 tpi. .625″ Outside diameter barrel.
15mm x 1 and .590″ O.D. barrel
14mm x 1 LEFT HANDED!