Preheat oven to 350°F. Grease a 4-inch round pan or line four mini cupcake cups.
Whisk flour, sugar, cocoa, baking powder, and salt in a bowl.
Beat egg yolk with mashed banana, butter, milk, and vanilla. Fold into dry mix until just combined.
Spoon into pan or cups, filling to 3/4 full. Bake 14–18 minutes for minis, 20–22 minutes for 4-inch. Cool fully.
Beat butter until smooth. Add powdered sugar, cocoa, and milk. Beat to stiff but pipeable frosting.
Pipe a small swirl on each mini cupcake. Keep away from light fabrics while photographing.