Melt butter in a saucepan over medium heat. Cook, stirring often, about 6 minutes, until it becomes brown in color. It will foam, reduce, then foam again.
Once it’s done cooking the foam is a light brown and it will dissipate after you remove it from the heat. Once it starts to brown, keep stirring so it doesn’t burn. Let sit for about 5 minutes to cool.
Pour into an electric mixer fitted with paddle attachment. While still hot, add both sugars and mix on low until combined. Let sit to cool for a few minutes.
While butter mixture is cooling, combine flour, baking soda, and salt in a medium bowl. Stir and set aside.
Turn mixer (with butter mixture bowl attached) on low. Add eggs, one at a time, mixing completely. Mix in vanilla extract and almond extract (optional, but it adds great flavor). Add flour mixture to the wet ingredients and mix until combined. Stir in chocolate chips.
Line cupcake pans with 15 liners and one baking sheet with parchment or a silpat baking mat.
Scoop out 15 balls of cookie dough that are about 1/4 cup each (I use an ice cream scoop for this). Place one ball in each cupcake liner.
Divide the remaining dough into 1/2 tablespoon sized balls.
Chill both the cookie dough cupcakes and little cookie balls for at least 2 hours (or more).
Before baking cookies, start the frosting (see below).
Preheat oven to 350°F. Bake mini cookies for about 7-8 minutes. Bake the cupcakes for about 15-18 minutes. In both cases, the outside will start to turn a rich golden color. You don't want to over bake these, they taste best when they're a little under done in the middle. Cool the cupcakes for 15 minutes in the pan before removing to a rack to cool completely. Frost once cool.