Halmic
The Halmic convention provides the means to try to wriggle out of 1NT after a penalty double. Say that partner opens 1NT, doubled by RHO. Suit bids are much too useful as natural attempts to "wriggle" in the event that you have a weak hand, so, it is normal in this circumstance to abandon Stayman and transfers. Strong hands are easy to manage - generally you pass or (rarely) redouble, subsequent overtricks or double of opponents attempts to wriggle out, ensuring a good score. Using Halmic, special meanings are assigned to suit bids and redouble.
Responder's Redouble
Using "Halmic" responder re-doubles to show a weak, single suited hand. Opener is forced to bid 2C which responder passes if his suit is Clubs. Otherwise responder bids 2 of his suit which opener must pass.
Responder's Suit Bid
Holding a weak hand with two 4 card suits or better, responder bids the lower ranking of the two, "CDH style". If opener likes the suit, he should pass otherwise he bids the next suit up leaving responder to pass or bid his second suit.
Opener's Redouble
After an opening bid of 1NT, doubled by RHO (say) "Pass" by responder is an acceptance that 1NT doubled is OK, and you may say therefore that opener should redouble, on the basis that 1NT is expected to make. I prefer to not follow this line. If 1NT will make then it will be a good score doubled, without any redouble. Further, - a redouble is likely to put extra pressure on to opponents to wriggle out and they may be successful.
Alerting
Halmic bids must be "Alerted". Explanation of Redouble - "Showing a weak single-suited hand". Explanation of suit bid - "Showing a weak hand with at least 4 cards in bid suit and another, higher ranking, suit". If responder redoubles, then opener's 2C bid must be alerted - "Obeying orders", and after responder's suit bid, if opener bids the next suit up, that too must be alerted - "Prefers my other suit".
Avoiding getting into this mess in the first place
I often just pass when holding a poor 12 HCPs if first or second in hand, vulnerable, especially at teams play. It is not likely that anything will be missed. If you have a game on then either partner will have a 13 count and can be relied upon to act, or you may re-open later. I know that this doesn't avoid 1NT doubled, but it helps a bit.