Generic blondes are a good idea, and turning down cash from bad guys never hurts. Booze is a plus, but drugs are taboo. Sara Paretsky is just one of several outstanding women writers carving out a distinctive niche on that turf. The cozy formula also has restrictive elements. The protagonists tend to be more urbane and educated, and of more refined personal habits.
Clues are a requirement, and part of the fun is the reader's participation in the solution.
The happy ending is usually a package, complete with confrontation-induced confessions and erudite unraveling. Agatha Christie is a leading role model, although the cozy has spun off into less bloodless branches in recent years, into the middle ground now known as soft-boiled. In some ways, the cozies are more honest. And yes, there are dozens of exceptions, ranging from splatterpunk to noir to hard-boiled romance. Some books are so clearly an examination of character and society that the genre jacket won't fit.