סימן קד סעיף א
חֹל הַמּוֹעֵד אָסוּר בִּקְצָת מְלָאכוֹת וּמֻתָּר בִּקְצָתָן, דְּהַיְנוּ כָּל מַה שֶּׁהוּא לְצֹרֶךְ אֲכִילָה לְחֹל הַמּוֹעֵד אוֹ לְיוֹם טוֹב. וְכֵן מְלָאכָה בְּדָבָר הָאָבֵד, דְּהַיְנוּ שֶׁאִם לֹא יַעֲשֶׂנָּה יָבֹא לִידֵי הֶפְסֵד, מֻתָּר לַעֲשׂוֹתָהּ. וּצְרִיכִין לִזָּהֵר מְאֹד, שֶׁלֹּא לַעֲשׂוֹת בְּחֹל הַמּוֹעֵד מְלָאכָה הָאֲסוּרָה, כִּי אָמְרוּ רַבּוֹתֵינוּ זִכְרוֹנָם לִבְרָכָה, הַמְחַלֵּל אֶת חֹל הַמּוֹעֵד, כְּאִלּוּ עוֹבֵד עֲבוֹדָה זָרָה (תק"ל תקל"ג תקל"ז).
On Chol Hamoed it is forbidden to do certain melachos,1Concerning the halachic status of the prohibition against melachah on Chol Hamoed, there are two basic views among the early poskim. Rif, Rashi and others consider it to be a de’oraisa (a Scriptural prohibition), while Rambam, Rabeinu Tam and Rosh regard it as an issur de’rabbanan (A Rabbinic prohibition). It is interesting to note that even Rif and Rashi concede that this prohibition is unique in that the Sages were granted full authority to determine which forms of work to permit and which to prohibit on Chol Hamoed) (see Maseches Chagigah 18:a). while others are permitted, namely, all work that is necessary for the preparation of food2The preparation of food for Yom Tov may be done even in a professional manner. (Mishna Berurah) 530:1 for Chol Hamoed or Yom Tov. Any melachah that is done to prevent a loss, that is, if by not doing it you will incur a loss,3Nishmas Adam 105:1 says that according to Beis Yosef, if there is only a possibility of incurring a loss, you are not allowed to do a melachah to protect yourself. In Chayei Adam 106:5, he says that it should be done through a non-Jew in this case. Magein Avraham 537, Ke’Sav Sefer 102, Maharam Shick rules that you may do it yourself. Peri Megadim rules that it depends if the melachah is de’oraisa or Rabbinic. Mishnah Berurah 537:1 maintains that if it is likely that you will incur a loss, you may do the melachah, but it should be done in private, if possible. may be done.4This is true only if it does not involve a major imposition. (Shulchan Aruch 537:2) If it does, it is forbidden only if it is a melachah de’oraisa. (Machatzis Hashekel 536:3, Magein Avraham) To prevent a major loss, perhaps it is permitted, even if major imposition is involved. (Peri Magadim 540:7) But you should be very careful not to do any melachah that is forbidden on Chol Hamoed because our Rabbis, of blessed memory, said: "He who desecrates Chol Hamoed is considered as though he worshipped idols."5This applies even according to those who maintain that a melachah on Chol Hamoed is a Rabbinic prohibition. (see Magein Avraham 530 and Chayei Adam 106:1)
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)