here's a trick I like to do.
Don't want to declare war for a diplomatic penalty?
-sign defensive pact with your best friend
-bribe the AI to attack your best friend, trade him all of your resources if you have to
-defensive pact kicks in, you go to war "defending your friend", don't get hit...