Miniaturized spectrometers have emerged as pivotal tools in numerous scientific and industrial applications, offering advantages such as portability, cost-effectiveness, and the capability for onsite analysis. Despite these significant benefits, miniaturized spectrometers face critical challenges, particularly in sensitivity. Reduced dimensions often lead to compromises in optical path length and component quality, which can diminish detection limits and limit their applications in areas such as low-light-level measurements. Here we developed a compact spectrometer that integrates an array of photonic crystal slab filters with band-stop spectral transmission characteristics into an image sensor. Compared to traditional gratings or bandpass filter strategies, where each detector can only read light of a single wavelength component, our band-stop strategy allows each detector to read the light of all wavelengths except the band-stop wavelength. This maximizes energy extraction from incident signals, significantly improving the sensitivity of the spectrometer. Spectral reconstruction is achieved mathematically using pre-calibrated band-stop responses combined with a single coded image. Our spectrometer delivers a spectral resolution of 1.9 nm and demonstrates sensitivity more than ten times greater than that of conventional grating spectrometers during fluorescence spectroscopy of Ascaris lumbricoides. The design is fully compatible with complementary metal-oxide-semiconductor (CMOS) technology, allowing for mass production at low costs and thus promising broad deployment in sensitive applications.