If it only happens at idle, it may be a vacuum leak...or a fuel delivery issue. check your lines for a possible leak and replace the usual tune up items. Don't forget PCV valve and maybe an o2 sensor depending on the mileage. They are cheap if you install them yourself.
IAC valve? EGR valve? could be o2 sensor or fuel pump? Maybe even the crank position sensor, a common problem on cars that stall at idle or slowing to idle from what I've seen. If its not one of the things I listed Id be veryyyy surprised. G/L with the fix