Chronicles of Jerahmeel, by M. Gaster , at sacred-texts.com
XII. (1) R. Isaac ben Parnach has said that all man's iniquities are engraved upon his bones, as it is said, 'Their iniquities shall be upon their bones,' and all his merits shall be engraved upon his right hand, as it is said, 'The Lord is thy guard and thy protection on thy right hand.' (2) R. Joshua ben Levi says that man's merits and sins are not testified to until the day of his death. Even frivolous conversation, which is not accounted as a sin, is mentioned only at the time of his death, as it is said, 'For behold He who has formed the mountains and created the wind will tell man what his conversation hath been.' (3) Thus at his death three ministering angels come to him, one the angel of death, one a scribe, and a third who is appointed to accompany them. They say to him, 'Arise, for thy end has come.' To which he replies, 'I shall not rise, for my end has not yet arrived.' (4) Then the scribe proceeds to number his days and years. At that moment the man opens his eyes and sees the angel of death, whose length extends from one end of the world to the other; he quakes exceedingly and falls upon his face. (5) From the sole of his (the angel's) foot to the crown of his head he is full of eyes, his clothing is of fire, his covering of fire, he is surrounded by fire, he is all fire. In his hand he carries a fiery blade, from which hangs a bitter drop. This drop causes first death, then decomposition and the lividness of appearance, but man does not die until he has seen God, as it is said, ‘For no man shall see Me and live; but when he dies he shall see Him, as it is said, ‘Before Him there shall bend all those who go down to the dust when he ceases to live.’ (6) Then the man confesses everything he has done in the world. His mouth bears witness,
and the Lord writes it down. 'By Myself have I sworn, saith the Lord, that from My mouth shall go forth righteousness.' (7) If he is a man of perfect righteousness his soul is handed over to its owner. But if a man of consummate wickedness, he stiffens his neck and allows his evil inclination to prevail over him; hence the sages have said that a wicked man's evil inclination prevails over him even at his death. (8) R. Eliezer has said that just as he is stiffnecked in this world so is he at the Day of Judgment, as it is said, 'The wicked shall see and be angry.' (9) At the death of the righteous man three companies of ministering angels come to him. The first company says, A righteous man has perished from the earth.' The second company says, 'Let him in peace come and rest upon their couches.' The third company says, 'He goeth the straight path.' (10) But at the death of the wicked five angels of destruction come to him and say, 'The wicked shall return to Sheol.'