Permissible melakha for a mitzva need is normally limited to unskilled labor. However, if the mitzva involved is a time-sensitive one, meaning that if it is not observed immediately the opportunity to do so will be lost, then even skilled labor is permitted. This permit is based on the principle of davar ha-aved (above, section 2). Just as the loss of money is deemed a davar ha-aved, so is the loss of a mitzva. In fact, to avoid losing out on a mitzva we even permit one to do a melakha which could have been done before the festival but was pushed off; he is not penalized (BHL 545:3 s.v. “le-atzmo”). In contrast, if one pushed off doing a melakha before the festival and as a result will now suffer a monetary loss, he is penalized by not being permitted to do the melakha on Ḥol Ha-mo’ed (above, section 3).
Therefore, if a synagogue has only one Torah scroll and it is missing letters, even though its current unusable condition is the result of neglect, the letters may be written on Ḥol Ha-mo’ed to enable a public Torah reading. It is even permissible to sharpen a quill in order to write the necessary letters. Although writing the letters and sharpening the quill are skilled labor, they are considered melakhot undertaken to avoid a loss (since if people do not fill in the letters, they will miss out on the mitzva of reading from the Torah), and so they are permitted on Ḥol Ha-mo’ed (SA 545:2; MB ad loc. 7, 48). Even if there is a synagogue nearby with a kosher Torah scroll, one may still fix the invalid Torah scroll in order to avoid making things more difficult for the community members, who otherwise would have to arrange to transport a Torah scroll from a different synagogue (BH 445:2 s.v. “she-im”).
Similarly, if one did not build a sukka before Sukkot, he may build it on Ḥol Ha-mo’ed. Since this is a time-sensitive mitzva, even skilled labor may be used if necessary. After all, if he does not build the sukka on Ḥol Ha-mo’ed, he will lose out on the mitzva (SA 537:1; BHL s.v. “oseh”). If one has a small sukka and wants to expand it on Ḥol Ha-mo’ed, whether to accommodate guests who do not have a sukka or in order to hold the se’udat mitzva for a brit mila, he may do so even using skilled labor, since these too are time-sensitive mitzvot (BHL 640:6 s.v. “se’udat”). One may pick a large quantity of aravot on Sukkot and sell them publicly, so that people can fulfill the mitzva (SSK 67:41).
Anything necessary may be done to take proper care of a dead body, as kevod ha-met (dignity of the dead) is a time-sensitive mitzva. Therefore, shrouds may be sewn (which is skilled labor), a grave may be dug, and death notices (to publicize the time of the funeral) may be printed. However, one may not publicly do certain melakhot that eyewitnesses will not know are being done for one who passed away. This would include cutting stones for the tombstone and cutting down trees for the coffin (SA 547:10; MB ad loc. 19; SSK ch. 67 n. 184; see above 10:5 about a funeral on Ḥol Ha-mo’ed).
If a mezuza fell down, and a subsequent check reveals that it is invalid because some letters in the parchment have run together, the letters may be separated and the mezuza may be reaffixed, as this is unskilled labor. What if the check reveals that the mezuza is invalid and cannot be repaired, and there is no way to get another one on Ḥol Ha-mo’ed? If it is in a room which requires a mezuza, a new one may be written. This is a time-sensitive mitzva, for which even skilled labor may be undertaken.