Chang Tiyuan of Hejin County, courtesy name Ruyu, dreamt while he was a scholar that someone addressed him as "The Grand Master of Five Black Goats." He took it as an auspicious sign. Not long after, Chang Tiyuan was caught in a rebellion by roving bandits, who stripped him naked in an empty house.
The season was the depth of winter, the weather fiercely cold. Chang Tiyuan, completely frozen, fumbled blindly in the dark until he found several sheepskins, which he used to ward off the chill, thus narrowly escaping death.
When dawn broke, he counted them carefully: there were exactly five sheepskins.
Chang Tiyuan let out a silent laugh, musing, "So it was the immortals playing a trick on me."
Later, Chang Tiyuan sat for the Mingjing imperial examination and earned the title of Juren, eventually being appointed Magistrate of Luonan.
Note: The Grand Master of Five Black Goats refers to Baili Xi.