Preheat oven to 350˚F. Line baking sheet with parchment paper or a silpat. Fit a pastry bag with a tip for the shape you wish to pipe. Bigger is better here, as the cookie dough can be a little stiff. If you don't plan to pipe the cookies, they can be spooned out onto the prepared baking sheet too.
Beat the softened butter and peanut butter with a paddle attachment until lighter in color and creamy (about 2 -3 minutes). The color changes due to the air being whipped into it, which translates into a fluffy base for the cookie.
Add the vanilla extract and salt. When fully incorporated, add the sugars and beat again until fully incorporated, starting on low speed.
Add the cocoa powder and egg and mix until fully incorporated.
Sift in the flour in thirds and mix in using a rubber spatula until flour is just incorporated before adding the next 1/3. Do not over-mix as this will result in a tougher cookie.
If you're piping the cookies, spoon ½ cookie dough into the pastry bag and pipe cookies onto the parchment paper or silpat, 1 1/2 to 2 inches apart from each other. I pipe mine about 1 1/2" in diameter at their base. They will spread a bit in the oven from the butter, and the tops will sink a bit, but the overall shape should hold fine.
Bake for 8 minutes or until just starting to set up. Do not cook until they become hard or browned.
Cool on a cooling rack. For larger cookies, you may want to let them cool on the cookie sheet for 1 minute before removing to a cooking rack.
Sift with a little confectioners sugar just before serving.