Just barely, very narrowly, as in Doug passed the exam by the skin of his teeth. A related term appears in the Bible (Job 19:20), where Job says, “I am escaped with the skin of my teeth,” presumably meaning he got away with nothing at all. Today the phrase using by is used most often to describe a narrow escape. [c. 1600] Also see squeak through.
The American Heritage® Idioms Dictionary Copyright © 2002, 2001, 1995 by Houghton Mifflin Harcourt Publishing Company. Published by Houghton Mifflin Harcourt Publishing Company.