Serves: 36 to 48 cookies
Whisk together the flour, cocoa powder, salt and baking soda in a medium bowl and set aside.
Put the butter into the bowl of a stand mixer fitted with a paddle attachment (or a large bowl if using a hand mixer) and beat on medium-high speed until smooth. Add the sugar and beat until light and fluffy, scraping down the sides of the bowl and paddle as needed, about 4 minutes more. Add the egg and vanilla and beat until smooth. Add the melted chocolate and beat until smooth.
Reduce the mixer speed to medium-low and add the flour mixture in two batches, scraping down the sides of the bowl and paddle as needed. Mix until incorporated.
Divide the dough in half and shape into two flattened disks. Wrap in plastic wrap and refrigerate until firm at least 1 hour and up to 3 days.
Position oven racks to the upper and lower third of the oven and preheat to 175°C. Line two baking sheets with parchment. Now flour parchment for rolling: Dust a piece of parchment with flour, place a disk of dough on it, dust the disk with flour, then cover it with a second piece of parchment. Roll out the dough about 1/4 inch thick. Cut out shapes with 11/2- to 2-inch cookie cutters. Gather up the scraps, re-roll and cut out. (Chill the scraps if the dough becomes too soft.) Roll and cut out the remaining disk of dough. Working in batches, arrange the cookies 1 inch apart on the prepared baking sheets.
Bake the cookies until the tops look dry and no indentation is left when pressed with your finger, 10 to 12 minutes. Let the cookies cool for a few minutes on the baking sheets, then use a metal spatula to transfer them to a rack to cool completely.
Decorate with royal icing as desired. Store at room temperature in an airtight container for up to 3 days.