Today’s yokai is a rare one. This isn’t connected with Edo period ghost stories or Heian era superstitions. This—or these—yokai are actually connected to an obscure, esoteric folk religion that used to be popular in Japan. The religion is called Kōshin, and is a mixture of Buddhism, Confucianism, Taoism, Shintoism, and other folk beliefs. It contains a lot of mysticism from Chinese philosophy, and is primarily based on the stems-and-branches calendar (aka the sexagenary cycle). This ancient calendar system revolved around groups of 60 days which were named by combining the Chinese elements, yin and yang, and the Chinese zodiac. It looks something like this:

In this ancient mysticism, everything is inter-related. Each one of those kanji you see above corresponds to a zodiacal animal, yin or yang, a season, a month, a cardinal direction, an element, and an hour. This, it is possible to say something like “the direction of the rat” or “the hour of the ox” (which, incidentally, plays an important role in my upcoming book!
This base-60 calendar system was calculated by cycling the 10 “celestial stems” with the 12 “earthly branches.” With each passing segment, both digits would rotate one character, giving a total of 60 different combinations. Depending on the pair of kanji you get, you would be able to divine certain things about the universe.
It just so happens that Kōshin is one of these combinations: 庚申. Kōshin is similar in most respects to Buddhism, but it has a very important aspect related to this calendar. Every kōshin night, the two kanji on the calendar date would be 庚 and 申. This would take place every 60 days. On that night something very important to the Kōshin faith would take place: three spiritual worms that live inside your body would sneak out while you slept and visit the Emperor of Heaven, where they would report all of your bad deeds to him. Depending on how bad you were, your lifespan would then be shorted by an appropriate amount.
The sanshi are not the only yokai related to Kōshin . I did one other yokai based on this superstition before, and you can see him at yokai.com/shoukera. For the full story on the sanshi, click below:

Sanshi / 三尸 / さんし