ace up your sleeve
“ace up your sleeve” means that you have a hidden plan, something that only you are aware of and that something gives you an advantage you will use if it’s necessary.
Example: If she didn’t have an ace up her sleeve, she wouldn’t save her company form bankruptcy.