Kongshi zhiguai 孔氏志怪 "Master Kong's ghost stories", also called Zhiguai 志怪, Kongzhi zhi 孔氏志 or Kongshi zhiguai ji 孔氏志怪記, was an early collection of fantastic stories compiled by a Jin-period 晉 (265-420) master with the family name Kong 孔. There are two other story collections with the same title, one by the Eastern Jin-period 東晉 (317-420) writer Zu Taizhi 祖台之 (the Zu Taizhi zhiguai 祖台之志怪), and another book called Cao Pi zhiguai 曹毗志怪 from the Later Han period 後漢 (25-220 CE). A book with a similar title is Master Zhi's Zhiguaiji 殖氏志怪記, also from the Later Han period.
The 4-juan-long Kongshi zhiguai was first mentioned as a "miscellaneous biography" (zazhuan 雜傳) in the imperial bibliography Jingji zhi 經籍志 in the official dynastic history Suishu 隋書. The bibliography in the history Xintangshu 新唐志 classifies it as a "novella" (xiaoshuo 小說).
The Kongshi zhiguai includes stories of miraculous events, supernatural phenomena or persons with magic powers, like the distant communication of Zhong Hui 鍾會 with his uncle Xun Jibei 荀濟北, which worked with the help of calligraphy and painting, or the story of the youth of Zhou Chu 周處 that has later found entry in the famous book Shishuo xinyu 世說新語.
The original book is long lost, but the Republican scholar Lu Xun 魯迅 (1881-1936) assembled ten fragments in his series Gu xiaoshuo gouchen 古小說鉤沉.