A Sofer’s Job
The Sofer does Melechet Shamaim – the work of heaven.
We Paskin that Mizvot don’t need Kavanah (intent).
That is true for all but Sofrim. A Sofer must be mentally engaged in what he is doing
or he is in danger of creating a Pasul artifact, whether it’s a Sefer Torah, pair of Tefillin, Mezuzah, Megillah or Get (Jewish divorce decree) – any of the above would require
to be put into Genizzah (storage of Pasul artifacts) if the Sofer had a lapse that was not correctible. Additionally, there are a myriad of laws concerning writing, erasing, the formation of letters etc… all of which contribute to an either kosher or Pasul artifact.
For that reason it is imperative that you purchase your Mezuzot from a reliable source, a Sofer STaM who is certified. (That is to say that he has been tested by one of certifying agencies and is known to be a Yerei Shamaim)
Sofrim write and/or repair the following: