According to Ibn al-Qayyim, there are five conditions to achieve Istiqamah (Steadfastness) in performing required deeds:
1. The act should be done for the sake of Allah alone (ikhlas).
2. It should be done on the basis of knowledge (‘ilm).
3. Performing ibadah should be in the same manner that they have been commanded.
4. To do it in the best way possible.
5. Restricting oneself to what is lawful while performing those deeds.
According to other scholars of suluk, i.e. behavior, there are certain steps to be followed in order to achieve Istiqamah (steadfastness):
1. Always being aware of the final destination, i.e. the Day of Judgment (Akhirah). And to use this awareness in a positive way as a motive to do good deeds. One way to do it is through remembering that a person’s journey towards Akhirah starts the minute he / she passes away and leaves this world. One of the Salafs said: “If you live until the morning do not wait for the evening and if you live until the evening do not wait for the morning.”
2. Commitment (Musharatah). One has to make a commitment that he/she will be steadfast and will do things in the right way and in the best way possible, and to adhere to conjunctions of Islam. Unfortunately many Muslims are being lenient in making such a commitment.
3. To make continuous efforts (Mujahadah) to bring that commitment to reality. Some Muslims dare to make the commitment, but dare not to make the effort to make the commitment a reality.
4. Continuous checking and reviewing of one’s deeds (Muraqabah). Being honest with oneself so as not to give false excuses for failing to fulfill a commitment.
5. Self accountability (Muhasabah). This should be done twice: Firstly, before we start doing something, ensuring that it pleases Allah, that we do it for His sake only, realizing the right way it should be done. Secondly, after the action has been done, to check whether we have achieved what we aimed for, and to check for defects and shortcomings, and that we still could have done it better by not being satisfied with our action.
6. Blaming oneself for not doing it perfectly after it has been done. Self blaming here is a positive one by using it as a motive, and by aiming for improvement and having the intention of doing things better next time. This leads to making another commitment and continual commitments to improve our performance.
7. Striving for improvement (Tahsin). We have to make improvements in all that we do (daily activities, work, actions, good deeds, ibadah, etc.) as one of our objectives.
8. To be humble towards Allah, realizing that no one is perfect except Him, seeking His forgiveness, guidance and support.
It should be emphasized that these steps/conditions apply to worldly matters as well as ibadah and good religious deeds.
[Taken from an explanation of Imam an-Nawawi’s (rahimahullah) 40 Hadeeth]