Moses
Genesis 38:28ESV·traditional attribution

And when she was in labor, one put out a hand, and the midwife took and tied a scarlet thread on his hand, saying, “This one came out first.”

Matthew Henry Presbyterian @wholebiblehenry

Here is, I. Judah's rigour against Tamar, when he heard she was an adulteress. She was, in the eye of the law, Shelah's wife, and therefore her being with child by another was looked upon as an injury and reproach to Judah's family: Bring her forth therefore, says Judah, the master of the family, and let her be burnt; not burnt to death, but burnt...

Commenting on Genesis 38:24-30

John Gill Reformed Baptist @doctorgill

And it came to pass as he drew back his hand,.... Into the "uterus" again: that, behold, his brother came out; out of his mother's womb, and so was properly born first: and she said; either Tamar, or rather, her midwife: how hast thou broken forth?

Adam Clarke Methodist @methodicalclarke

The midwife - bound upon his hand a scarlet thread - The binding of the scarlet thread about the wrist of the child whose arm appeared first in the birth, serves to show us how solicitously the privileges of the birthright were preserved. Had not this caution been taken by the midwife, Pharez would have had the right of primogeniture to the prejudice of his elder brother Zarah.