I add the sea salt flakes before baking because if you wait until they're baked, they won't stick. If you're worried that the salt has just melted into the cookie, you can always add a bit more after they're out of the oven, but chances are it will just slide off.