I made this for my optical z-endstop. The upper part moves on the left z-rod. The lower part is fixed and substitutes the clamp on the z-motor-mount. These parts are made for 8mm-rods. Also the adjuster is an 8mm-screw.
I fitted a small vertex under the left x-end to switch the endstop.
More information (German) on my blog sturm.selfhost.eu