Step one: Decide whether you want an aggressive contingency that's almost certain to be triggered each and every encounter or if you want a less aggressive contingency that only goes off under more unusual circumstances.
If you're storming the lich's lair, you don't want your contingency to trigger on the troglodyte doorguards at the entrance to the dungeon and leave you without a contingency when you face the lich himself. So, in that case, you go for a less aggressive contingency that will only trigger under limited circumstances.
OTOH, if you're crafting items, or travelling long distances (for some reason you're not teleporting or shadow walking) and don't expect any trouble, you want to be as ready as possible if trouble shows up on your doorstep. So, you choose an aggressive contingency that is effective against a broad range of threats and triggers in nearly any combat situation.
Step 2: Decide what you want out of the contingency. You can go for specific protection--"freedom of movement if I am grappled"--broad based protection--"displacement/empowered fire shield/greater blink if I am attacked" (make sure your DM interprets "attack as broadly as the invisibility spell does for an aggressive contingency or choose a more specific attack for a less aggressive contingency)--or something that removes you from the combat (otiluke's reslilient sphere (and you might as well heighten it), teleport, etc. With access to some cleric spells, you can also choose restorative magic like "heal if I'm severly injured or incapacitated" The more specific you are the less likely it is to trigger unintentionally.
A contingency that you trigger yourself--"greater blink when I attempt to vocalize 'Pholtus' in elven followed by 'save me' in celestial" for instance--is the most flexible, but it won't help you when you're flatfooted and generally doesn't mesh well with contingencies that protect you from specific attacks. (For instance, it can't save you from a mordenkeinen's disjunction).