Conventional one-pot detection platforms integrating CRISPR/Cas12a with isothermal amplification significantly streamline the nucleic acid detection workflow, while minimizing the risk of aerosol contamination. However, the intrinsic cleavage activity of the CRISPR/Cas12a system can substantially interfere with the nucleic acid amplification efficiency, ultimately compromising detection sensitivity. Herein, we develop a light-activated CRISPR/Cas12a system by engineering the crRNA with a guanine-quadruplex (G4) motif at its 3'-terminal, achieving precise regulation of Cas12a activity via photoswitching G4 structure formation. Through coupling with a recombinase polymerase amplification (RPA) reaction, we establish a one-pot detection platform that demonstrates superior detection performance compared to traditional Cas12a-based one-pot systems. The detection sensitivity has been improved by 2 orders of magnitude, reaching a level of 1 copy/μL. Notably, the platform demonstrated comparable sensitivity and specificity to PCR, the gold standard method, in detecting clinical samples, such as Epstein-Barr virus (EBV) and Influenza A virus (IAV), making it a promising technology for clinical diagnostics.