A Gashadokuro, sometimes called ōdokuro ("big skeleton"), is a type of yōkai, a monster/ghost/spirit/demon in Japanese mythology-- sort of. The name is supposedly an onomatopoeic for a rattling skull, but someone with more knowledge of Japanese will have to verify.
In short, the Gashadokuro are spirits that take the form of enormous skeletons, made from the bones of either improperly buried soldiers, or people who had starved to death, giving them the nickname "the starving skeleton." Their MO differs from story to story, though getting attacked in the dead of night and eaten seems to be a risk for intrepid explorers or monster hunters.
The most famous depiction of what could be considered a Gashadokuro is in Takiyasha the Witch and the Skeleton Spectre (also known as Mitsukuni Defying the Skeleton Spectre Invoked by Princess Takiyasha), an ukiyo-e woodblock carving/painting by the 18th century artist Utagawa Kuniyoshi. In it, the actual-historical-princess Takiyasha summons an enormous skeleton spirit to attack Mitsukuni, an official from the emperor looking to kill her and other conspirators.
Takiyasha-hime was the IRL daughter of the samurai-turned-warlord Taira no Masakado, who led a revolt against Kyoto and was eventually killed. His daughter survived and continued to run his affairs. After his passing, he and his daughter were mythologized, with him being both respected for his warrior's moxie but also feared as a malevolent spirit whose malevolence is tied to how well-kept his shrine is. Takiyasha became a powerful sorceress hunted by the empire, which is what's depicted in the art.
However, there is a "however."
However, though the concept of "giant scary skeleton" is not new, the idea of a specific breed of yokai called a Gashadokuro is fairly recent, having been created in the 60s for shonen manga and magazines-- basically comics aimed towards boys featuring cool monsters. From there, the spooky scary skeleton idea grew popular enough to get included in other graphic novels and yokai encyclopedias, the majority of which drew from the Kuniyoshi painting as inspiration.
Which means that the Gashadokuro is closer to Slender Man and other constructed myths than the oni or bakeneko or other, older and more traditional yokai.