Foretell Failure

Divination
Level: Bard * 4, Oracle * 4, Sorcerer */Wizard * 5, Warlock * 4
Components: V, S
Casting Time: 1 Swift Action
Range: personal
Target: you
Duration: instantaneous
Saving Throw: -
Spell Resistance: -
  You cast this spell immediately before you would take an action that requires a d20 roll, such as a skill check, attack roll, or ability check. The action must be something you can complete in a single round. The spell magically informs you whether the action will succeed if you roll a 10 or better on the d20 roll involved. If the action would be successful under those circumstances, you must take the action. If the action would not be successful, you can take a different action.