Whisk the egg yolks in a medium-size saucepan.
Add sugar and milk to the yolks.
Place your saucepan over medium to low heat.
Stir frequently with a rubber spatula. To test if the filling is done, there is a little trick. Take your finger and run it on the spatula, and the mixture should not run into the line.
Take off the stove and let the filling cool. It should settle into two layers.
Transfer the filling to a mixing bowl, and while it is cooling, mix the two layers. Then add small chunks of the room-temperature butter.
The filling should thicken like buttercream pretty quickly if the butter is cool enough. If it is runny, keep mixing for 8-10 minutes. As the butter cools, it thickens.
It is optional, but you can dye your filling. You also can place your filling in a pastry bag and pipe it onto the cookies or spread it on the cookies with a butter knife.