I was gonna say timing...but since its intermittent...maybe a PCV hose
the slightest leak and idle goes to crap...with my zx anyway...
*oh and you can also open a couple electrical connectors and check for any corrosion or evidence of moisture (something that will cause improper contact)...a little scrubbing with a steel brush and some wd40 and yuh on...