And the explanation of "I saw a good dream" is, meaning, the dream that I saw should be for good, just as they say during the Birkat Kohanim: "And just as You transformed... so may You transform all my dreams regarding me for good." And it is customary to say it three times in the manner of all incantations, and the three answer him: "You saw a good dream, it is good and let it be good, may the Merciful One make it for good, seven times may they decree upon it from Heaven that it should be good, it is good and let it be good," such is the text of the incantation. And it is not that one must say it seven times, but rather three times, but the Tur wrote that it is customary to say it seven times, see there. And they shall say three verses of transformation: "You have turned my mourning into dancing for me etc.," "Then shall the virgin rejoice... for I will turn their mourning into joy etc.," and "The Lord your God would not... and the Lord your God turned the curse into a blessing for you." And three verses of the language of redemption: "He has redeemed my soul in peace etc.," "And the ransomed of the Lord shall return etc.," and "And the people said to Saul... so the people redeemed Jonathan etc." And three verses of peace: "Creating the fruit of the lips; Peace etc.," "Then the spirit clothed Amasai... Peace be unto you etc.," and "And thus shall you say to him that lives in prosperity: Peace be both to you, and peace be to your house, and peace be unto all that you have," and afterward they say to him: "Go your way, eat your bread with joy etc." And there are those who reverse it to say: "Go with joy eat your bread" because of the initial letters forming "avel" (mourner), and there are those whose minds are not at ease with this to reverse the language of the verse, and the final letters are the word "kallah" (destruction) (She'elat Teshuvah in the name of the Kabbalist Mahari Tzemach), and the text has already been printed in the siddurim, and he should perform the hatavat chalom after the Shacharit prayer or before the prayer. And it has already been explained in siman 130 that there is a rectification for a dream to say: "Master of the Universe, I am Yours etc." during the lifting of the hands or during the time the chazzan says "Sim Shalom," see there. And the general rule of the matter: a person should not make a habit of such things, and he who is good before God shall escape from it, and when they perform the hatavat chalom for him, he should remember the dream in his thought during the time of the hatavah (Magen Avraham, subsection 1).
ופירושא ד'חלמא טבא חזאי', כלומר החלום שראיתי יהא לטובה, כמו שאומרים בעת ברכת כהנים: "וכשם שהפכת… כן תהפוך כל חלומותי עלי לטובה". ונהגו לומר שלוש פעמים כדרך כל הלחשים, והשלשה עונים לו: "חלמא טבא חזיתא, טבא הוא וטבא ליהוי, רחמנא לשוייה לטב, שבע זימנין יגזרו עליה מן שמיא דליהוי טבא, טבא הוא וטבא ליהוי", כן הוא נוסח הלחש. ולא שצריך לומר שבע פעמים, אלא שלוש פעמים, אבל הטור כתב דנוהגים לאומרו ז' פעמים ע"ש. ויאמרו שלושה פסוקים של הפכות: "הפכת מספדי למחול לי וגו'”, "אז תשמח בתולה… והפכתי אבלם לששון וגו'”, ולא אבה… ויהפוך ה' אלהיך לך את הקללה לברכה". ושלושה פסוקים של לשון פדיון: "פדה בשלום נפשי וגו'”, "ופדויי ד' ישובון וגו'”, "ויאמר העם אל שאול… ויפדו העם את יונתן וגו'”. ושלושה פסוקים של שלום: "בורא ניב שפתים שלום וגו'”, "ורוח לבשה את עמשי… שלום לך וגו'”, "ואמרתם כל לחי ואתה שלום וביתך שלום וכל אשר לך שלום", ואחר כך אומרים לו: "לך אכול בשמחה לחמך וגו'”. ויש מהפכים לומר: 'לך בשמחה אכול לחמך' מפני הראשי תיבות 'אבל', ויש שאין דעתם נוחה מזה להפוך לשון הפסוק, והסופי תיבות הם תיבת 'כלה' (ש"ת בשם המקובל מהר"י צמח), וכבר נדפסה הנוסחא בסידורים, וייטיב החלום אחר תפלת שחרית או קודם התפלה. וכבר נתבאר בסימן ק"ל שיש תקון לחלום לומר: "רבונו של עולם אני שלך וכו'” בעת נשיאת כפים או בשעת אמירת החזן 'שים שלום' ע"ש. וכללו של דבר: לא ירגיל אדם בכאלה, וטוב לפני אלהים ימלט ממנה, וכשמטיבין לו חלום יזכור החלום במחשבתו בעת ההטבה (מג"א סק"א).