Combine the butter and flour in the bowl of a stand mixer. Set the mixer to medium speed and mix just until combined. Add the rest of the dry ingredients; almond flour, cocoa powder, salt, sugar, ancho chili powder.
Add the egg and mix just until combined, about 30 seconds.
Remove the dough from the bowl and pat into a disk. Use a rolling pin to roll the dough about 1/4-inch thick. Use a knife to cut a square about the size of the mold. Press the dough into the mold. Be sure to press firmly so the impressions of the mold are transferred onto the dough. Remove the dough and place on a parchment paper lined sheet pan.
If you do not want to make a mold, you can also use cookie cutters. To do so, roll the dough to the desired size on a lightly floured work surface. Press the cookie cutters into the dough. Lift the cutter and place the cookies on a parchment paper lined baking sheet. Bake 20 minutes.