Clean all the mushrooms, then very carefully remove stems. Place the mushroom caps in a bowl and set aside. Transfer the mushroom stems to a cutting board and chop very finely.
Melt butter in a large skillet and add finely chopped mushroom stems and onions. Sautee until all moisture has evaporated, then add garlic and continue cooking until fragrant. Remove from heat and let cool.