Preheat your oven to 350°F (175°C) and line two baking sheets with parchment paper.
In a mixing bowl, combine the grated zucchini and a small pinch of salt. Let it sit for about 5 minutes. After this, squeeze out the excess moisture from the zucchini using cheesecloth or a clean kitchen towel.
In a separate medium bowl, whisk together the flour, cocoa powder, baking soda, baking powder, and salt. Set aside.
In a large bowl, cream together the softened butter, brown sugar, and granulated sugar until light and fluffy, about 3-4 minutes.
Beat in the egg and vanilla extract until well combined.
Gradually add the dry ingredient mixture to the wet mixture, stirring until just combined. Do not overmix.
Fold in the grated zucchini until evenly distributed, followed by the chocolate chips and chopped nuts, if using.
Drop tablespoon-sized portions of dough onto the prepared baking sheets, leaving space between each cookie.
Bake in the preheated oven for 10-12 minutes, or until the cookies look set but still soft in the center (they will firm up as they cool).
Let the cookies cool on the baking sheets for about 5 minutes before transferring them to a wire rack to cool completely.
Notes
Serve the cookies on a rustic platter, perhaps dusted lightly with powdered sugar for extra elegance. Pair with a glass of milk for a delightful treat!