Preheat the oven to 350F.
Line a baking sheet with parchment paper. In a medium bowl, whisk together flour, xanthan gum (if using), baking soda and salt. Set aside.
In a small, microwave safe bowl, melt the butter. In a large bowl, combine the melted butter with cocoa powder and whisk together until smooth.
Then, whisk in the sugar, vanilla extract and buttermilk.
Gradually stir in the flour mixture until it is fully incorporated.
Stir in the chocolate chips.
Drop dough in 1-inch balls on the baking sheet, leaving about 2 inches in between each of the cookies since they spread a little bit.
Bake at 350F for 10-12 minutes, until the cookies are set around the edges.
Cool for 2-3 minutes on the baking sheet and then transfer to a wire rack to cool completely.