- Don't run to catch up with a rakaa - The Prophet (S.A.W.) said,"If the prayer started, then do not join it running, and join it walking and quiet, and pray whatever you caught up with, and make up for what you missed." [Bukhari & Muslim]
- Don't distract those who are praying, even by reciting Qur'an - The Prophet (S.A.W.) said,"The praying person is in contact with his Lord, so let him concentrate on whom he is in contact with, and do not raise your voices over one another with Qur’an." [Ahmad]; Assa'eb (R.A.) said: "I was in the Masjid, and a man called me, I turned to him and there was Omar (R.A.). And he said: "Bring me these two men", then I brought them to him. Omar asked: "Where are you from? They replied from the people of At-Ta'ef. He said: "If you were from the people of Al-Madinah, I would have hurt you because you raised your voices in the Masjid of the messenger of Allah (S.A.W.)." [Bukhari]
- Don't pass in front of someone who is praying - The Prophet (S.A.W.) said, "If the passer in front of the praying person knew how much sin he committed, it would have been better for him to wait for forty than to pass in front of him." [Bukhari & Muslim]
- Don't spit in the masjid - The Prophet (S.A.W.) said, "Spitting in the Masjid is a sin and its expiation is clean it." [Bukhari & Muslim]
- Don't conduct buying/selling transactions - The Prophet (S.A.W.) said, "If you see some one selling or buying inside the Masjid, say to him: May Allah not make your trading profitable..."
- Don't yell out for lost items - The Prophet (S.A.W.) said, "...And if you see someone crying out inside the Masjid something he has lost, say to him: May Allah not restore it to you, for the Masajid were not built for this."
- Don't leave the masjid after the adhaan without praying with the jama'a - Abu Hurairah (R.A.) said, "The prophet (S.A.W.) ordered us, when we are in the Masjid and the Salah is called for, not to leave the Masjid until we pray." [Ahmad]
- Avoid offensive smells (i.e., onion, garlic, tobacco) and wear clean clothes - 'Umar (R.A.) used to say while on the Minbar: "I saw the prophet (S.A.W.) when he found their smell (garlic, onion) from a man in the Masjid, he ordered him to be taken out." then 'Umar said: "If you must eat them, then cook them well." [Muslim]
- Say a supplication - On the way to the masjid, the prophet (S.A.W.) used to say: "O Allah, make in my heart light, in my vision light, on my right light, behind me light, in my nerves light, in my flesh light, in my blood light, in my hair light, and in my skin light."
- Enter with right foot first - The Prophet (S.A.W.) used to say, "In the name of Allah, O Allah, open for me the gates of your mercy" when he entered the masjid. [Muslim] Ibn 'Umar (R.A.) used to step with his right foot first when he entered the Masjid, and step out with his left foot first when he walked out of the Masjid. [Bukhari]
- Greet everyone in the masjid with salaam, even if they are praying - Souhaib (R.A.) said: "I passed by the prophet (S.A.W.) while he was praying and gave Salam to him, he replied to me with a gesture." [Bukhari & Muslim] And Ibn Omar (R.A.) asked Bilal (R.A.): How did you see the prophet (S.A.W.) reply to them (his companions) when they gave Salam to him while he was engaged in prayer?" Bilal said: "By spreading his palm."
- Pray two rakaa before sitting - The Prophet (S.A.W.) said, "When one of you enters the Masjid, he should pray two Rak'ah before sitting down."[Bukhari & Muslim]
- Use a sutrah - The Prophet (S.A.W.) said: "If you pray, then pray toward sutrah (some barrier) and get closer to it." [Bayhaqi] "Between the place of his prostration (S.A.W.) and the wall there was no room more than sheep pass." [Bukhari & Muslim]
- Keep the masjid clean and in good shape - The companions of the prophet (S.A.W.) used keep the Masjid clean. Abdullah bin Omar (R.A.) used to put perfume inside the Masjid when Omar (R.A.) sat on the Minbar to deliver Friday speech. [Abu Dawud]
- Greet the people while leaving the masjid - "When one of you joins a gathering he should greet those present; and when he leave them he should greet them because the first salutation is not better than the last one." [Abu Dawud & At-Tirmidhi]
- Leave with the left foot first -The prophet (S.A.W.) used to say: "In the name of Allah, O Allah open for me the gates of your blessings, O Allah protect me from Satan."
Please forgive me for any mistakes. And feel free to check the other post for more things which one should do, or not do, at the masjid.