Moed Katan 19a
מועד קטן י״ט א — ד"ה גְּמָ׳ תָּנוּ רַבָּנַן
Moed Katan 19a:2
Chachmei Bavel record that one may write tefillin and mezuzot and spin tekhelet for tzitzit on Chol Hamoed, and the halakha permits writing and selling them in the usual manner in an amount sufficient for one’s livelihood.
גְּמָ׳ תָּנוּ רַבָּנַן: כּוֹתֵב אָדָם תְּפִילִּין וּמְזוּזוֹת לְעַצְמוֹ, וְטוֹוֶה עַל יְרֵיכוֹ תְּכֵלֶת לְצִיצִיתוֹ, וְלַאֲחֵרִים בְּטוֹבָה, דִּבְרֵי רַבִּי מֵאִיר. רַבִּי יְהוּדָה אוֹמֵר: מַעֲרִים, וּמוֹכֵר אֶת שֶׁלּוֹ, וְחוֹזֵר וְכוֹתֵב לְעַצְמוֹ. רַבִּי יוֹסֵי אוֹמֵר: כּוֹתֵב וּמוֹכֵר כְּדַרְכּוֹ כְּדֵי פַרְנָסָתוֹ. אוֹרִי לֵיהּ רַב לְרַב חֲנַנְאֵל, וְאָמְרִי לַהּ רַבָּה בַּר בַּר חָנָה לְרַב חֲנַנְאֵל: הֲלָכָה, כּוֹתֵב וּמוֹכֵר כְּדַרְכּוֹ כְּדֵי פַרְנָסָתוֹ. אָמַר רַב יְהוּדָה אָמַר שְׁמוּאֵל, וְכֵן אָמַר רַבִּי חִיָּיא בַּר אַבָּא אָמַר רַבִּי יוֹחָנָן: הֲלָכָה בֵּין בְּאֶבֶן בֵּין בְּפֶלֶךְ. וַהֲלָכָה: כּוֹתֵב כְּדַרְכּוֹ וּמוֹכֵר כְּדֵי פַרְנָסָתוֹ.
GEMARA: The Sages taught the following baraita: A person may write phylacteries and mezuzot for himself and spin sky-blue wool for his fringes on his thigh. And for others he may do these things as a favor, but not for payment. This is the statement of Rabbi Meir. Rabbi Yehuda says: If he initially made them for himself, he may employ artifice, sell his own and then go back and write new ones for himself. Rabbi Yosei says: He may write and sell them in his usual manner, in the amount that is enough to provide for his livelihood. Rav ruled for Rav Ḥananel, and some say it was Rabba bar bar Ḥana who ruled for Rav Ḥananel: The halakha is that one may write and sell them in his usual manner, in the amount that is enough to provide for his livelihood. Rav Yehuda said that Shmuel said, and similarly Rabbi Ḥiyya bar Abba said that Rabbi Yoḥanan said: The halakha is that one may spin the sky-blue wool for fringes on the intermediate days of a Festival, both with a stone and with a spindle, owing to the importance of the mitzva of ritual fringes. And similarly the halakha is: One may write phylacteries and mezuzot on the intermediate days of a Festival in his usual manner and sell enough to provide for his livelihood.

