Correct option is D
The idiom "By the skin of your teeth" means "just barely" or "narrowly." It is used to describe a situation where someone has succeeded or survived by a very small margin or with very little room to spare.
Example: After a series of mishaps and delays, John managed to catch his flight just by the skin of his teeth.