Prepare the sweet potato first. Preheat your oven to 400°F (200°C). Wash and dry a medium sweet potato, poke several holes in it with a fork, and bake directly on the oven rack for 45-60 minutes until completely soft. Let it cool before peeling and mashing.
Reduce oven temperature to 350°F (175°C) and line a baking sheet with parchment paper.
Mix wet ingredients thoroughly. In a large bowl, combine the mashed sweet potato, melted coconut oil, coconut sugar, and vanilla extract until smooth and well incorporated.
Whisk dry ingredients separately. In another bowl, combine the flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger.
Combine wet and dry mixtures carefully. Add the dry ingredients to the sweet potato mixture and stir just until combined—overmixing will make the cookies tough. The dough will be softer than traditional cookie dough.
Fold in the optional add-ins like chopped nuts or chocolate chips if using.
Scoop dough onto the prepared baking sheet, placing cookies about 2 inches apart. Use a cookie scoop or tablespoon to form approximately 2-tablespoon portions.
Flatten cookies slightly with the back of a spoon as they won’t spread much during baking.
Bake for 12-15 minutes until the edges are set but the centers still look slightly soft. They should be lightly golden on the bottom.
Allow cookies to cool on the baking sheet for 5 minutes before transferring to a wire rack to cool completely.