Accurate measurement of shear stress on a solid surface is a crucial but challenging task in fluid mechanics. Different sensors are usually used for different experimental settings: water channel, wind tunnel, towing tank, watercraft, aircraft, etc. This paper presents a direct shear sensor designed to work for varying test objects and flow conditions. Designed to compare two different sample surfaces, the shear sensor is comprised of two floating elements, whose displacement is proportional to the shear stress they experience, and two optical encoders, which measure the displacements precisely, right under the floating elements. The main plate includes two identical sets of floating elements and flexure beams machined monolithically from a thick piece of metal, allowing displacements in only one in-plane direction. The sideby-side arrangement allows the two floating elements to experience essentially the same flow conditions, regardless of test condition, enabling the comparative sensing. The method of machining these folded-beam flexures, whose width is on the scale of micrometers, while thickness and length are in millimeters and centimeters, respectively, is presented. The main plate is designed with the help of finite element analysis to ensure dynamic response of the floating elements is appropriate for target flow conditions. The utility of the shear sensor is verified in three different flow settings, i.e., water tunnel, boat in open water, and wind tunnel. A miniature underwater camera system is also developed to observe the sample surfaces during testing on a moving object, such as a boat.