And know that regarding the matter of building vessels, there is a contradiction in the Rambam, for in chapter 10, halacha 14, he wrote: "One who makes any size hole in a chicken coop so that light may enter for them is liable on account of boneh." Thus far his words. And at the beginning of chapter 23, he wrote: "One who makes a hole that is made to bring in and take out, such as a hole in a chicken coop which is made to bring in light and take out the heat, behold, he is liable on account of makeh b'patish; therefore, they decreed against every hole, etc." Thus far his words. And there is one who says that his liability is on account of both: on account of boneh and on account of makeh b'patish (Lechem Mishneh in chapter 10), and according to this, he should have written both in one place. And there is one who answered that in chapter 23 it deals with a coop that is not attached to the ground, which is not subject to boneh (Magen Avraham, subsection 3). And this too is not correct, for in any event, in chapter 10 why is he not liable on account of makeh b'patish? Furthermore, it has already been explained that regarding a Torah-level building, there is no distinction between a building and a vessel. And I do not know why the great authorities exerted themselves, for the Rambam explains his words well, as in chapter 10 he wrote: "any size hole" because it is for light, and for light any size is sufficient even for a person, as is explained in Bava Batra (59a), see there, and this is the dispute of Rav and Shmuel at the beginning of the chapter "HaBoneh," and he ruled like Rav. And in chapter 23 it deals with a large hole, since it is also to take out the heat, any size is not sufficient, and it is the final labor in the coop. And there is no issue of boneh in this, for the building is already finished, and the liability is only on account of makeh b'patish. And the source of this law is from another place in the chapter "Chavit" (Shabbat 146a): "Rabbah said: By Torah law, any opening that is not made to bring in and take out is not an opening, and it is the Rabbis who decreed on account of a chicken coop which is made to bring in air or light and to take out heat, etc.," and this is the foundation of the entire chapter 23, see there (and I saw that the Chayei Adam also wrote similarly to this, see there).
ודע שיש בענין בנין כלים סתירה בהרמב"ם, דבפרק י' דין י"ד כתב: "העושה נקב כל שהוא בלול של תרנגולים כדי שיכנס להן האורה - חייב משום בונה" עכ"ל, ובריש פרק כ"ג כתב: "העושה נקב שהוא עשוי להכניס ולהוציא, כגון נקב שבלול התרנגולין שהוא עשוי להכניס האורה ולהוציא ההבל - הרי זה חייב משום מכה בפטיש, לפיכך גזרו על כל נקב וכו'" עכ"ל. ויש מי שאומר דחיובו משום שניהם: משום בונה ומשום מכה בפטיש (לח"מ בפרק י'), ולפי זה הוה ליה לכתוב שניהם במקום אחד. ויש מי שתירץ דבפרק כ"ג מיירי בלול שאינו מחובר לקרקע, שאין בה משום בנין (מג"א סק"ג). וגם זה אינו נכון, דמיהו על כל פנים בפרק י' למה אינו חייב משום מכה בפטיש, ועוד כבר נתבאר דבבנין דאורייתא אין חילוק בין בנין לכלי. ולא ידעתי על מה טרחו הגדולים, הא הרמב"ם מפרש דבריו היטב, דבפרק י' כתב: 'נקב כל שהוא' משום דהוא לאורה, ולאורה די בכל שהוא אפילו לאדם, כמבואר בבבא בתרא (נ"ט.) ע"ש, וזהו פלוגתא דרב ושמואל ריש פרק הבונה, ופסק כרב. ובפרק כ"ג מיירי בנקב גדול, כיון שהוא גם להוציא ההבל אינו די בכל שהוא, והיא המלאכה האחרונה בהלול. ואין בזה משום בנין, דהבנין כבר נגמר, ואין החיוב רק משום מכה בפטיש. ומקור דין זה הוא ממקום אחר בפרק חבית (שבת קמ"ו.): "אמר רבה: דבר תורה כל פתח שאינו עשוי להכניס ולהוציא - אינו פתח, ורבנן הוא דגזור משום לול של תרנגולים דעביד לעיולי אוירא או אורה ולאפוקי הבלא וכו'", וזהו יסוד כל פרק כ"ג ע"ש (וראיתי שגם הח"א כתב כעין זה ע"ש).