Minimally invasive surgery for Ricci flow singularities