I had this problem with my 2001 f150 lariat. the problem with was the mass air flow sensor (MAF) it would idle rough and cut off every now and then. I got some MAF sensor cleaner, removed it from the housing and changed the air filter for good measure. Sprayed down the sensor let it dry then re-installed the sensor. it hasn't done that since.