Preheat and prep: Heat your oven to 350°F (175°C).
Line two baking sheets with parchment paper.
Mix dry ingredients: In a bowl, whisk almond flour, coconut flour, baking powder, salt, and xanthan gum if using.
Cream butter and sweetener: In a separate bowl, beat the butter and granulated sweetener until light and fluffy, about 2–3 minutes.
Add flavors and egg: Beat in the egg, lemon zest, lemon juice, vanilla, and almond extract (if using). The mixture may look slightly separated—this is fine.
Combine: Add dry ingredients to the wet and mix until a soft dough forms. If it’s too sticky, let it rest 5 minutes to let the flours hydrate.
Portion: Scoop tablespoon-sized mounds onto the baking sheets, spacing about 2 inches apart.
Gently flatten to about 1/2 inch thick with your fingers or the bottom of a glass.
Bake: Bake 9–12 minutes until edges are lightly golden and centers look set. Don’t overbake—these should stay soft.
Cool completely: Let cookies cool on the sheet for 5 minutes, then transfer to a rack to cool fully before frosting.
Make the frosting: Beat cream cheese and butter until smooth. Add powdered sweetener, lemon juice, zest, vanilla, and salt.
Mix until fluffy. Adjust lemon juice for a brighter tang, or add a teaspoon of water for a thinner glaze.
Frost: Spread or pipe frosting onto cooled cookies. For a neat finish, chill the frosting 10 minutes before spreading.
Set and serve: Let the frosting firm up for 15–20 minutes.
Enjoy right away or chill for a firmer texture.