A simple and sensitive method for visual detection of phosgene based on the aggregation of gold nanoparticles.