Hazrat Ali (radhiyallahu ‘anhu) then turned to me and said, “O Kumail! If the inhabitants of these graves were permitted by Allah Ta‘ala to respond to our call, they would say, “The best provision (for the Hereafter) is the provision of taqwa.”
Hazrat Ali (radhiyallahu ‘anhu) then began to weep and said, “O Kumail! The grave, in reality, is a box which contains a person’s actions. It is only at the time of death that one will find out what actions he has sent forward and are lying waiting for him in his grave (i.e. one’s condition in one’s grave – of either punishment or comfort - will be determined by the actions he will take with him to the next realm).”
(Taareekh Dimashq 50/251)