One of the primary requirements of a get is that it be written
lishma, with the husband's intent of divorcing the specific women. This is derived from the biblical phrase vkatav lah, "and he [the husband] shall write for her a book of separation". The Mishna (Gittin 24b) goes so far as to invalidate a get even when a man married to two women with the same name instructs the sofer to write a
get after which he will decide which of his two wives he will divorce (I would think the moral message is more illuminating than the legal one). While the get may be written for the divorce of this man's wife such uncertainty as to the outcome means the lishma aspect is lacking.
The requirement of lishma is the subject of great Talmudic discussion. We have previously noted the fear of our sages that many a get might not be written lishma. They thus instituted the requirement, at the very least on all gittin written outside the land of Israel, that one who delivers a get declare "before me it was written [lishma] and before me it was signed [lishma]." In addition to the requirement of lishma possibly being ignored there was much discussion as to exactly what parts of the get require lishma, and how lishma is both created and verified, a task made most difficult when talking about something as intangible as one's intent.
"Anyone may write a get even a cheresh, shoteh vkatan, a deaf-mute, a fool and a minor (Gittin 22b)." At first glance this is a most difficult ruling. Lacking full competence and themselves being unable to contract a marriage or divorce the deaf-mute, the fool and the minor are incapable of creating lishma. How then can they write a get?
This Mishna would seem to follow the view of Rav Meir that the writing of the get, vekatav lah, refers not to its writing but to its signing. A get is of no legal import until signed at which point it become a legal document. Those who sign it must sign it lishma but the writing of the get is a technical act of no legal significance that can be done by anyone or anything. This would be akin to blank documents that can be found in any lawyer's office that are of no import until signed. Or to give a more "religious" example the mitzva of shofar is to blow it and only those obligated in the mitzva may blow it. However, the making of the shofar is of no religious significance and may be done by any and all.
However according to Rabbi Eliezer vekatav lah means just that, that the writing of the get must be done lishma. One does not even, at least on a biblical level, require that the get be signed. It is the writing itself that validates the get with the giving of the get the technical requirement, albeit one that requires two witnesses, to complete the process.
If so it would seem that a deaf-mute, a fool and a minor would be disqualified from writing a get due to their inability to create lishma.However the Gemara explains that our Mishna can also be elucidated in accordance with the view of Rabbi Eliezer.
As to how such can be the Gemara has two very different answers. Rav Huna argues that in fact a deaf-mute, a fool and a minor can write a get lishma - provided there is an adult overseeing and instructing him (or her) to write it with intent. This is a fascinating concept and seems to indicate that lishma is not related to intellectual maturity per se but that the get must be written for the purpose of a get. Or to put it differently one can never know what someone is truly thinking and it is impossible to know if a get (or a sefer Torah, baking matza and a host of other items that require lishma) is ever written lishma. We can only demand that the get appear that it be written lishma something we can do by instructing whoever it may be who writes it to have the get in mind. According to this reasoning even a non-Jew could in theory create lishma despite the fact that these laws have no relevance to him. The only reason the Gemara argus that a non-Jew cannot write the get is because "he thinks according to his own mind (Gittin 23b)." In other words we are concerned that the non-Jew will not listen to our instructions as he thinks his independent thoughts. Those who are considered mentally incompetent are much more likely to follow instructions. How ironic!
The second response of the Gemara would disqualify the aforementioned from writing a get due to their inability to create lishma. Having somebody stand over you telling you what to do does not create lishma. Such requires a sophisticated level of intelligence and that the mitzva at least theoretically relate to him. Thus the deaf-mute, fool and minor along with the non-Jew are not able to write a get. However the requirement for lishma applies only to the specific details of the get, the names, date and place. That cannot be created by a deaf-mute, a fool and a minor, or a non-Jew. Yet the generic parts of the get that are common to all gittin, what we may call legalese, do not require lishma and can be written by anyone.
After the get is written it must of course be delivered to the wife. As to who may or may not deliver it we will have to await our next posting.
 Thankfully with modern methods of treatment and intervention a deaf-mute is no longer destined to a life of mental neglect and thus would no longer fall under the Talmudic category of a cheresh. While many minors display great intelligence the Torah like almost all societies invalidates contracts entered into by the young.
 According to the view of Rav Meir that only the signature be lishma a non-Jew should be allowed to write a get.