1) Have scouted this early. This means sending a raider or whatever else to opponents base early.
2) Stay calm. You need to commit to a plan of action to prevent com death and to punish air, but you need to do this without spreading your resources too thin.
3) How many ravens can your commander tank, and how many ravens does your opponent have (Raven deals 800 damage). If they have exactly enough ravens to kill your com, then reducing raven number by one saves your com!
4) This can be done with hacksaw. You can also morph armor to increase the number of ravens they need. Only do one of these things at a time if your economy is small (which it still should be since you obviously scouted their air early right?
5) Once you've stabilised it's time to punish the planes! Most games you're going to start with raiders as the bulk of your army. Ravens suck against riders. You have a really good chance of breaking their com, factory, or economy if you're suitably aggressive.
6) If they survive your raider counter you need to make sure they're not ninja expanding, so maintain map control with raiders. Your economy should be larger and this will put you in a commanding lead.
- Build expensive AA early in the game.
- Morph your com excessively.
- Build units that are juicy targets for ravens such as recluse, warriors, or artillery.