Ibn Ataa Allah from Taj al-’arus al-hawi li tahdhib al-nufus, 32:
Know that you have three friends.
The first of them is your wealth, which you shall lose at the time of death.
The second of them is your family, who shall leave you once you are in your grave.
The third of them are your actions, which shall never depart from you.
So be friend that which will accompany you in your grave, and be intimate with it. The intelligent one is he who knows Allah, His commands, and His prohibitions.