Can I use any screw for my derailleur limiters? I need new limit screws for my rear and front derailleur. Bike shop wants to charge $5 for them when they probably cost $0.05 each. Can I just get my own screws from the hardware store or do derailleurs require specific screws? If the former, what measurements/etc should I look for as far as the shaft and threads are concerned? Also, what kind of thread locker should I get?
I was once quoted by a retail plumbing supplier $16 per "fancy screw" for a shower fitting, and needed 6 of them.  They were M3 grub screws with a pointed end, so not large.

Instead I went to a specialist bolt-and-fastener shop and got 10 of them for $0.48 each.

So your screws have certain parameters that must be met


Length
thickness
thread pitch
thread form


And some parameters that are optional, or variable.


Head format - philips/JIS or flathead or hex head or torx, or a thumbscrew, or a bolt head....   Make sure its some tool that is in your multitool
Head width and depth - doesn't matter as long as you have enough room for it.
Material - Stainless Steel would be advisable, but other steels could be workable too.  Titanium may save a gram or so but would be expensive.  Aluminium is too weak for this application


For a B tension screw, the end that faces the frame is relatively unsupported, and should be approximately rounded off so it doesn't bear on the hanger with a sharp corner.    For Limit screws they press on steel lugs inside the mech.

Other than all that, any competent screw shop should be able to sort you out.  Only downsides are that they may be wholesalers who want to sell by the hundred or by the box/pack.   Also they may not do cash sales, so check first.