For perfect pasta every time, make a habit of cooking until just al dente.
Scoop up a cup of the pasta water before draining; reserve. Drain the pasta, put it back in the warm pot, and stir in a generous cup of whatever you're going to sauce it with. Stir vigorously; the pasta will finish cooking and will soak up some of the sauce, adding flavor and preventing clumping. If you decide your finished dish is too thick, add reserved pasta water a tablespoon at a time until desired consistency is achieved.