The design of a novel CMOS-compatible evanescent field gas sensor based on a silicon-on-sapphire slot waveguide is proposed for sensing trace gases in the mid-infrared. A detailed numerical study is carried out to obtain the optimum design parameters and determine the detection efficiency of the sensor for four examples of trace gases: carbon dioxide, nitrous oxide, ammonia, and methane gas by operating the waveguide sensor at their characteristic absorption wavelengths of 2.76 \textmu m, 2.86 \textmu m, 3.00 \textmu m, and 3.31 \textmu m, respectively. A high evanescent field ratio of the order of 50\(%\), small waveguide length ranging from 0.75 cm to 1.36 cm, and a detection limit down to a few tens of ppb have been obtained for the optimized sensor design for all four gases. The high sensitivity, low detection limit, small footprint and CMOS compatibility of the proposed sensor make it suitable for on-chip applications.