At present, it is considered that 'Kuji' was first mentioned in '登渉篇' of "Baopuzi" written by Katsuko (Ge-hong) but, in that book, it ended with 'zen gyo' and not 'zai zen' and only the curse '六甲秘祝' which is sung when entering mountains.
現在のところ「九字」の初見は葛洪『抱朴子』「登渉篇」とされるが、同書では末尾が「在前」ではなく「前行」となっており、入山時に唱える「六甲秘祝」として呪のみが載る。