Trump's modus operandi has been analysed in pretty compelling detail through Scott Adams' blog over the past couple of years, through Adams' "Persuader filter". It's hard to buy everything Adams writes, but his thesis does have good explanatory value, and sometimes also predictive power, to boot. Which is never a bad thing. A number of you have said in comments that you've taken to reading his stuff.
Anyhow, before Adams gets to it himself I shall rehearse my own understanding of the Firing of Comey through that "filter". Trump fired cruise missile strikes on Syria at the very time he was hosting Xi in Florida (and made a point of telling Xi what was happening, real-time); and then launched an earthquake bomb on some unsuspecting ISIS types just as the US was in talks with China over what to do about Fat Boy in North Korea (who has gone all quiet again, true to type). Can anyone really say that either of those two gambits were clearly unproductive? (Well, Simon Jenkins does, for a start - but he's a bit of a knee-jerker on such things.) I'd say Trump-the-Persuader seems to have the measure of Xi a lot better than most.
This time, Trump fires Comey just before he meets Sergei Lavrov. If that isn't as much as to say to Lavrov - hey, tavarish, I have just as much summary power as your boss Putin, including over the folks who are investigating possible links between my campaign team and your mob - then I don't know what else it could be.
Of course, he may find out that former FBI Directors have a retaliatory capability rather greater than that of hapless ISIS fighters caved-up in Afghanistan. Being a more imaginative user of the levers of power than the average president doesn't represent any guarantee of success. But we have to reckon there are many more out-of-left-field surprises to come from that source. While those levers are still in his little hands, that is.