The phrase originates from the Book of Job in the Bible, where it describes Job's survival after facing many hardships. In the original context, it doesn't literally mean skin, but rather refers to Job being saved from "the teeth" of his enemies.
Here are some examples of how the phrase is used:
* "The company barely survived the economic downturn, they got by on the skin of their teeth."
* "She finished the marathon on the skin of her teeth, but she did it!"
* "We got the project done on the skin of our teeth, but we got it done."
It's important to note: The phrase is usually used in a positive sense, meaning that despite the difficulty, the person or group managed to succeed, even if it was just by a small margin.