auto generate spec snippet