Gnosticism used a number of religious texts that are preserved, in part or whole, in ancient manuscripts or are lost but mentioned critically in Patristic writings.
Prior to the discovery at Nag Hammadi, only the following texts were available to students of Gnosticism. Reconstructions were attempted from the records of the heresiologists, but these were necessarily coloured by the motivation behind the source accounts.
The so-called "Codex XIII" is not a codex, but rather the text of Trimorphic Protennoia, written on "eight leaves removed from a thirteenth book in late antiquity and tucked inside the front cover of the sixth." (Robinson, NHLE, p. 10) Only a few lines from the beginning of Origin of the World are discernible on the bottom of the eighth leaf.
These texts are mentioned or partially quoted in the writings of the Church Fathers.