In a bowl, combine the flour, salt and baking powder, mix well and set aside.
In a large mixing bowl, cream the butter and sugar well. Add the eggs and vanilla and mix well.
Stir in the cocoa powder until well blended. Be careful because the cocoa powder has a tendency to puff all over until it's incorpoated.
Add in the flour mixture until well-blended.n Stir in nuts, if using.
Wrap the dough in plastic and refrigerate at last one hour, or until firm. You may want to separate it into two sections and wrap separately to keep one refrigerated while you work on the other.
Preheat oven to 350. Cover cookie sheets with parchment paper or spray with non-stick spray.
Roll out the cookies and cut into your desired shapes and thickness, using cocoa powder or flour to dust the work surface (and rollling pin if needed) to keep the dough from sticking.
Place the cookies onto the prepared cookie sheets and bake for about 8-10 minutes depending on the size and thickness of the cookies. They should feel slightly firm to the touch.
Let the cookies sit a minute on the sheet to firm up, then place on a rack to cool.
NOTE: I like to roll out the cookies on a piece of waxed paper. Before removing the cookies from the work surface to the cookie sheets, I will put the whole sheet of waxed paper on a cookie sheet and put it in the freezer for 5 minutes. I can then remove the cookies without them breaking or stretching.