idiom
by the skin of your teeth
lograr algo por los pelos
Meaning
to just barely manage to do something
Example
He passed the exam **by the skin of his teeth**.
Aprobó el examen por los pelos.