Clean the Mass Airflow Sensor.
When this sensor is having problems it can cause the engine to do all sorts of strange things, and can be very hard to diagnose.
This sensor measures the amount of air entering the engine. It is an important part of the calculation that the engine management computer uses to regulate the fuel / air mixture to the engine.
But fortunately the fix can be very cheap and easy.
The Mass Airflow Sensor is located in the tube connecting the throttle body to the air filter housing. On General Motors cars, this is usually held in place by 2 simple hose clamps.
With the engine off, disconnect the wiring going to the sensor and remove the tube.