A lot of people try to do this via workbooks, short answer, quizzes, and exercises, but I think the best way to cover all these aspects of "mechanics" is something called "copywork".
|I still do copywork, too!|
Essentially, copywork is taking a classic book like The Hobbit or A Tale of Two Cities or something poetic like selections from Hardy or Frost, and copying their words - word by word, comma by comma - for ten to fifteen minutes a day.
It's not a quick-fix by any means, but an organic process that will strengthen all your writing skills in one activity.
One of the ways it works is that it forces you to pay close attention to the words that you're copying. If, for example, you were to copy just the sentence I wrote before this, you would probably be able to say inside your head "One of the ways ..." and then turn to your blank paper and write that phrase down.
In order to do that, though, you have to take a mental photograph of those words before transposing them onto your blank page. That's basically what good writers do every time they write something -- "see" the words, punctuation, and grammar in their heads as they are writing, so you're teaching yourself how to hold good writing in your head.
Over time, you'll also pick up on the vocabulary, the variety of sentence structures, and mastery that you're using as your models.
So what are you waiting for? Start your mechanics revision by taking up daily copywork!