Spray a large microwave-safe mug with nonstick spray. Set aside.
In a small bowl, mix the melted butter, sugars, egg yolk, and vanilla extract together.
1 tablespoon unsalted butter, 1 tablespoon granulated sugar, 1 tablespoon brown sugar, 1 egg yolk, ½ teaspoon pure vanilla extract
Stir in the flour, salt, and almost all of the chocolate chips (leave a few to sprinkle on top of the raw batter). Mix well.
3 tablespoons all-purpose flour, ⅛ teaspoon kosher salt, 2 tablespoons semisweet chocolate chips
Use a spatula to transfer the dough to the prepared mug.
Sprinkle the remaining chocolate chips on top of the dough.
Microwave on high for 1 minute. The top of the cookie will look set and slightly puffed when done.
Carefully remove the mug from the microwave and let it cool for a few minutes before enjoying. Serve with a scoop of vanilla ice cream, if desired.
Vanilla ice cream