סימן עב סעיף כג
חַיָּב אָדָם לְמַשְׁמֵשׁ בִּבְגָדָיו בְּעֶרֶב שַׁבָּת קֹדֶם חֲשֵׁכָה אִם אֵין מַחַט תָּחוּבָה בָּהֶם אוֹ אִם אֵין אֵיזֶה דָּבָר בַּכִּיסִים, וַאֲפִלּוּ בְּמָקוֹם שֶׁיֵּשׁ עֵרוּב, שֶׁמָּא יֵשׁ בָּהֶם אֵיזֶה דְּבַר מֻקְצֶה (רנ"ב).
You must103You are obligated to do so. This is the expression used in the Talmud as well. The Rambam too uses such an expression. But the Tur and Shulchan Aruch 252: 7 hold that it is a mitzvah, see Biur Halachah. examine your clothing on Friday before dark104Immediately before dark, even if you do not intend to leave the house [Vilna Gaon]. (to see) whether a needle is stuck in them or if there is anything in the pockets. Even in a place where there is an eiruv105Where there is an eiruv you may carry in the streets on Shabbos; see Chapter 94 for details. [it is necessary to check clothing] because the pockets might contain something that is muktzeh.106Something you may not move on Shabbos; see Chapter 88 for details.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)