Is it ok to skip onions in a recipe?
While you can do whatever you want to recipes you're following, you should be aware that onions are the backbone of the flavor of many dishes. If the recipe calls for more than a quarter onion or so per serving, and particularly if they are to be browned rather than cooked until translucent, the dish will probably be blander than intended if you leave the onions out.

The good news is, there's a lot of things that are similar to onions, notably scallions, leeks and shallots (thanks Benjamin Hodgson). If you are more okay with any of these things, go ahead and substitute (in the case of scallions and shallots, the amount should be roughly halved).