He heard the Prophet ﷺ say, "When Allah intends good for a servant, He puts him to use."Someone asked, "What does it mean that He puts him to use?"He replied, "He opens for him the path to a righteous deed before his death, so that those around him become pleased with him."
حدثنا زيد بن الحباب حدثنا معاوية بن صالح حدثني عبد الرحمن بن جبير بن نفير عن أبيه
أنه سمع النبي ﷺ يقول إذا أراد الله بعبد خيرا استعمله قيل وما استعمله قال يفتح له عمل صالح بين يدي موته حتى يرضى عنه من حوله
Its isnad is sahih, previously mentioned in the biography of Hannad at 17151, see also 11975.