In a medium bowl, whisk the flour with the baking powder and salt. Set aside.
In the bowl of an electric stand mixer, fitted with the paddle attachment or with a hand mixer, beat the butter and sugar until creamy and smooth. Add the egg and vanilla extract and beat until light and fluffy for about 2 minutes. Scrape down the sides and bottom of your bowl as needed. Add the flour mixture and beat just until incorporated.
Divide the batter in half and place one-half of the batter back into the bowl of your electric mixer. Add the cream cheese and beat until incorporated. Form the dough into a ball and set it aside.
Place the second half back to the stand mixer, then add the cocoa powder, buttermilk, and red food color. Beat until well mixed. Shape each dough into a 6 by 2-inch log.
Next, place the red dough to the cream cheese dough and roll together to form one single log. Then, twist and roll to marbleize the two doughs until you get the marble effect you desire. Finally, line a mini loaf pan with cling film and add the dough to shape. Wrap in plastic wrap and refrigerate the dough in the pan until firm (2 hours or overnight).
When you're ready to bake the cookies, preheat the oven to 350°F /180°C.
Prepare the baking sheet with parchment paper or a silicone baking mat. Bring the dough from the refrigerator and unmold it. With a sharp knife cut the dough into 1/4-inch-thick slices. Place on your prepared baking sheet, spacing about 2 inches apart.
Bake the cookies for about 8 - 10 minutes or until the cookies are just firm around the edges but still a little soft in the center. Remove from oven and allow to cool for about 5 minutes in the pan before transferring them to a cooling rack to cool completely.
The cookie dough can be molded into a log instead of a rectangle shape.