Abu Ali al-Hasan ibn Ahmad ibn Ibrahim ibn Shadhan said: Ali (AS) said: The Messenger of God (PBUH) had a secret upon which few came, and he used to say — and I say it also: May the curse of God, of His angels, of His prophets and His messengers and of the righteous of His creation be upon whoever divulges the secret of the Messenger of God (PBUH) to one who is not trustworthy. So keep the secret of the Messenger of God (PBUH). I heard him say: O Ali, many people, though their worship be little, would, if they knew what I say, become the most intense in worship and the most excellent in striving. When I was carried by night to the seventh heaven, I was called: O Muhammad, your Lord sends you peace and says to you: You are the most honoured of His creation in His sight, and with Him is a knowledge which He has withheld — that is, treasured up — from all the prophets. Ali ibn Tawus says: Then he mentioned, among the secrets of this supplication, that whose wording is this: O Muhammad, whoever is concerned about two matters and wishes Me to choose for him the one more pleasing to Me and to bind him to it, let him say when he intends that: 'O God, choose for me by Your knowledge, and by Your knowledge grant me success in what pleases You and what You love. O God, choose for me by Your power, and by Your power keep me far from Your wrath and Your displeasure. O God, choose for me, in what I intend of these two matters (name them), the one most delightful to me, most beloved to You, nearest to You and most pleasing to You. O God, I ask You by the power with which You have withheld the knowledge of all things from the whole of Your creation — for You know my desire, my inward and my outward. So bless Muhammad and his family, and seize me by my forelock towards what You see as pleasing to You in the matter concerning which I have sought Your choice, until it binds me to a course in which I am content with Your judgement, rely upon Your decree and find sufficiency in Your power. And do not turn me and my desire into opposition to Your desire, nor set what I want apart from what You want. By Your power, with which You decree what You love upon whom You love, overcome my desire with Your desire. Make easy for me the easy way with which You are pleased with the one who takes it, and do not forsake me after I have committed my affair to You, by Your mercy which encompasses all things. O God, cast Your choice into my heart and open my heart to cleaving to it, O Generous One. Amen, Lord of the worlds.' For when he says that, I choose for him what benefits him in the present and in the hereafter. (Fath al-Abwab, vol. 1, p. 192)
Ibn Tawus relates, with a detailed chain, a supplication from the Commander of the Faithful (AS), from the Messenger of God (PBUH), and counts it among the divine secrets that must be kept hidden from the unworthy. The Messenger of God (PBUH) said: O Ali, this supplication causes the servant to be in a state of unceasing servanthood. God taught me this supplication on the night of the ascension and said: When My servant stands at a parting of ways over some undertaking and wishes Me to choose for him according to My own good pleasure and to carry it forward for him, let him say:
O God, choose for me by Your knowledge, and by Your knowledge grant me success in what pleases You and what You love; O God, choose for me by Your power, and by Your power keep me far from Your wrath and Your displeasure; O God, choose for me, in what I intend of these two matters — and you name them — the one most delightful to me, most beloved to You, nearest to You and most pleasing to You; O God, I ask You by the power with which You have withheld the knowledge of all things from the whole of Your creation, for You know my desire, my inward and my outward; So bless Muhammad and his family, and seize me by my forelock towards what You see as pleasing to You in the matter concerning which I have sought Your choice, until it binds me to a course in which I am content with Your judgement, rely upon Your decree and find sufficiency in Your power; And do not turn me and my desire into opposition to Your desire, nor set what I want apart from what You want; By Your power, with which You decree what You love upon whom You love, overcome my desire with Your desire; And make easy for me the easy way with which You are pleased with the one who takes it; And do not forsake me after I have committed my affair to You, by Your mercy which encompasses all things; O God, cast Your choice into my heart and open my heart to cleaving to it, O Generous One. Amen, Lord of the worlds.
When he says this, I take into account his benefits both present and to come. (Fath al-Abwab, vol. 1, p. 192)
I found in the hand of Shaykh Ali ibn Yahya al-Hafiz — and we have from him a licence for all that he relates — what runs thus: The istikhara of our master the Commander of the Faithful Ali ibn Abi Talib (AS): it is that you hold in mind whatever you wish, and write out this istikhara and set it upon two slips of paper, and make them into something like a hazelnut, equal in weight, and place them in a vessel containing water; and upon the back of one of them let there be 'Do it' and upon the other 'Do not do it'. And this is its wording: What God wills comes to pass. O God, I seek from You the choice of one who has committed his affair to You, surrendered himself to You, submitted to You in his affair, devoted his face to You alone and relied upon You in what has befallen him. O God, choose good for me and do not choose against me; be for me and not against me; help me and do not help against me; aid me and do not aid against me; give me power and do not give power over me; guide me to the good and do not lead me astray; make me content with Your decree and bless me in what You have ordained, for You do what You will and judge what You wish, and You have power over all things. O God, if the good for me in this affair of mine lies in my religion, my worldly life and the outcome of my affair, then make it easy for me; and if it be otherwise, then turn it away from me, O Most Merciful of the merciful — for You have power over all things. Then whichever of the two comes up upon the surface of the water, act by it and do not go against it, if God Almighty wills. And God is sufficient for us, and an excellent Guardian. (Fath al-Abwab, vol. 1, p. 264)
The istikhara of the Commander of the Faithful (AS), as related by Ibn Tawus: after forming the intention of the undertaking in your heart, you write the following words on two pieces of paper of the same size, and on the back of one you write 'Do it' and on the back of the second you write 'Do not do it'. Then you fold the two papers alike, so that both are of the same shape and roughly the size of a hazelnut. Then you drop them both into a vessel of water. The one that sinks beneath the water you leave aside, and you act according to the one that remains upon the surface of the water. Those words are these:
What God wills comes to pass. O God, I seek from You the choice of one who has committed his affair to You, surrendered himself to You, submitted to You in his affair, devoted his face to You alone and relied upon You in what has befallen him. O God, choose good for me and do not choose against me; be for me and not against me; help me and do not help against me; aid me and do not aid against me; give me power and do not give power over me; guide me to the good and do not lead me astray; make me content with Your decree and bless me in what You have ordained, for You do what You will and judge what You wish, and You have power over all things. O God, if the good for me in this affair of mine lies in my religion, my worldly life and the outcome of my affair, then make it easy for me; and if it be otherwise, then turn it away from me, O Most Merciful of the merciful — for You have power over all things.