Skin of your teeth
Just managing to do it.
Another Bible origin story.In Job 19:20, Job says, ‘My bone clings to my skin and to my flesh, / And I have escaped by the skin of my teeth.’
Teeth don’t have skin so it alludes to a very thin or non existent margin.