Add onions and garlic to the hot skillet. Cook and stir until softened but still crisp, about 5 minutes. Add tomatoes, capers and liquid, rosemary, red pepper flakes, oregano, and basil. Bring sauce to a simmer and cook about 5 minutes to meld flavors.