two of the best points here have been the simplest:
...a collaboration of you and the spec, and knowing a bit of everything...
even if its a small gag to do, one can feed off the other here...
how many times have you say been half way through explaining a good one, or just wrapping up, and maybe someone lights a cigarette? or they have on a tie? maybe their serviette while table hopping? these are the small opportunities which can make a huge impact, by throwing in a quick vanish, or manipulation. this quickly recaptures attention by changing direction. keeping an audience on its toes adds to the excitement and entertainment.
i once did an ambitious card routine for some friends (obviously id prepared this before). they were smokers so while one was smoking i asked to borrow their fag, flipped the card stuck it through, then apologised and joked about making sure the card was still 'magic' enough, handed it back and continued. it went down very well, added some spice, and made a simple effect all the more amusing and enjoyable. all the practice of that one 'just in case i can wangle it' paid off

.
one other one is learn (and it is possible) to 'think on your feet'. rehearse in your mind possible things that can go wrong, and a simple but effective way to turn things around, or common behaviour from specs (a knowledge of general human behaviour is a great asset).
especially anything involving badly timed mobile calls...
